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

Hardware events at each sample @1ms

Onkar
初学者
1,264 次查看

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 项奖励
1 解答
Dmitry_R_Intel1
1,265 次查看

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 项奖励
3 回复数
Dmitry_R_Intel1
1,266 次查看

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 项奖励
Elena_F_Intel
员工
1,265 次查看

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

0 项奖励
Onkar
初学者
1,265 次查看

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

0 项奖励
回复