Import Linux Perf* Trace with VTune Amplifier Metrics

If you have your own performance monitoring system based on Linux Perf (for example, as part of your date center infrastructure) and cannot collect data with the Intel® VTune™ Amplifier, you can still use the VTune Amplifier for data analysis as follows:

  1. Select a VTune Amplifier analysis type that is of interest to you.

  2. Use VTune Amplifier to get a set of Linux Perf options and apply them to a Perf collection on your target system.

  3. Import the generated Linux Perf trace into a VTune Amplifier project and start analysis.

Select a VTune Amplifier Analysis Type

VTune Amplifier provides a rich set of predefined analysis types targeting particular performance problems. Each analysis type contains a selected list of low-level performance events and high-level metrics based on them. For example, Microarchitecture Exploration analysis collects all required PMU (Performance Monitoring Unit) events from CPU cores needed for TMAM methodology. The Memory Access analysis has a set of both core and uncore PMU events needed for memory-related performance metrics (like DRAM bandwidth).

Using a native Linux Perf interface to collect all needed low-level PMU events may be complicated, so consider reusing the VTune Amplifier configuration targeted for Perf collection (driverless mode).

Run VTune Amplifier to Get Linux Perf Options for Analysis

When the VTune Amplifier runs a performance data collection in the driverless mode, it uses a Linux Perf command line and logs it inside the result folder in the <result-folder>/data.0/perfcmd file. To get a correct set of Perf options, do the following:

  1. Install the VTune Amplifier on any Linux system with a similar hardware configuration (the same CPU family) as the system where real performance profiling is planned to be run.

  2. Run a VTune Amplifier analysis of your interest to generate perfcmd file with Perf options:

    $ amplxe-cl -r <result-folder> -collect <analysis-type> -finalization-mode=none -d 1

    For example, for the Microarchitecture Exploration run:

    amplxe-cl -r bogus_result -collect uarch-exploration -finalization-mode=none -d 1

    The <result-folder>/data.0/perfcmd file with all necessary Linux Perf options is generated.


    • You do not run any real workload here. The only purpose of this run is to generate the perfcmd file.

    • VTune Amplifier license is not required for this step since you only collect data without opening it.

  3. Open the perfcmd file and copy-paste its content to a Linux Perf command invocation on your real target system.


    Your Perf tool should contain a patch from In Linux kernel version >= 4.19, this patch is applied out of the box, in earlier versions you need to manually apply it and recompile the Perf tool.

  4. Run the Linux Perf configuration on your target system.

Import the Linux Perf Trace into a VTune Amplifier Project

  1. Create a VTune Amplifier project or open an existing one.

  2. Click the Import Result toolbar button.

    The Import File and Create a Result window opens.

  3. Select Import a single file option and navigate to the Linux Perf trace file.

    VTune Amplifier imports the trace and opens the result in the default viewpoint. You may switch between viewpoints to apply the most relevant. For example, use the Microarchitecture Exploration viewpoint for the Microarchitecture Exploration analysis.

For more complete information about compiler optimizations, see our Optimization Notice.
Select sticky button color: 
Orange (only for download buttons)