Re: oprofile help

William Cohen <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
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

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.