Results 1 to 2 of 2
Hi,
I would like to use the perf tools under linux-2.6.xx/tools/perf to create a trace file. I want to dump out some hardware counters using the perf trace function. Here's ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-14-2011 #1Just Joined!
- Join Date
- Mar 2011
- Posts
- 2
Using perf to create traces
Hi,
I would like to use the perf tools under linux-2.6.xx/tools/perf to create a trace file. I want to dump out some hardware counters using the perf trace function. Here's the problem:
I execute these instructions:
./perf record -R -a -e power
ower_start
./perf trace -g perl
which would generate a perf-trace.pl file which reads perf.data and calls a subroutine power:
ower_start everytime that event occurs.
But when I try:
./perf record -R -a -e instructions
./perf trace -g perl
it doesn't work the same. It seems that the perf trace -g perl function only works for Tracepoint events. All the tracepoint events are listed in ./perf list
My question is how do I create an interrupt when instruction counts = x. Inside this interrupt, I want to dump out the time, processor's cstate, and cache-misses.
Thanks all
- 03-21-2011 #2Just Joined!
- Join Date
- Mar 2011
- Posts
- 2
In essence, all I want to do is this:
Performance counters are special hardware registers available on most modern
CPUs. These registers count the number of certain types of hw events: such
as instructions executed, cachemisses suffered, or branches mis-predicted -
without slowing down the kernel or applications. These registers can also
trigger interrupts when a threshold number of events have passed - and can
thus be used to profile the code that runs on that CPU.
Which is the first paragraph of this document:
lxr.free-electrons[dot]com/source/tools/perf/design.txt]Linux/tools/perf/design.txt


Reply With Quote
