2.6.17.1 new perfmon code base, libpfm, pfmon available
Quoted 11 lines
Also a new version of pfmon, pfmon-3.2-060621, to take advantage of the update in libpfm:
- support for 32-bit mode AMD64 processors
- updated event name parsing to prepare for separate
event unit mask management (Kevin Corry)
- fix the detection of unavailable PMC registers. it was causing crashes when used with sampling.Note that I have tested 32-bit compiled libpfm,pfmon running on an 64-bit AMD perfmon kernel. I have not tested on a 32-bit AMD linux kernel because I don't have such setup. I would appreciate any feedback on this.
32-bit works great. Unfortunately, pfmon is far too limited for serious kernel monitoring AFAICT. E.g. you can't select edge counting instead of cycle counting. So you can count how many clock cycles were spent with interrupts disabled but you can't count how many times they were disabled. That's too bad because using pfmon is so easy compared to writing a program.
And is someone working on kernel profiling tools that use the perfmon2 infrastructure on i386? I'd like to see kernel-based profiling that lets you use something like the existing 'readprofile' to retrieve results. This would be a lot better than the current timer-based profiling.
Signature · 2 lines
Chuck "You can't read a newspaper if you can't read." --George W. Bush
Quoted 2 lines · Chuck Ebbert
32-bit works great. Unfortunately, pfmon is far too limited for serious kernel monitoring AFAICT.
I think "far too limited for serious kernel monitoring" is not a fair statement. One can do some very interesting things as I presented two years ago at OLS:
http://iou.parisc-linux.org/ols_2004/pfmon_for_iodorks.pdf
It's just a _very_ complex subsystem and has a steep learning curve to do some of the more complex things that one might like.
Quoted 4 lines
E.g. you can't select edge counting instead
of cycle counting. So you can count how many clock cycles were spent with interrupts disabled but you can't count how many times they were disabled.
At first glance, this example sounds more like a limitation of the HW and not the SW.
Quoted 4 lines
And is someone working on kernel profiling tools that use the perfmon2 infrastructure on i386? I'd like to see kernel-based profiling that lets you use something like the existing 'readprofile' to retrieve results. This would be a lot better than the current timer-based profiling.
Both are useful. I wouldn't say one of necessarily better. FWIW, the "CPU_CYCLES" counts from pfmon aren't timer based on ia64. AFAIK, the HW counters are sampled to gather those counts.
thanks,
grant
Chuck,
Quoted 8 lines · Chuck Ebbert
Quoted 8 lines
Also a new version of pfmon, pfmon-3.2-060621, to take advantage of the update in libpfm:
- support for 32-bit mode AMD64 processors
- updated event name parsing to prepare for separate
event unit mask management (Kevin Corry)
- fix the detection of unavailable PMC registers. it was causing crashes when used with sampling.
Quoted 7 lines
Quoted 3 lines
Note that I have tested 32-bit compiled libpfm,pfmon running on an 64-bit AMD perfmon kernel. I have not tested on a 32-bit AMD linux kernel because I don't have such setup. I would appreciate any feedback on this.
32-bit works great. Unfortunately, pfmon is far too limited for serious kernel monitoring AFAICT. E.g. you can't select edge counting instead of cycle counting. So you can count how many clock cycles were spent with interrupts
I put in an option to enable this mode, do pfmon --help. I think it's called edge-mask.
Quoted 3 lines
disabled but you can't count how many times they were disabled. That's too bad because using pfmon is so easy compared to writing a program.
Try the option, and let me know if it does not work for you.
Quoted 5 lines
And is someone working on kernel profiling tools that use the perfmon2 infrastructure on i386? I'd like to see kernel-based profiling that lets you use something like the existing 'readprofile' to retrieve results. This would be a lot better than the current timer-based profiling.
You can do this on your athlon using pfmon already, you need to enable a different sampling module. Here is an example:
$ pfmon --smpl-module=inst-hist -ecpu_clk_unhalted -k --long-smpl-period0000 \
--resolve-addr --system-wide --session-timeoutThis will sample (period of 100,000 cpu_clk_unhalted) in the kernel ONLY for 10s and print a flat profile sorted by #samples/instruction addresses. You can chose any event you want. Note that you can also use this output format in per-thread mode.
Hope this helps.
Signature · 1 line
-Stephane