As soon as you edited a processor-specific script file to add event-based metrics, you may run a Python script translate_metrics.pyc
to generate an analysis type configuration file in the format acceptable by the VTune Amplifier.
To generate and install a custom event-based sampling analysis type with user-defined metrics:
Prerequisites: Extract the content for <install_dir>\sdk\user_metrics\user_metrics.zip
to a writable directory or share on your system.
The default installation path for the VTune Amplifier XE is [Program Files]\Intel\VTune Amplifier XE 2013
. For the VTune Amplifier for Systems, the installation path is [Program Files]\Intel\System Studio <version>.<package_num>\VTune Amplifier <version> for Systems
.
Launch
translate_metrics.pyc
as follows:translate_metrics.pyc [OPTIONS] -m FILE [FILE...]
For example:
translate_metrics.pyc -m corei7_metrics.py
By default, the generated files are located in the
GENERATED_OUTPUTS
catalog in the directory you have extracted the files to.Note
Python 2.6 (or later) is required to launch the script. Using any other version may result in error messages.
Copy the generated files to your VTune Amplifier settings directory,
USERPROFILE\AppData\Roaming\Intel\Amplifier
.Launch the VTune Amplifier.
Select a project and click the New Analysis toolbar button.
The Analysis Type window opens.
On the left pane, select Custom Analysis> <your_new_custom_analysis>.
Click the Start button on the right to start the selected analysis.
translate_metrics
Script Options
Option | Description |
---|---|
| Shows this options list and exits. |
| Installs the metrics to a specified path. |
| Specifies metrics file(s) for which you want to generate the analysis files, for eaxmple: |
| Lists display types that can be used by metrics, then exits. |
| Lists valid architectures that can be referenced, then exits. |
| Lists the predefined metrics which can be referenced in metric library files, then exits. |
Examples
translate_metrics.pyc –m corei7_metrics.py
This example generates an analysis type and a viewpoint for the analysis defined in the user_metric_corei7_metrics.py
file. The generated files will be created in the GENERATED_OUTPUTS
catalog of the directory you have extracted the files into.
translate_metrics.pyc -m CPI_analysis.py -i /install/destination/
This example generates an analysis type and a viewpoint for the analysis defined in the CPI_analysis.py
file. The generated files are created in the /install/destination
directory.
translate_metrics.pyc --list-valid-display-types
This example lists all the display types that can be used for a metric and then exits.
translate_metrics.pyc --list-valid-architectures
This example lists all the valid processor architectures that are supported by the program.