The sixty second pmc howto
Andrew Gallatin
gallatin at cs.duke.edu
Tue Mar 21 18:30:18 UTC 2006
Joseph Koshy writes:
> >>>> "ag" == "Andrew Gallatin <gallatin at cs.duke.edu>" said:
>
> ag> My only problem with hwpmc is that it will not work for kernel
> ag> modules.
>
> The following patch implements support for profiling of
> dynamically loaded kernel modules and dlopen()'ed (userland)
> shared objects.
Cool! It seems to work, though not the way I was hoping for :(
When I profile my module, I do:
% sudo pmcstat -S unhalted-cycles -O sample.out
% pmcstat -R sample.out -g
This leaves me with one .gmon file for each loaded module:
% ls -l k8-bu-cpu-clk-unhalted/
total 1566
-rw-r--r-- 1 gallatin wheel 19070 Mar 21 13:11 hwpmc.ko.gmon
-rw-r--r-- 1 gallatin wheel 8892 Mar 21 13:11
if_myri10ge.ko.gmon
-rw-r--r-- 1 gallatin wheel 1547196 Mar 21 13:11 kernel.gmon
For a few modules, I suppose it is OK. But it makes it hard to
see the "big picture" when a number of modules are loaded.
Is there any chance you have enough information to hack
together a view similar to oprofile's opreport -l? Or
(even better) opreport -ld
Drew
More information about the freebsd-current
mailing list