From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 15402 invoked from network); 17 May 1998 21:25:56 -0000 Received: from rachael.franken.de (193.175.24.38) by mail2.redhat.com with SMTP; 17 May 1998 21:25:56 -0000 Received: from hub-fue by rachael.franken.de via rmail with uucp id for redhat.com!axp-list; Sun, 17 May 1998 23:07:55 +0200 (MET DST) (Smail-3.2 1996-Jul-4 #4 built DST-Sep-8) Received: by hub-fue.franken.de (Smail3.1.29.1 #35) id m0ybAwD-002PT3C; Sun, 17 May 98 23:25 MET DST Received: (from tsbogend@localhost) by alpha.franken.de (8.8.7/8.8.5) id XAA00551; Sun, 17 May 1998 23:19:58 +0200 Message-ID: <19980517231957.33622@alpha.franken.de> Date: Sun, 17 May 1998 23:19:57 +0200 From: Thomas Bogendoerfer To: Linus Torvalds Cc: linux-kernel@vger.rutgers.edu, linux-alpha@vger.rutgers.edu, axp-list@redhat.com Subject: Re: kernel profiling in 2.1 ? References: <19980517132147.20573@alpha.franken.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.85 In-Reply-To: ; from Linus Torvalds on Sun, May 17, 1998 at 11:36:54AM -0700 On Sun, May 17, 1998 at 11:36:54AM -0700, Linus Torvalds wrote: > It may be that the non-x86 profiling was broken - the profiling code was > moved into architecture-specific code in order to get it right on SMP. It > definitely works on x86, I'm using it occasionally (and it's sad how much > time is spent getting the kernel lock). ok, I forgot to grep the .h, so I missed the x86 profile implementation. But for the alpha there is (was) no profiling. I just adapted the x86 version, and it works. Now to my problem with the sluggishness of my machine. I realized, that when the kernel gets gzipped the mouse pointer under X freezes for as long as gzip runs. So I did a gzip < /dev/zero > /dev/null and was really surprised, when the whole machine stopped. I couldn't stop the process, login via ethernet, nothing. I had to reset it. Another thing, which halts the machine for some seconds (and terminates by itself) is something like dd if=/dev/zero of=/dev/null count=1000000. The profile of such a dd run, doesn't show anything strange: 11 do_wp_page 0.0105 18 ret_from_sys_call 0.5625 19 loop 1.1875 45 write_null 5.6250 49 ret_from_reschedule 1.5312 84 ret_from_handle_bh 7.0000 238 sys_read 0.4648 308 restore_all 2.2000 408 read_zero 0.5050 422 entSys 2.1979 462 sys_write 0.7500 697 __copy_user 1.4893 2828 total 0.0020 Any idea ? Thomas. PS: profiling patch for Alpha Index: time.c =================================================================== RCS file: /usr/src/cvs/linux/arch/alpha/kernel/time.c,v retrieving revision 1.1.1.7 diff -u -r1.1.1.7 time.c --- time.c 1998/05/10 21:12:24 1.1.1.7 +++ time.c 1998/05/17 21:07:30 @@ -90,6 +90,26 @@ smp_percpu_timer_interrupt(regs); if (smp_processor_id() != boot_cpu_id) return; +#else +#ifdef CONFIG_PROFILE + if(!user_mode(regs)) { + if (prof_buffer && current->pid) { + extern int _stext; + unsigned long pc = regs->pc; + + pc -= (unsigned long) &_stext; + pc >>= prof_shift; + /* + * Dont ignore out-of-bounds pc values silently, + * put them into the last histogram slot, so if + * present, they will show up as a sharp peak. + */ + if (pc > prof_len-1) + pc = prof_len-1; + atomic_inc((atomic_t *)&prof_buffer[pc]); + } + } +#endif #endif /* -- See, you not only have to be a good coder to create a system like Linux, you have to be a sneaky bastard too ;-) [Linus Torvalds in <4rikft$7g5@linux.cs.Helsinki.FI>]