Import Linux Perf* Trace with
VTune
Profiler Metrics
VTune
Metrics Profiler
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™
, you can still use the
Profiler
VTune
for data analysis as follows:
Profiler
- Select aVTuneanalysis type that is of interest to you.Profiler
- UseVTuneto get a set of Linux Perf options and apply them to a Perf collection on your target system.Profiler
- Import the generated Linux Perf trace into aVTuneproject and start analysis.Profiler
Select a
VTune
Profiler Analysis Type
VTune
Analysis Type Profiler
VTune
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 TMA methodology. The Memory Access analysis has a set of both core and uncore PMU events needed for memory-related performance metrics (like DRAM bandwidth).
Profiler
Using a native Linux Perf interface to collect all needed low-level PMU events may be complicated, so consider reusing the
VTune
configuration targeted for Perf collection (driverless mode).
Profiler
Run
VTune
Profiler to Get Linux Perf Options for Analysis
VTune
to Get Linux Perf Options for Analysis Profiler
When the
VTune
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
Profiler
<
file. To get a correct set of Perf options, do the following:
result-folder
>/data.0/perfcmd- Install theVTuneon any Linux system with a similar hardware configuration (the same CPU family) as the system where real performance profiling is planned to be run.Profiler
- Run aVTuneanalysis of your interest to generateProfilerperfcmdfile with Perf options:$-cl -r <vtuneresult-folder> -collect <analysis-type> -finalization-mode=none -d 1For example, for the Microarchitecture Exploration run:vtune-cl -r bogus_result -collect uarch-exploration -finalization-mode=none -d 1The<file with all necessary Linux Perf options is generated.result-folder>/data.0/perfcmd
- You do not run any real workload here. The only purpose of this run is to generate theperfcmdfile.
- VTunelicense is not required for this step since you only collect data without opening it.Profiler
- Open theperfcmdfile and copy-paste its content to a Linux Perf command invocation on your real target system.Your Perf tool should contain a patch from https://github.com/torvalds/linux/commit/f92da71280fb8da3a7c489e08a096f0b8715f939#diff-809984534aa420619413fdf4c260605d. 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.
- Run the Linux Perf configuration on your target system.
Import the Linux Perf Trace into a
VTune
Profiler Project
VTune
Project Profiler
- Create aVTuneproject or open an existing one.Profiler
- Click theImport Resulttoolbar button.TheImport File and Create a Resultwindow opens.
- SelectImport a single fileoption and navigate to the Linux Perf trace file.VTuneimports 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.Profiler