Creating Eclipse External Tool configurations for Intel® VTune Amplifier

 

Introduction

The purpose of this article is to show how we can easily integrate VTune™ Amplifier into Eclipse* by using the External tool configuration capability in Eclipse.  We will create several Eclipse external tool configurations for both launching collections and displaying collected data.

Overview

These are are the tool configurations we will be creating:

  1. Local collection running for a duration of 5 seconds with results stored in Eclipse project.
  2. Displaying collected results in the VTune Amplifier GUI.
  3. Local collection launching an application created in an Eclipse project
  4. Remote collection running on an embedded target for 5 seconds.

Details

External tool configuration #1 - Local collection running for a duration of 5 seconds with results stored in Eclipse project

Select Eclipse menu item Run->External Tools->External Tools Configurations…

This will bring up the External tool configuration dialog.

In our first configuration will be running a local advanced-hotspot collection for a duration of 5 seconds.

Click on the “New Item” icon.

  • Name = amplxe-local
  • Location is the local of the amplxe-cl executable in your file system. (/opt/intel/vtune_amplifier_xe_2013/bin64/amplxe-cl
  • Arguments= -collect advanced-hotspot –r ${project_loc}/vtune_result@@@{at} –d 5

Once you have specified these values you can click apply to save. Then you can kick off a data collection by clicking Run.

Now that you have created a configuration you can kick off a run by using the menu item: Run->External Tools->amplxe-local.

This run will create a VTune Amplifier result directory in your project directory. 

External tool configuration #2 - Displaying collected results in the VTune Amplifier GUI

We can create a new External tool configuration to open this result using the VTune™ Amplifier GUI.

Select Eclipse menu item Run->External Tools->External Tools Configurations…

This will bring up the External tool configuration dialog.

Click on the “New Item” icon.

  • Name = amplxe-gui-project
  • Location is the file path of the amplxe-cl executable in your file system. (/opt/intel/vtune_amplifier_xe_2013/bin64/amplxe-gui
  • Arguments=${resource_loc}

Click Apply, Then Click on the VTune Amplifier result directory in your project, the click Run. This will launch the VTune Amplifier GUI on the result directory you have selected.

External tool configuration #3 - Local collection launching an application created in a Eclipse project

For our next configuration we will reference an application that we built as part of the Eclipse/CDT. We will call this configuration amplxe-local1, in this case all of values will be the same as the configuration except we will not specify the –d 5 argument. Instead we will specify the location of the binary in the Eclipse project. To do this remove the –d 5 and click on the Variables button. Then scroll down to the resource_loc variable and click on it. Now if you click on Run->External Tool->amplxe-local1 it will launch a amplxe-cl run data collection with whatever executable you have selected in your project.

 

External tool configuration #4 - Remote collection running on an embedded target for 5 seconds

In our last tool configuration we will launch a remote amplxe-cl collection on an embedded target. Again, Specify the values as previously stated but instead of the Variable resource_loc, this time specify string_prompt.  Before the $string_prompt variable specify the following syntax. –target ssh:root@${string_prompt} as specified below:

.

Now when you click on Run->External Tool->amplxe-remote it will bring a dialog to prompt you for the target where you want to launch your collection.

 

Summary

We have shown 4 ways that VTune Amplifier can easily be integrated into Eclipse. There are many such integrations possible. VTune Amplifier has a very powerful command-line and GUI that can be used to make working with VTune Amplifier in Eclipse relatively seamless. 

 
Para obtener información más completa sobre las optimizaciones del compilador, consulte nuestro Aviso de optimización.