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. 

 
For more complete information about compiler optimizations, see our Optimization Notice.

Comments

Thankd you Kevin.

Thankd you Kevin.

That was a real life saver

-collect advanced_hotspots –r ${project_loc}/vtune_result@@@{at} –d 5

It resolved the current issue, but I am getting another error

amplxe: Error: Cannot enable Hardware Event-based Sampling: problem with the driver (sep*/sepdrv*). Check that the driver is running and the driver group is in the current user group list. See "Building and Managing the Sampling Driver" help topic for further details.

 



Hi

Hi

I am new to Android x86  architecture. I am trying to run the Intel Vtune Amplifier 2014 for Android Systems. I have encountered an error while running the software on Windows using Eclipse. I have followed the steps mentioned above  

  • 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

I was not able to locate any link or tutorial for running Android Vtune Amplifier on Windows using Eclipse. When I completed the steps and tried to run the configurations for data collection I encountered an error "amplxe: Fatal error: Cannot find analysis type. Check input parameters or reinstall the product". 

Also, I would like to mention that the amplxe.exe that the link mentions to include for the path is not available for bin64 but it is available in bin32, I am using amplxe.exe available in bin32. If someone can help me with this issue, I would be very grateful.

Any comments or suggestions are most welcome.