Go to main content
Oracle® Developer Studio 12.6: Performance Analyzer Tutorials

Exit Print View

Updated: June 2017
 
 

Setting Up the mttest Sample Code

Before You Begin:

You might want to go through the introductory tutorial in Introduction to C Profiling first to become familiar with Performance Analyzer.

This tutorial uses the same mttest code as the tutorial Hardware Counter Profiling on a Multithreaded Program. You should make a separate copy for this tutorial.

  1. Copy the contents of the mttest directory to your own private working area with the following command:

    % cp -r OracleDeveloperStudio12.6-Samples/PerformanceAnalyzer/mttest directory

    Replace directory with the working directory you are using.

  2. Change to that working directory copy.

    % cd directory/mttest
  3. Build the target executable.

    % make clobber
    
    % make

    Note -  The clobber subcommand is only needed if you ran make in the directory before, but safe to use in any case.

    After you run make the directory contains the target application to be used in the tutorial, a C program called mttest.


Tip  -  If you prefer, you can edit the Makefile to do the following: use the GNU compilers rather than the default of the Oracle Developer Studio compilers; build in 32-bits rather than the default of 64-bits; and add different compiler flags.