Importing Profile Data into CodeAnalyst

AMD CodeAnalyst can import profile data into a project. Data may be from a time-based profiling, event-based profiling or Instruction-Based Sampling session. The data to be imported must be generated by Oprofile command line tool. A new session is created for the data. This section illustrates the process of importing.

  1. Collect profile data using the Oprofile. Please refer to Oprofile documentation on how to collect profile data.
After profiling session, profile data is usually stored in /var/lib/oprofile/samples/current/ directory.
  1. Select the Import... menu item from the File menu.

 

  1. An Import Wizard dialog box appears. Codeanalyst can import two types of profile data:

 

Import Local Profiling

When choose Local Profiling and click Next, the wizard will prompt user to enter the location where profiling data is stored. The default location is /var/lib/oprofile/samples/current/. Then click Finish.

 

CodeAnalyst creates a new session for the imported data (Session import). The GUI displays the imported in the System Data, System Graph and System Tasks tabs. Users can also choose to import profile data of any particular processes and the dependent modules by specify the full-path of each binary selecting and using Advance Filter.

 

  1. Right click on the session name for the imported data.
  2. CodeAnalyst displays a pop-up, contextual menu. Select Rename from the pop-up menu to rename the session.

 

  1. A dialog box appears asking for the new session name. Enter the new session name in the text field.

 

CodeAnalyst changes the name of the session in the session management area of the workspace.

 

Import Remote Profiling

When graphical-user-interface is not available on the system, users can generate profile using opcontrol command-line tool. Once finished, the profiling information can be transferred to another system and viewed by CodeAnalyst GUI. CodeAnalyst provides a tool called capackage.sh. It gathers information necessary for analyzing a session of profiling, and compress them into an easily managed tarball (capacked.tar.gz) This tarball can then be transfer onto another system and imported into CodeAnalyst GUI.
When choose Remote Profiling and click Next,
The wizard prompts the user to enter the location of the tarball capacked.tar.gz output from capackage.sh.
Once completed, click Finish and CodeAnalyst will untar capacked.tar.gz into the /tmp/CAxxxxxx/capacked/ directory, which contains the following sub-directories: Then the importing process continues as described in Import Local Profiling.

Import TBP / EBP Files

TBP and EBP files are generated by CodeAnalyst to store profiling data of each session. Importing profile sessions by TBP/EBP files allows users to easily move around profiling session onto different system for viewing because the file is relatively much smaller than the capackage.tar.gz file required by normal remote profiling. In this case, data is already processed and does not require an additional data processing step, which can take several minutes. However, session properties are not available in this case.

TBP and EBP files are generally stored in the project directory. When using the Import Java Profile session, the full-path to the JIT directory must also be specified in the JIT Directory field.