Running SimPoint




This section is devoted to generating off-line phase clusterings and simulation points.

The following describes at a high level how to use the SimPoint Toolkit for efficient and accurate simulation (please see the above paper for in-depth details):

  1. You will start by creating a frequency vector vector profile (such as basic block vectors) for the program and run you are interested in finding simulation points for. To do this you can use one of the basic block vector tracking tools available here, or form your own frequency vector file file (the format of the frequency vector file is described in the SimPoint release package). The frequency vector profile creates frequency vectors for each interval of execution in the program. Choosing the interval length for the profile is important, since this is assumed to be the length of a single simulation point in the rest of the analysis below. For example, if you set the interval length N to be 10 million, then each simulation point is calculated assuming you will simulate each point for 10 million instructions. You may also use variable-length intervals, if that is a more natural fit to your application.

  2. After you have the frequency vector profile, you will run the SimPoint executable (simpoint) on it. This will perform the clustering analysis described in our ASPLOS paper, and choose the minimal number of simulation points to best represent the full execution of the program. You will need to (at a minimum) provide the frequency vectors and the maximum number of simulation points you wish to extract.  

    An example command line to generate simulation points and weights with a maximum of 30 phases at 10 million interval size:

    simpoint -maxK 30 -loadFVFile -saveSimpoints simpoints -saveSimpointWeights weights

    The simulation points and weights are stored in 'simpoints' and 'weights' respectively. The format of 'simpoints' is the simulation point and associated cluster it represents per line, i.e. [simulation_point cluster_label]. The format of 'weights' has the relative weight and associated cluster it represents per line, i.e. [weight cluster_label]. For the above command line example, the 'simpoints' and 'weights' files generated with the input contain:

    245 0
    98 1
    178 2
    194 3
    476 4
    456 5
    217 6
    237 7
    325 8

    0.238 0
    0.006 1
    0.29 2
    0.032 3
    0.022 4
    0.05 5
    0.334 6
    0.012 7
    0.016 8

    Each simulation point chosen is given as the number of the interval, starting with 0 (SimPoint 0 is instructions 1 - 10 million, for example). In addition, a weight is created for each simulation point, and shows the percent of the total program each simulation point represents. The weight for each simulation point come from the total weights of the individual frequency vector that belong to the same cluster as that simulation point. These frequency vector weights may be uniform, in the case of fixed-length intervals, or variable, in the case of variable-length intervals.  In either case, the weights of all the simulation points should always sum to 1.

  3. Now that you have the simulation points, you can simulate the program at each simulation point for the number of instructions in the simulation point's interval. Note that each simulation point can be simulated in parallel to obtain a faster overall result. After simulating each point, you can then combine all of the results using each SimPoint's corresponding weight to get an overall result for the run of the program.

To get the best results from SimPoint it is vital that you have the same exact instruction counting during profiling of the frequency vectors and locating the simulation point in your simulator.   It is suggested that you verify the instruction counting if you use separate tools for gathering the frequency vectors and gathering your simulation results.  It is also suggested that you use the Start PC and its Execution Count to find the simulation point.  See the paper below for more details.

All of the features for SimPoint 3.0 and the command line options are described in along with a discussion of common pitfalls to avoid.

bulletGreg Hamerly, Erez Perelman, Jeremy Lau, and Brad Calder, SimPoint 3.0: Faster and More Flexible Program Analysis , Workshop on Modeling, Benchmarking and Simulation, June 2005.


Home ] Up ]

Send mail to with questions or comments about this web site.
Last modified: 06/22/05