Intel® VTune™ Amplifier does not currently include the capability of generating visual call graphs of analyzed applications, as it provides many other means of viewing and interacting with data. However, there are ways to create these graphs, and since many developers like to use such visualizations, we have documented a method of creating them that works on both Windows* and Linux* operating systems. However, this approach relies on some third-party tools and is therefore not officially supported.
Step 1: Prepare Your Environment
First, download the third party tools, gprof2dot.py and Graphviz. The former is a script that converts gprof-type files (which VTune Amplifier can produce) into dot format, which the latter can convert into images. In order to call Graphviz with the "dot" command instead of the whole path to the executable, you may need to manually add it to your PATH environment variable. You will also need to have Python installed on your machine in order to use the .py script.
Here we will demonstrate call graph generation using the tachyon sample that ships with VTune Amplifier, which has been built straight out of the box. In this example, the balls.dat file (as well as the gprof2dot.py script) have been moved to the same directory as find_hotspots.exe for the sake of convenience.
Step 2: Collect and Prepare VTune Amplifier Results
Run a Hotspots analysis as normal.
amplxe-cl --collect=hotspots --result-dir=result -- find_hotspots.exe balls.dat
Then convert it into a gprof-like format.
amplxe-cl --report=gprof-cc --result-dir=result --format=text --report-output=result.txt
The resulting file should look something like this:
Step 3: Generate the Graph
Use the python script to convert this file into a dot format, and pipe that output into the Graphviz tool to create the .PNG file.
python gprof2dot.py -f axe result.txt | dot -T png -o graph.png
Here is a small section of the resulting image: