From: William C. <wc...@re...> - 2015-03-05 19:32:27
|
On 03/05/2015 04:17 AM, Ankur Sharma wrote: > Hi, > > Is their an alternative to legacy opcontrol —start and —stop in present version? I want to count hardware events for small portion of the program. > > Sincere regards > Ankur Hi Ankur, There is the ocount command in newer versions of oprofile, but that still collects data for the duration of program execution. oprofile doesn't have the ability to turn on and off data collection for specific segments of code. You might look at libpfm or papi to instrument a program to collect measurement for a specific region of code. Both of them have examples showing how to implement the operation you are interested in. http://perfmon2.sourceforge.net/ http://icl.cs.utk.edu/papi/ -Will |