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

Frequently used events in VTUNE

Reshmi_Mitra
Beginner
877 Views
Hi,

I am using:
Intel Xeon X 5365 @ 3.00 GHz
L2 cache: 2X4 MB
L1 cache: Data - 32 KB, Insruction - 32 KB
FSB - 1333 MHz

I have few questions regarding the usage of the tool (VTune):

  1. Is there any particular way of saving the frequently used events or ratios? It is really time-consuming to keep selecting the same ratios multiple times.
  2. Can I save the VTune output data in a text file which a C program can read and process it?
  3. Is there any way I can find out how much total cycles are spent in the division and multiplication operations? I know with DIV & MUL, I can find out the number of operations. But, I need the number of cycles value.
regards,
Reshmi
0 Kudos
8 Replies
Peter_W_Intel
Employee
877 Views
Hi Reshmi,

1. VTune Analyzer provides "Commonly Use" events & event ratios for your creating a new activity. If you have favorite events - please save this activity. Next time you can use "Modifying Activity" to make a copy to create a new activity.

2. The tool can export data from Processes/Threads/Modules/Hotspots Reports and Source View with annotated performance data, but the format is .cvs with "comma delimiter" - which can be opened by Microsoft* Excel. The user may write a small tool to convert it to text file, if they like.

3. Using events DIV & MUL to measure operations in source line or function. The user also canuse CPU_CLK_UNHALTED.CORE to measure CPU cycle. Then the user can know cycles costs (average) for each operation in source line (even in assembly line)

Regards, Peter
0 Kudos
Reshmi_Mitra
Beginner
877 Views
Hi Peter,

I am collecting data for different sizes. So every time I make a change in the C code and create a new executable, I am selecting the events again. In your reply to my first question above,

If you have favorite events - please save this activity.

The list of "Commonly Use" Events is not appearing in my event list (Refer to: commonly_used_events.JPG) Is there any other way to save the data?

Is there a better way to do this?

Thanks in advance,
Reshmi
0 Kudos
Reshmi_Mitra
Beginner
877 Views
Hi,

In regard to your answer in the 3rd question. I am trying to find "average latency" of events causing stalls (e.g. resource contention, mispredicted branches, DIV operations etc.). I am NOT looking for the total stall cycles (as given by RS_UOPS_DISPATCHED.CYCLES_NONE).

I have gone through Np approach mentioned in one of your white papers (Refer Page 5 of attached pdf). Also the list of stall events mentioned in the reference manuals. However, I cannot find the count of number of times the RAT_STALLS.ANY and RESOURCE_STALLS.ANY are occurring. Is there any way to measure these two major classes of stalls?

Also can you tell me (on top level) what is the difference between RAT and Resource stalls? I have read about the details from the manual.

Thanks in advance,
Reshmi
0 Kudos
Reshmi_Mitra
Beginner
877 Views
Hi Peter,

Q: Can I save the VTune output data in a text file which a C program can read and process it?

I am looking for the total number of cache misses, stall cycles, instructions retired (Refer to the attached fig).

I took the Processes/Threads/Modules/Hotspots Reports and Source View route to find the data. However, this is not what I am looking for here. I do not want individual hotspot data.

Is there any way to save data mentioned earlier which a C code can read?

Thanks in advance,
Reshmi
0 Kudos
Peter_W_Intel
Employee
877 Views
Quoting Reshmi Mitra
Hi Peter,

I am collecting data for different sizes. So every time I make a change in the C code and create a new executable, I am selecting the events again. In your reply to my first question above,

If you have favorite events - please save this activity.

The list of "Commonly Use" Events is not appearing in my event list (Refer to: commonly_used_events.JPG) Is there any other way to save the data?

Is there a better way to do this?

Thanks in advance,
Reshmi

Hi Reshmi,

If you created a new executable, you can use existing activity, such as




What I meant for "Commonly Used Events" - which is for Pentium 4, "Basic Performance Tuning Events" for Core 2 Duo, see below



The user can change executable by modifying any activity.



Regards, Peter
0 Kudos
Peter_W_Intel
Employee
877 Views
Quoting Reshmi Mitra

Also can you tell me (on top level) what is the difference between RAT and Resource stalls? I have read about the details from the manual.


RAT_STALLS.ANY includes:
1. Cycles when ROB read port stalls occurred, which did not allow new micro-ops to enter the execution pipe.
2. Cycles when partial register stalls occurred
3. Cycles when flag stalls occurred
4. Cycles FPU status word stall occur

RESOURCE_STALLS.ANY includes:
1. The number of instructions in the pipeline waiting for execution or retirement reached the limit the processor can handle
2. The number of load or store instructions in the pipeline waiting for retirement reached the limit the processor can handle.
3. There is an instruction in the pipe that can be executed only when all previous stores complete and their data is committed in the cache or memory.
4. The pipeline recovers from a mispredicted branch that was executed.
5. FPU control word is written.

0 Kudos
Peter_W_Intel
Employee
877 Views
Quoting Reshmi Mitra
Hi Peter,

Q: Can I save the VTune output data in a text file which a C program can read and process it?

I am looking for the total number of cache misses, stall cycles, instructions retired (Refer to the attached fig).

I took the Processes/Threads/Modules/Hotspots Reports and Source View route to find the data. However, this is not what I am looking for here. I do not want individual hotspot data.

Is there any way to save data mentioned earlier which a C code can read?

Thanks in advance,
Reshmi


What did you mean for "total number of ..."? You can get total numberfor specific module in Modules Report, you can get total numberfor specific function in Hotspots Report.

VTune Analyzer provides "Export" function to save data to file in text (with 'comma' as delimiter)



Regards, Peter

0 Kudos
Reshmi_Mitra
Beginner
877 Views
Hi Peter,

Thanks a lot for your replies. Things seem to be working much better with your assistance.

Reshmi
0 Kudos
Reply