From mbrown@esd-mbrown.us.dg.com Mon Jun 9 15:31:48 2003 Received: with ECARTIS (v1.0.0; list kernprof); Mon, 09 Jun 2003 15:31:51 -0700 (PDT) Received: from esd-mbrown.us.dg.com (esd-mbrown.us.dg.com [128.221.165.47]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h59MVl2x018197 for ; Mon, 9 Jun 2003 15:31:47 -0700 Received: from mbrown by esd-mbrown.us.dg.com with local (Exim 3.35 #1 (Debian)) id 19PVAx-0004nV-00; Mon, 09 Jun 2003 18:31:39 -0400 Date: Mon, 9 Jun 2003 18:31:39 -0400 From: Mike Brown To: kernprof@oss.sgi.com, vilayann@mcs.anl.gov Subject: profiling kernel modules... Message-ID: <20030609223138.GA18430@esd-mbrown.us.dg.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-archive-position: 20 X-ecartis-version: Ecartis v1.0.0 Sender: kernprof-bounce@oss.sgi.com Errors-to: kernprof-bounce@oss.sgi.com X-original-sender: mbrown@emc.com Precedence: bulk X-list: kernprof hi, i searched the archives and found that someone else has asked this question, but there didn't seem to be a reply to it. Is there any way to profile kernel modules? Thanks. -Michael F. Brown, EMC Corp. Email: mbrown@emc.com EMC Tie Line: 824 25924 External Line: (508) 382-5924 "5 years from now everyone will be running free GNU on their 200 MIPS, 64M SPARCstation-5." -Andrew Tanenbaum '92 (In late 1997 I installed Linux for the first time on my 200Mhz, 128M AMD x86 clone) From castor@3pardata.com Mon Jun 9 15:39:36 2003 Received: with ECARTIS (v1.0.0; list kernprof); Mon, 09 Jun 2003 15:39:44 -0700 (PDT) Received: from mail.3pardata.com (mail.3par.com [66.126.187.159]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h59MdZ2x018282 for ; Mon, 9 Jun 2003 15:39:36 -0700 Received: from 3PARMAIL.3pardata.com (3pardata.com [192.168.32.30]) by mail.3pardata.com (8.9.3+Sun/8.9.3) with ESMTP id PAA13799; Mon, 9 Jun 2003 15:39:22 -0700 (PDT) Received: from marais (marais.3pardata.com [192.168.16.100]) by 3PARMAIL.3pardata.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id L5FT6FS5; Mon, 9 Jun 2003 15:38:25 -0700 Date: Mon, 9 Jun 2003 15:39:20 -0700 (PDT) From: Castor Fu X-X-Sender: To: Mike Brown cc: , Subject: Re: profiling kernel modules... In-Reply-To: <20030609223138.GA18430@esd-mbrown.us.dg.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 21 X-ecartis-version: Ecartis v1.0.0 Sender: kernprof-bounce@oss.sgi.com Errors-to: kernprof-bounce@oss.sgi.com X-original-sender: castor@3pardata.com Precedence: bulk X-list: kernprof On Mon, 9 Jun 2003, Mike Brown wrote: > hi, > > i searched the archives and found that someone else has asked this question, > but there didn't seem to be a reply to it. > > Is there any way to profile kernel modules? > > Thanks. > > -Michael F. Brown, EMC Corp. If I recall, the main problem is that the various gprof tools don't do too well with segmented memory, so it's fairly easy to hack things to look at either vmalloc'ed memory or normal kmem, and even to save data for both, but to analyze both, you'll need to fix the tools for digesting the resulting profile, or roll your own. -castor From vilayann@mcs.anl.gov Tue Jun 10 08:34:01 2003 Received: with ECARTIS (v1.0.0; list kernprof); Tue, 10 Jun 2003 08:34:12 -0700 (PDT) Received: from mcs.anl.gov (cliff.mcs.anl.gov [140.221.9.17]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5AFY02x009252 for ; Tue, 10 Jun 2003 08:34:01 -0700 Received: from shakey.mcs.anl.gov (shakey.mcs.anl.gov [140.221.9.72]) by mcs.anl.gov (8.11.6/8.9.3) with ESMTP id h5AFXqt35194; Tue, 10 Jun 2003 10:33:52 -0500 Received: from localhost (vilayann@localhost) by shakey.mcs.anl.gov (8.11.0/8.11.0) with ESMTP id h5AFXqf10554; Tue, 10 Jun 2003 10:33:52 -0500 X-Authentication-Warning: shakey.mcs.anl.gov: vilayann owned process doing -bs Date: Tue, 10 Jun 2003 10:33:52 -0500 (CDT) From: Murali Vilayannur To: Mike Brown cc: Castor Fu , kernprof@oss.sgi.com Subject: Re: profiling kernel modules... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 22 X-ecartis-version: Ecartis v1.0.0 Sender: kernprof-bounce@oss.sgi.com Errors-to: kernprof-bounce@oss.sgi.com X-original-sender: vilayann@mcs.anl.gov Precedence: bulk X-list: kernprof Hi, The easier way out for me was to build our module into the kernel. Profiling turned out to be quite easy this way. I havent done too much research on how to hack kernprof to get it to profile kernel modules. Thanks, Murali On Mon, 9 Jun 2003, Castor Fu wrote: > On Mon, 9 Jun 2003, Mike Brown wrote: > > > hi, > > > > i searched the archives and found that someone else has asked this question, > > but there didn't seem to be a reply to it. > > > > Is there any way to profile kernel modules? > > > > Thanks. > > > > -Michael F. Brown, EMC Corp. > > If I recall, the main problem is that the various gprof tools don't > do too well with segmented memory, so it's fairly easy to hack things > to look at either vmalloc'ed memory or normal kmem, and even to save > data for both, but to analyze both, you'll need to fix the tools for > digesting the resulting profile, or roll your own. > > -castor > >