Generating and Using a Mapfile

Using the data from the loaded experiments, the Performance Analyzer can generate a mapfile that you can use with the static linker (ld) to create an executable with a smaller working-set size, more effective instruction cache behavior, or both.

To prepare a program for the creation of a mapfile, you must compile the program with the -g option and collect performance data that relates to the problem you are trying to solve.

To create a mapfile, do the following:

  1. Choose a sort metric

    When you relink the program using the mapfile, the order in which the functions are loaded is determined by the sort order, which is recorded in the mapfile.

  2. Open the Create Mapfile dialog box by doing one of the following:

    In the Create Mapfile dialog box, you must provide a name for the mapfile and select the load object for which you want to generate the mapfile. The load object is usually the program executable.

To reorder your program using the mapfile, do the following:

  1. Recompile the program using the -xF option.

    With this option, the compiler generates functions that can be relocated independently.

  2. Link the object files using the -M mapfile-name option.

Can't find what you are looking for? Submit your comments at http://www.sun.com/hwdocs/feedback.
Legal Notices