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

[VTune] get latency histogram through command line

e_ds
Novice
632 Views

Hello,

I am using VTune to analyze different applications. I noticed that VTune generates a Latency Histogram in the Memory Access - Memory Usage - Summary tab, as reported here:

Screenshot 2024-04-29 at 11.55.44.png

 

I would like to generate such latency values from command line to run additional analyses; however, I have found no way to that. I also looked at the SQLite DB that VTune creates in the project folder, but it seems that it contains just a portion of latency values within the "dd_memory_access" table.

 

Could you please help me with this issue?

Thank you!

1 Solution
yuzhang3_intel
Moderator
284 Views

 

Just confirmed that there is no way to generate the histogram from cli. I can only suggest “Copy to clipboard” from GUI functionality.

yuzhang3_intel_0-1715003442656.png

 

 

You’ll get such text representation:


Latency Histogram
Latency Loads
0 130039
7 70351099
8 10793237
9 2600780
12 1040312
13 520156
14 2080624
15 1170351
16 1300390
17 650195
18 130039
19 130039
20 390117
23 260078
24 130039
26 130039
29 130039

............

View solution in original post

0 Kudos
9 Replies
yuzhang3_intel
Moderator
586 Views

Do you mean you want to get a latency histogram as well when running other analysis types besides memory-access?

0 Kudos
e_ds
Novice
575 Views

Hello @yuzhang3_intel 

Sorry for the misunderstanding. I would like to know if there is a way get the raw data of the latency histogram from command line. 

 

My goal is to then perform my additional analyses on such data and make charts with different binning widths.

 

Thank you

0 Kudos
yuzhang3_intel
Moderator
569 Views

Understood, let me check.

0 Kudos
e_ds
Novice
555 Views

@yuzhang3_intel

Ok, thank you for help! I'll wait for your answer then.

0 Kudos
yuzhang3_intel
Moderator
519 Views

This is raw data extracted from the VTune macc data based on the timeline. I'm not sure if it is what you expected.

 

$ vtune -R timeline -r r015macc/ -r-k column-by=TotalLatency -r-k bin-count=100

0 Kudos
e_ds
Novice
513 Views

@yuzhang3_intel 

Thank you for the reply. I have executed the command you suggested, but it does not exactly provide what I expected. With this command, I can see the total latency distributed over the timeline of my application according to the number of bins. For instance:

timeBin   Bin Start Time   Bin End Time   Total Latency:Self

---------   ----------------   ---------------   --------------------

0                               0.000              12.015         5,617,298,207

1                             12.015              24.030        1,027,101,981

...

 

However, in order to recreate the latency histogram chart from the Memory Access tab, I suppose I need to have the latency (in clock cycles) of each load instruction. Indeed, if I hover with the mouse the latency histogram, I can see how many loads share the same latency. This is somehow similar to what I found navigating the SQLite DB that VTune creates for a project, where each line of the "dd_memory_access" table contains data about the memory address, cache line, latency, and so on. Unfortunately, as mentioned in my first message, this table seems to contain just a subsample of the overall memory accesses.

 

Do you think it would be possible to extract the latency (in clock cycles) of each load instruction from the VTune command line?

 

Thank you for your help!

0 Kudos
e_ds
Novice
499 Views

@yuzhang3_intel 

Sorry, another quick question related to your reply: how can I list the metrics that the "column-by" flag accepts?
I tried to look at the VTune documentation for that but I found a few metric examples only.

 

Thanks again!

0 Kudos
yuzhang3_intel
Moderator
285 Views

 

Just confirmed that there is no way to generate the histogram from cli. I can only suggest “Copy to clipboard” from GUI functionality.

yuzhang3_intel_0-1715003442656.png

 

 

You’ll get such text representation:


Latency Histogram
Latency Loads
0 130039
7 70351099
8 10793237
9 2600780
12 1040312
13 520156
14 2080624
15 1170351
16 1300390
17 650195
18 130039
19 130039
20 390117
23 260078
24 130039
26 130039
29 130039

............

0 Kudos
e_ds
Novice
270 Views

@yuzhang3_intel 

I see.

I hoped there was a way to generate the histogram data from the cli, but I think this solution is fine too.

 

Thank you for your help!

0 Kudos
Reply