[Next] [Previous] [Up] [Top]

2 Building Your Program

2.6 Gathering and Applying Profile Information

Vortex can exploit dynamic profile information to generate highly-optimized code, ranging from 50% to 500% faster than without profile data. In order to reap the benefits of this optimization, profile information must be gathered and then exploited. Gathering profile information involves the following steps:

  • Run the instrumented executable to gather profile information. The most important aspect of this step is running the program on a representative input set. The program should be started with the --picstats command line option.*2 Profile data is dumped to standard output when the program terminates. Generally, you want to redirect the output of the program into a file. For example, you could gather profile information for the Vortex compiler using the following command:

    % compiler.pic --picstats "optimize; make towers.tst" > c.pic
    
    A more sophisticated example is ${VORTEX_HOME}/Cecil/bin/shell/make_profile, the script which gathers profile data for Vortex itself.

    % call-chain.perl < c.pic > c.nCCP
    
    After profile data has been gathered, exploiting it is fairly easy. A file containing processed profile data can be read into Vortex by using the load_profile command, e.g., Cecil> load_profile c.nCCP. Once profile data has been read in, it is automatically exploited during optimizing compilations. Profile data is saved in the program checkpoint, so it can be utilized across many compilation sessions without having to be read in each time. It also is reasonably robust in the face of small program changes, so profile data from an older version of the program can continue to be used for modified versions of the program.


    How to Use the Vortex Compiler - 20 JAN 97
    [Next]