Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5135 Discussions

VTune GUI report not matching report generated by command line

Humphrey_B
Beginner
1,693 Views
My goal is to extract the data displayed in the GUI, but using the command line. I want to build a program that automatically runs VTune many times and extracts the relevant data.
The view I want to get data from is this:
Humphrey_B_0-1730382091607.png

 

I want, for each block and its instructions and its effective time against each instruction.
However, when I use the following command:
vtune -report hotspots -r 2024_10_31_11_17_40_QueensgetRowColumn_10_1 -source-object function=Queens::getRowColumn -group-by=basic-block,address -column=block,"CPU Time:Effective Time:Self",assembly

The generated result is the following:
Humphrey_B_1-1730382091608.png

 

As you can see, the times don't match at all. And many instructions are missing their times
This is a report on the same run/data as the GUI, but the GUI is clearly doing something extra to get its numbers.
Would anybody know what I am doing wrong? I assume there is a problem with my report command.
Many thanks,
Humphrey

The run command the GUI is using is as follows:
vtune -collect hotspots -knob sampling-mode=hw -knob enable-stack-collection=true -knob stack-size=4096 --app-working-dir=/home/hb478/repos/are-we-fast-yet/benchmarks/Java/src -- atest_graalvm_home/bin/java -Djdk.graal.LIRGTSlowDown=false -Djdk.graal.GTMarkBasicBlocks=true -Djdk.graal.LIRBlockSlowdownFileName=BlockSlowdown1.json -XX:+UseJVMCICompiler -XX:+UseJVMCINativeLibrary -XX:-TieredCompilation '-XX:CompileCommand=dontinline,*::*' -Djdk.graal.TrivialInliningSize=0 -XX:-BackgroundCompilation Harness Queens 500 5000
Labels (1)
0 Kudos
8 Replies
yuzhang3_intel
Moderator
1,680 Views

Did you try with 2025.0?

In 2025.0, VTune GUI now includes the ability to generate report commands from the grid views below. For example, you can set grouping and sorting for the data you want to see:

yuzhang3_intel_0-1730382990056.png

 

 

vtune -report exec-query -rep-knob row-by="/Module/Function/FunctionRange/ParentCallStack" -sort-desc "CPU Time:Self" -rep-knob column-by="ViewpointGUIandCLIColumns" -r <result_dir>

0 Kudos
Humphrey_B
Beginner
1,441 Views

Thank you for your reply. I was running VTune 2024, but I have since updated it to 2025. I tried rerunning everything, but the command I use still produces different times than the data provided by the GUI.

I tried using the command you provided:
vtune -report exec-query -rep-knob row-by="/Module/Function/FunctionRange/ParentCallStack" -sort-desc "CPU Time:Self" -rep-knob column-by="ViewpointGUIandCLIColumns" -r <result_dir>

his works, but in my case, I want to see the assembler by block for a method and the associated time for each instruction or block—the same data available in the GUI.

Any help with command for this?

Many thanks

Humphrey



0 Kudos
yuzhang3_intel
Moderator
625 Views

Have you checked the assembly code for the source you specify below?

-source-object function=Queens::getRowColumn

 

I use a similar command line to get assembly information, it looks it works.

vtune -report hotspots -r ./r000hs -source-object function=multiply1 -group-by=basic-block,address -column=block,"CPU Time:Effective Time:Self",Assembly

 

yuzhang3_intel_1-1730643390896.png

yuzhang3_intel_0-1730643310516.png

 

 

0 Kudos
Humphrey_B
Beginner
602 Views

Thank you for the suggestion. I tried adding source lines to the filter, and as you can see, the source lines don't match the GUI view, and many of them are labeled as [Unknown]:

Humphrey_B_0-1730657509145.png

 

This is clearly a strange problem because both the GUI and the command-line actions are looking at the same data, but they have different data numbers.


I have since tried playing around with lots of options to get this to work. Strangely, I have found that if I run VTune against a Java program that does not contain extra debug information (so I don't compile with -g), VTune no longer has source code references, but all of the timings for the assembler match on both the command-line version and the GUI.

This seems very strange, but at the moment, that's all I need. However, this does seem to be a bug relating to how VTune connects the assembler/source to the debug information.

0 Kudos
yuzhang3_intel
Moderator
580 Views

You mean the cmd report works when profiling a program w/o debug information, right?  Your program is developed by Java? Could you share the compilation command line without debug information?  Thanks.

0 Kudos
Humphrey_B
Beginner
560 Views

So if I compile my program with javac MyProgram.java, no debugging information is included in the .class file, and VTune cannot find the source for the program, whether I use the GUI or command-line report.

However, the command-line assembly report is accurate and matches exactly the same information that the GUI reports.

If I compile my program with javac -g MyProgram.java, which includes debugging information in the .class file, the GUI can see the source and accurately report where CPU time is spent in the assembler. However, the command-line report does not seem to "see" this information, and the timings are inaccurate. This issue is what I'm describing in the first post of this thread.

0 Kudos
yuzhang3_intel
Moderator
522 Views

Thanks reporting the issue, we need to do a deeper investigation. Thanks.

0 Kudos
yuzhang3_intel
Moderator
303 Views

I would suggest to try to use ‘source-search-dir’ option in cli and provide path to source files, maybe just cli vtune cannot find path to sources.
https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2024-1/source-search-dir.html

0 Kudos
Reply