From owner-kernprof@oss.sgi.com Tue Mar 5 14:40:29 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g25MeTX20027 for kernprof-outgoing; Tue, 5 Mar 2002 14:40:29 -0800 Received: from e21.nc.us.ibm.com (e21.nc.us.ibm.com [32.97.136.227]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g25MeD920017 for ; Tue, 5 Mar 2002 14:40:13 -0800 Received: from southrelay03.raleigh.ibm.com (southrelay03.raleigh.us.ibm.com [9.37.3.210]) by e21.nc.us.ibm.com (8.9.3/8.9.3) with ESMTP id PAA13054; Tue, 5 Mar 2002 15:34:46 -0600 Received: from dyn9-47-17-104.des.beaverton.ibm.com (dyn9-47-17-104.des.beaverton.ibm.com [9.47.17.104]) by southrelay03.raleigh.ibm.com (8.11.1m3/NCO/VER6.00) with ESMTP id g25Le3R244460; Tue, 5 Mar 2002 16:40:03 -0500 Received: (from garyh@localhost) by localhost.localdomain (8.11.2/8.11.2) id g25L0aE01273; Tue, 5 Mar 2002 13:00:36 -0800 X-Authentication-Warning: localhost.localdomain: garyh set sender to garyhade@us.ibm.com using -f Date: Tue, 5 Mar 2002 13:00:36 -0800 From: Gary Hade To: John Hawkes Cc: "Cameron, Steve" , kernprof@oss.sgi.com Subject: Re: 2.4.16 kernel, 0.10.3 profiler, 2.96 gcc, insmod -> unresolved symbol mcount Message-ID: <20020305130035.A1096@us.ibm.com> References: <45B36A38D959B44CB032DA427A6E10640167CF00@cceexc18.americas.cpqcorp.net> <006501c17925$eaa690e0$6801a8c0@wrlarun> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <006501c17925$eaa690e0$6801a8c0@wrlarun>; from hawkes@sgi.com on Thu, Nov 29, 2001 at 02:33:49PM -0800 Sender: owner-kernprof@oss.sgi.com Precedence: bulk On Thu, Nov 29, 2001 at 02:33:49PM -0800, John Hawkes wrote: > From: "Cameron, Steve" > > Doing "insmod anymodule" I get > > > > unresolved symbol mcount > > > > (Though all my looking through the code, I can't see how > > mcount can possibly be unresolved, > > (e.g. nm vmlinux shows it as "T", in the text) > > > > I have patched 2.4.16 with the profiler patch 0.10.3,(for 2.4.14) > > (small mismatch in sched.c, but no big deal to fix, and some > > rejects in ia64 and sparc land that I ignored, as I'm > > in i386 land.) > > I've just done pretty much the same thing -- 0.10.4 massaged to patch > 2.4.16 -- and I'm not seeing this same insmod problem. Are you sure you > compiled your kernel with CONFIG_MCOUNT? > > John Hawkes > hawkes@sgi.com > > John, I encountered this problem using the 2.4.17 patch. It happens when module version support is enabled (CONFIG_MODVERSIONS=y). e.g. Script started on Tue Mar 5 10:49:37 2002 % % /sbin/insmod eepro100 Using /lib/modules/2.4.17/kernel/drivers/net/eepro100.o /lib/modules/2.4.17/kernel/drivers/net/eepro100.o: unresolved symbol mcount % % nm /lib/modules/2.4.17/kernel/drivers/net/eepro100.o | grep mcount U mcount % % grep mcount /proc/ksyms c02076a0 mcount_R__ver_mcount c024242c mcount_hook_R7370f89d c0242434 prof_have_mcount_Rdd6f69db % % exit exit Script done on Tue Mar 5 10:50:41 2002 A fix is included below. Gary -- Gary Hade IBM Linux Technology Center 503-578-4503 IBM T/L: 775-4503 garyhade@us.ibm.com http://www.ibm.com/linux/ltc --- arch/i386/kernel/i386_ksyms.c.orig Mon Mar 4 15:16:28 2002 +++ arch/i386/kernel/i386_ksyms.c Tue Mar 5 11:19:52 2002 @@ -170,7 +170,7 @@ #if defined(CONFIG_MCOUNT) extern void mcount(void); -EXPORT_SYMBOL(mcount); +EXPORT_SYMBOL_NOVERS(mcount); #endif /* CONFIG_MCOUNT */ #ifdef CONFIG_HAVE_DEC_LOCK --- arch/ia64/kernel/ia64_ksyms.c.orig Tue Mar 5 11:09:19 2002 +++ arch/ia64/kernel/ia64_ksyms.c Tue Mar 5 11:19:52 2002 @@ -150,5 +150,5 @@ #if defined(CONFIG_MCOUNT) extern void _mcount(void); -EXPORT_SYMBOL(_mcount); +EXPORT_SYMBOL_NOVERS(_mcount); #endif --- arch/mips64/kernel/mips64_ksyms.c.orig Tue Mar 5 11:10:30 2002 +++ arch/mips64/kernel/mips64_ksyms.c Tue Mar 5 11:19:52 2002 @@ -122,5 +122,5 @@ #if defined(CONFIG_MCOUNT) extern void _mcount(void); -EXPORT_SYMBOL(_mcount); +EXPORT_SYMBOL_NOVERS(_mcount); #endif --- arch/sparc64/kernel/sparc64_ksyms.c.orig Tue Mar 5 11:11:30 2002 +++ arch/sparc64/kernel/sparc64_ksyms.c Tue Mar 5 11:19:52 2002 @@ -139,7 +139,7 @@ EXPORT_SYMBOL(setup_profiling_timer); #if defined(CONFIG_MCOUNT) extern void mcount(void); -EXPORT_SYMBOL(mcount); +EXPORT_SYMBOL_NOVERS(mcount); #endif #endif From owner-kernprof@oss.sgi.com Tue Mar 5 15:14:04 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g25NE4f20481 for kernprof-outgoing; Tue, 5 Mar 2002 15:14:04 -0800 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.130]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g25NDm920475 for ; Tue, 5 Mar 2002 15:13:48 -0800 Received: from westrelay03.boulder.ibm.com (westrelay03.boulder.us.ibm.com [9.99.140.24]) by e32.co.us.ibm.com (8.9.3/8.9.3) with ESMTP id RAA78890; Tue, 5 Mar 2002 17:10:25 -0500 Received: from dyn9-47-17-104.des.beaverton.ibm.com (dyn9-47-17-104.des.beaverton.ibm.com [9.47.17.104]) by westrelay03.boulder.ibm.com (8.11.1m3/NCO/VER6.00) with ESMTP id g25MDft151176; Tue, 5 Mar 2002 15:13:41 -0700 Received: (from garyh@localhost) by dyn9-47-17-104.des.beaverton.ibm.com (8.11.2/8.11.2) id g25MEhw05373; Tue, 5 Mar 2002 14:14:43 -0800 X-Authentication-Warning: dyn9-47-17-104.des.beaverton.ibm.com: garyh set sender to garyhade@us.ibm.com using -f Date: Tue, 5 Mar 2002 14:14:43 -0800 From: Gary Hade To: John Hawkes Cc: "Cameron, Steve" , kernprof@oss.sgi.com Subject: Re: 2.4.16 kernel, 0.10.3 profiler, 2.96 gcc, insmod -> unresolved symbol mcount Message-ID: <20020305141443.A4324@us.ibm.com> References: <45B36A38D959B44CB032DA427A6E10640167CF00@cceexc18.americas.cpqcorp.net> <006501c17925$eaa690e0$6801a8c0@wrlarun> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <006501c17925$eaa690e0$6801a8c0@wrlarun>; from hawkes@sgi.com on Thu, Nov 29, 2001 at 02:33:49PM -0800 Sender: owner-kernprof@oss.sgi.com Precedence: bulk On Thu, Nov 29, 2001 at 02:33:49PM -0800, John Hawkes wrote: > From: "Cameron, Steve" > > Doing "insmod anymodule" I get > > > > unresolved symbol mcount > > > > (Though all my looking through the code, I can't see how > > mcount can possibly be unresolved, > > (e.g. nm vmlinux shows it as "T", in the text) > > > > I have patched 2.4.16 with the profiler patch 0.10.3,(for 2.4.14) > > (small mismatch in sched.c, but no big deal to fix, and some > > rejects in ia64 and sparc land that I ignored, as I'm > > in i386 land.) > > I've just done pretty much the same thing -- 0.10.4 massaged to patch > 2.4.16 -- and I'm not seeing this same insmod problem. Are you sure you > compiled your kernel with CONFIG_MCOUNT? > > John Hawkes > hawkes@sgi.com > > John, I encountered this problem using the 2.4.17 patch. It happens when module version support is enabled (CONFIG_MODVERSIONS=y). e.g. Script started on Tue Mar 5 10:49:37 2002 % % /sbin/insmod eepro100 Using /lib/modules/2.4.17/kernel/drivers/net/eepro100.o /lib/modules/2.4.17/kernel/drivers/net/eepro100.o: unresolved symbol mcount % % nm /lib/modules/2.4.17/kernel/drivers/net/eepro100.o | grep mcount U mcount % % grep mcount /proc/ksyms c02076a0 mcount_R__ver_mcount c024242c mcount_hook_R7370f89d c0242434 prof_have_mcount_Rdd6f69db % % exit exit Script done on Tue Mar 5 10:50:41 2002 A fix is included below. Gary -- Gary Hade IBM Linux Technology Center 503-578-4503 IBM T/L: 775-4503 garyhade@us.ibm.com http://www.ibm.com/linux/ltc --- arch/i386/kernel/i386_ksyms.c.orig Mon Mar 4 15:16:28 2002 +++ arch/i386/kernel/i386_ksyms.c Tue Mar 5 11:19:52 2002 @@ -170,7 +170,7 @@ #if defined(CONFIG_MCOUNT) extern void mcount(void); -EXPORT_SYMBOL(mcount); +EXPORT_SYMBOL_NOVERS(mcount); #endif /* CONFIG_MCOUNT */ #ifdef CONFIG_HAVE_DEC_LOCK --- arch/ia64/kernel/ia64_ksyms.c.orig Tue Mar 5 11:09:19 2002 +++ arch/ia64/kernel/ia64_ksyms.c Tue Mar 5 11:19:52 2002 @@ -150,5 +150,5 @@ #if defined(CONFIG_MCOUNT) extern void _mcount(void); -EXPORT_SYMBOL(_mcount); +EXPORT_SYMBOL_NOVERS(_mcount); #endif --- arch/mips64/kernel/mips64_ksyms.c.orig Tue Mar 5 11:10:30 2002 +++ arch/mips64/kernel/mips64_ksyms.c Tue Mar 5 11:19:52 2002 @@ -122,5 +122,5 @@ #if defined(CONFIG_MCOUNT) extern void _mcount(void); -EXPORT_SYMBOL(_mcount); +EXPORT_SYMBOL_NOVERS(_mcount); #endif --- arch/sparc64/kernel/sparc64_ksyms.c.orig Tue Mar 5 11:11:30 2002 +++ arch/sparc64/kernel/sparc64_ksyms.c Tue Mar 5 11:19:52 2002 @@ -139,7 +139,7 @@ EXPORT_SYMBOL(setup_profiling_timer); #if defined(CONFIG_MCOUNT) extern void mcount(void); -EXPORT_SYMBOL(mcount); +EXPORT_SYMBOL_NOVERS(mcount); #endif #endif From owner-kernprof@oss.sgi.com Tue Mar 12 10:16:27 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g2CIGRT15493 for kernprof-outgoing; Tue, 12 Mar 2002 10:16:27 -0800 Received: from hugin.diku.dk (qmailr@hugin.diku.dk [130.225.96.144]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g2CIGJ915489 for ; Tue, 12 Mar 2002 10:16:20 -0800 Received: (qmail 12854 invoked from network); 12 Mar 2002 16:29:28 -0000 Received: from tyr.diku.dk (hall@130.225.96.226) by hugin.diku.dk with QMQP; 12 Mar 2002 16:29:28 -0000 Date: Tue, 12 Mar 2002 17:29:28 +0100 From: "Christoffer H.-Frederiksen" To: kernprof@oss.sgi.com Subject: kernproc on 2.5.? Message-ID: <20020312172928.A19525@diku.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.23i Sender: owner-kernprof@oss.sgi.com Precedence: bulk I have tried to get kernproc to run on kernel 2.5.{3,6} without much success. Is kernproc at all working for the 2.5 series? I've used kernproc for 2.4.17 with great sucess, but I can't get more than simple pc-sampling to work on 2.5.3. This would lead to the question of mcount and gcc. I've compiled the kernel with both the redhat 2.96 compiler and the redhat gcc3 compiler (3.0.4). None of them produce a kernel from which I can get any profiling data (other that pc-sampling with kernprof -i). I've examined the 3.0.4 source code and the gcc-patch from the sgi ftp-site and the patch doesn't seem relevant for 3.0.4. Am I correct? The kernel boots and kernprof seems to be able to use /dev/profile. It doesn't complain about it and the device-files are there (with the right major/minor numbers). ============================================================ [root@harry root]# ls -laF /dev/profile* crw-r--r-- 1 root root 192, 0 Mar 13 14:50 /dev/profile crw-r--r-- 1 root root 192, 1 Mar 13 16:36 /dev/profile0 crw-r--r-- 1 root root 192, 2 Mar 13 16:36 /dev/profile1 [root@harry root]# ============================================================ When I run the following sequence of programs ============================================================ ./kernprof -m /boot/System.map-2.5.6 -e ./kernprof -m /boot/System.map-2.5.6 -r ./kernprof -m /boot/System.map-2.5.6 -b pc ./iozone -k 1 -r 8k -i 0 -s 100m -e ./kernprof -m /boot/System.map-2.5.6 -g -o gmon.1req ./kernprof -m /boot/System.map-2.5.6 -e ============================================================ I just get the following output from kernprof ============================================================ Total call trace count: 0 Input call graph records: 0 CPU-0 call graph records: 0 Merged call graph records: 0 Output call graph records: 0 ============================================================ And gprof complains that gmon.1req doesn't contain call-graph information. Have anybody got a good solution for this? PS: I am currently compiling gcc-2.95.3 (with patch) to try that ;) -- Christoffer From owner-kernprof@oss.sgi.com Tue Mar 12 11:08:53 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g2CJ8rb17523 for kernprof-outgoing; Tue, 12 Mar 2002 11:08:53 -0800 Received: from hugin.diku.dk (qmailr@hugin.diku.dk [130.225.96.144]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g2CJ8p917520 for ; Tue, 12 Mar 2002 11:08:52 -0800 Received: (qmail 2990 invoked from network); 12 Mar 2002 18:08:50 -0000 Received: from tyr.diku.dk (hall@130.225.96.226) by hugin.diku.dk with QMQP; 12 Mar 2002 18:08:50 -0000 Date: Tue, 12 Mar 2002 19:08:50 +0100 From: "Christoffer H.-Frederiksen" To: kernprof@oss.sgi.com Subject: Re: kernproc on 2.5.? Message-ID: <20020312190850.A26511@diku.dk> References: <20020312172928.A19525@diku.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020312172928.A19525@diku.dk> User-Agent: Mutt/1.3.23i Sender: owner-kernprof@oss.sgi.com Precedence: bulk That didn't help either ;( On Tue, Mar 12, 2002 at 05:29:28PM +0100, Christoffer H.-Frederiksen wrote: |> |> PS: I am currently compiling gcc-2.95.3 (with patch) to try that ;) -- Christoffer From owner-kernprof@oss.sgi.com Thu Mar 28 09:32:01 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g2SHW1l13523 for kernprof-outgoing; Thu, 28 Mar 2002 09:32:01 -0800 Received: from zcamail04.zca.compaq.com (zcamail04.zca.compaq.com [161.114.32.104]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g2SHVxq13520 for ; Thu, 28 Mar 2002 09:31:59 -0800 Received: from cacexg12.americas.cpqcorp.net (cacexg12.americas.cpqcorp.net [16.105.250.84]) by zcamail04.zca.compaq.com (Postfix) with ESMTP id ADAA916EC for ; Thu, 28 Mar 2002 09:38:14 -0800 (PST) Received: from txnexc01.americas.cpqcorp.net ([16.74.7.244]) by cacexg12.americas.cpqcorp.net with Microsoft SMTPSVC(5.0.2195.2966); Thu, 28 Mar 2002 09:34:12 -0800 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" x-mimeole: Produced By Microsoft Exchange V6.0.5762.3 Subject: missing patch to 2.4.7 Date: Thu, 28 Mar 2002 11:34:11 -0600 Message-ID: <717252EC3E37AE4392E2614EA24E9F2BF76118@txnexc01.americas.cpqcorp.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: missing patch to 2.4.7 Thread-Index: AcHWfsRp5htA1PhISZ6/puH56WUwFg== From: "Rayaprolu, Kameshwara" To: X-OriginalArrivalTime: 28 Mar 2002 17:34:13.0130 (UTC) FILETIME=[C6B8AEA0:01C1D67E] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id g2SHVxq13521 Sender: owner-kernprof@oss.sgi.com Precedence: bulk Hi I see that the kernel profiling patch is missing for the linux 2.4.7 kernel which comes default with Redhat 7.2. Can anyone advise me on whether there is an equivalent patch which I can add and profile ? I tried both 2.4.6 and 2.4.8 profiling patches with no luck. Any other inputs are welcome ? Thanks Kamesh