Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Mar 2006 13:30:05 -0500 (EST)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        "Joseph Koshy" <joseph.koshy@gmail.com>
Cc:        Robert Watson <rwatson@freebsd.org>, current@freebsd.org
Subject:   Re: The sixty second pmc howto
Message-ID:  <17440.17965.497455.777452@grasshopper.cs.duke.edu>
In-Reply-To: <84dead720603202346t6fe1e94cve033bf002dffa90a@mail.gmail.com>
References:  <20060223143856.O9642@fledge.watson.org> <17405.53911.686306.362353@grasshopper.cs.duke.edu> <84dead720603202346t6fe1e94cve033bf002dffa90a@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Joseph Koshy writes:
 > >>>> "ag" == "Andrew Gallatin <gallatin@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?17440.17965.497455.777452>