Schema of a Trend Profile
Directory contents
Other documents in this directory that you will want to consult.
Getting started
After making a Trend Profile with make profdir/foo, the
profdir "foo" will contain:
User input
The user must then supply:
- 0_config/workloads
Lists all the names and sizes of workloads to run. Workload names
must not start with whitespace nor contain newlines. See
examples/quick_sort/0_config/workloads for an example of the required
format. Use workloads_from_dir to make such a file from a directory.
- 0_config/run_workload
A script. Given a name as its first argument, runs that workload.
- 0_config/src
A directory containing (or symlink to) the source code of the program to be
profiled.
- 0_config/obj
A directory containing (or symlink to) the compiled object code of the program
to be profiled. May be a symlink to src. trend-prof looks for the gcov metadata
here.
trend-prof creates
Running "make" from foo will then create:
- 0_config/source_files
a map from gcov metadata files
(.gcno/.gcda) to source files. Display names must be unique. Display
names and filenames must not start with whitespace nor contain
newlines. All paths are are relative to the profdir. If guessing fails,
you may wish to edit this file (before proceeding past step 0) so that
trend-prof can find the source and thus generate annotated
source in step 4. Run "make test" and check
examples/quick_sort/0_config/source_files for an example of the
format.
- 1_rawgcov/
first data directory
- LOG
a log of running that workload and running gcov on all the
source files; trend-prof reports status and problems to the log; it also
redirects the output of run_workload and gcov to the log
- nnnn_workload_name.data.zip
for each workload: coverage data for this workload; this zip file contains a
file called locations and another called counts that contain a
tab separated list of "locations" (a location is roughly a line of source code;
they are of the form "source_file/line_number.basic_block_number"; for instance
main.c/17.2) and a tab-separated list of counts that show how many times each
basic block was executed during that workload
- source_files
This directory contains copies of all of the source
files listed in 0_config/source_files. They are copied here during step
1. These files are copied at this time in case the source code changes or moves.
In particular, one can move only source_files and 2_linewise
to another machine to finish the rest of steps of trend-prof.
- 2_linewise/data.zip
second data directory; the data.zip file contains entries of the
following form; there is a canonical order for all of the workloads
that all of these files use.
- source_file/line_number, source_file/line_number.basic_block
contains a tab-separated list of execution counts for that
location on each workload
- total
contains a tab-separated list containing the total number of basic blocks executed
by each workload
- workload_sizes
the input size for each workload as specified in 0_config/workloads
- 3_fit/data.fits.zip
third data directory; the data.fits.zip contains results of fitting
data to models in the following form; fit types are: linear, powerlaw.
- source_file/line_number, source_file/line_number.basic_block
fitting results for this location; one fit per line; each line tab separated
list of fit information for that fit
- total
fitting results for input size vs total number of basic blocks executed for
the whole program; same format as above
- 4_view/
html rendered results directory