Login | Register
My pages Projects Community openCollabNet

Manifest of Trend Profiler

Directory contents

Other documents in this directory that you will want to consult.


  • 0Readme

    Points the user to the real documentation.

  • License.txt

    Explains the license and terms of use for this software.

  • www/index.html

    The documentation.

  • www/manifest.html

    Lists all the files in the project and explains what each one does.

  • www/schema.html

    Documents the structure of a Trend Profile.


  • Makefile

    Sets up new Trend Profiles, profdirs, via "make profdir/your_path_here". Runs a simple test via "make test".

  • Config.mk

    Drives the data gathering and analysis. Symlinked into new profdirs as "Makefile". Contains paths to some programs that trend-prof needs.

  • Driver.mk

    Included by Config.mk to drive the various trend-prof scripts. You can think of this file as containing the bulk of the code in trend-prof's main() function.

Processing stages

  • do_0_srcfind

    Step 0: Attempts to match gcov metadata in your obj directory to their corresponding source files. After step 0 is the last place where user intervention may be required.

  • do_1_rawgcov

    Step 1: Runs your workloads. Saves gcov coverage data for each workload for each source file.

  • do_2_linewise

    Step 2: Extracts data from the gcov coverage data and stores it in a more useful format.

  • do_3_fit

    Step 3: Fits the data for each basic block to several models.

  • do_4_view

    Step 4: Generates an html view of the results of profiling.

Helper scripts/libraries

  • run_server

    Runs a simple web server that allows on-demand generation of much of trend-prof's output. The initial run of trend-prof runs all of your workloads, fits the data to models, and generates a summary page. When you view the summary page through this server, asking for subsequent pages will cause this script to generate them.

  • workloads_from_dir

    Creates a workloads file based on the files in a directory filtered by a perl-style regular expression command-line argument. See the documentation or schema.html for details on workloads files.

  • workloads_from_wc

    A quick and dirty script that creates a workloads file based on the output of wc -l.

  • trend_prof_common.pm

    Some library functions that the different steps share.

  • clusters.pl

    Computes "clusters" of locations that exhibit similar execution counts. This functionality is still under development.

  • datamatrix.pl

    Dumps out execution counts in a matrix form suitable for consumption by such programs as R or matlab.

  • .debug

    If this file is present in the same directory as the perl scripts, then the scripts will be more verbose about reporting strange situations and more aggressive about failing with an error message whenever something suspicious happens. Without this file trend-prof just keeps going and generally pretends that the strange thing does not exist.



An example Trend Profile demonstrating trend-prof being used to profile quick sort.

  • Makefile

    A symlink to Config.mk

  • 0_config/

    See schema.html for details on these files.

    • workloads
    • run_workload
    • src
    • obj

      A symlink to src

  • 0_config/src/

    Contains a Makefile and source for the quick_sort program.

    • Makefile
    • compare.c
    • compare.h
    • main.c


An example use of trend-prof to profile bubble sort. This example is subtly incorrect use of trend-prof; in particular, notice that trend-prof predicts that line 19 will be executed (input size)^1.84 times even though bubble sort is quadratic in the size of its input. If you understand why, you'll get more out of trend-prof (hint: what's the input size?).