Steve Lorimer
Steve Lorimer

Reputation: 28659

Libraries for inprocess perf profiling? (Intel performance counters on Linux)

I want to profile an application's critical path by taking readings of the performance counters at various points along the path.

I came across libperf which provides a fairly neat C api. However, the last activity was 3 years ago.

I am also aware of the PAPI. This is under active development.

Upvotes: -1

Views: 458

Answers (3)

BeeOnRope
BeeOnRope

Reputation: 64895

There are several options, among them:

I cover these in more detail in an answer to a related question.

Upvotes: 1

sol
sol

Reputation: 93

Have a look at http://software.intel.com/en-us/articles/intel-performance-counter-monitor-a-better-way-to-measure-cpu-utilization?page=8

VTune however is proprietory, if you want it can serve the purpose. Try its 30 day trial.

perfmon and perfctr can be used for analysis of parts of program but will have to be included in the code itself.

Upvotes: 0

gby
gby

Reputation: 15218

I've used both PAPI (on Solaris) and perf (on Linux) and found it is much easier to record the entire program run and use 'perf-annotate' to see how your critical path is doing rather than trying to measure only the critical path. It's a different approach but it worked well for me.

Also, as someone mentioned at the comments, there is vTune, if you are x86 based. I've never used it myself.

Upvotes: 1

Related Questions