Using PEBS and Linux Perf to Count the number of C

2019-07-26 05:25发布

I want to do something like this: After 100 million instructions have passed, query the Linux perf HW CPU cycles and record it in a file. I want to use this code to characterize the performance of applications/benchmark programs during different phases of program execution.

I have a hint that I need to setup Intel PEBS which overflows after 100 million instructions have passed and query the linux perf counters HW cpu cycles counter.

Any pointer on where to start and if someone has already done that. I want to do this in a low overhead manner. I will write the code in C/C++.

Regards...

0条回答
登录 后发表回答