Using PEBS and Linux Perf to Count the number of CPU cycles passed to execute X number of instructions
问题 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