Generating and Using a Mapfile
Related Topics:
Using the data from the experiment, the Performance Analyzer can generate a mapfile you can use with the static linker (ld) to create an executable with a smaller working-set size, more effective I-cache behavior, or both.
To create the mapfile:
- 1. Use the Function List Metrics Dialog Box to choose a sort metric.
- When you relink your program using the mapfile, the order in which the routines are loaded is determined by the Function List sort order, which is recorded in the mapfile.
- 2. Choose Experiment
Create Mapfile.
- The Create Mapfile Dialog Box appears.
- 3. Use the directory pane, if necessary, to navigate to the directory where you want to store the mapfile.
- 4. If you want, you can use the Name text box to:
- 5. In the Select Load Object list box, select the load object for which you want to generate the map file (this is usually your program segment).
- 6. Click OK.
To reorder your program:
- 1. Recompile your program using the -xF option, which causes the compiler to generate functions that can be relocated independently.
- 2. Link your object files using the -M mapfile-name option, where mapfile-name is the name of the mapfile you created.