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

Hardware events at each sample @1ms

Onkar
Beginner
845 Views

I have been looking for a way to get hardware events for each sample at a sampling period of 1ms.

I started looking into Intel Vtune as it allows sampling hardware events at 1ms, However, I haven't been able to get the hardware events count for each sample. Intel Vtune provides the accumulated hardware events count for an application but it would be really helpful for me if I could find a way to get the hardware events count at every sample(@1ms).

Following posts are similar to what I am looking for :

https://software.intel.com/en-us/forums/intel-vtune-amplifier-xe/topic/759495

https://software.intel.com/en-us/forums/intel-vtune-amplifier-xe/topic/549597

Any help will be highly appreciated. If you can provide command line commands to get this data it would be really helpful.

I am really stuck at this moment due to the unavailability of these data and I am really looking forward to getting help from you guys. What I need is a timeline or trace of all the actual count of hardware events count. Also, please let me know if this cannot be done in Intel VTune and that I should look into some other tools/utilities.

Thanks!

0 Kudos
1 Solution
Dmitry_R_Intel1
Employee
846 Views

If you need just total raw event values at certain intervals than the easiest option would probably be to use 'emon' tool (it is included into VTune).

The emon is not documented but you can run it with -h option to get build-in help. E.g. running the following command:

emon -C "CPU_CLK_UNHALTED.THREAD,CPU_CLK_UNHALTED.REF_TSC,INST_RETIRED.ANY" -l0 -t0.001 -f emon.out

will do infinite (until Ctrl-C) collection of the 3 events each 1ms and the results will be stored to file emon.out.

The output format is:

<event1>    <TSC>    <cpu0_count>    <cpu1_count>...

<event2>    <TSC>    <cpu0_count>    <cpu1_count>...

...

==========

<event1>    <TSC>    <cpu0_count>    <cpu1_count>...

<event2>    <TSC>    <cpu0_count>    <cpu1_count>...

...

==========

...

View solution in original post

0 Kudos
3 Replies
Dmitry_R_Intel1
Employee
847 Views

If you need just total raw event values at certain intervals than the easiest option would probably be to use 'emon' tool (it is included into VTune).

The emon is not documented but you can run it with -h option to get build-in help. E.g. running the following command:

emon -C "CPU_CLK_UNHALTED.THREAD,CPU_CLK_UNHALTED.REF_TSC,INST_RETIRED.ANY" -l0 -t0.001 -f emon.out

will do infinite (until Ctrl-C) collection of the 3 events each 1ms and the results will be stored to file emon.out.

The output format is:

<event1>    <TSC>    <cpu0_count>    <cpu1_count>...

<event2>    <TSC>    <cpu0_count>    <cpu1_count>...

...

==========

<event1>    <TSC>    <cpu0_count>    <cpu1_count>...

<event2>    <TSC>    <cpu0_count>    <cpu1_count>...

...

==========

...

0 Kudos
Elena_F_Intel
Employee
846 Views

FYI: EMON User's Guide: https://software.intel.com/en-us/download/emon-users-guide 

0 Kudos
Onkar
Beginner
846 Views

Thank you Dmitry and Elena. emon tool is exactly what i was looking for.

0 Kudos
Reply