Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: kernel profiling in 2.1 ?
       [not found] ` <Pine.LNX.3.95.980517113511.7404A-100000@penguin.transmeta.com>
@ 1998-05-17 21:19   ` Thomas Bogendoerfer
       [not found]     ` <Pine.LNX.3.95.980517150058.11803A-100000@penguin.transmeta.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Bogendoerfer @ 1998-05-17 21:19 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, linux-alpha, axp-list

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>]


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: kernel profiling in 2.1 ?
       [not found]     ` <Pine.LNX.3.95.980517150058.11803A-100000@penguin.transmeta.com>
@ 1998-05-17 22:41       ` Thomas Bogendoerfer
       [not found]         ` <Pine.LNX.3.95.980517204428.15284D-100000@penguin.transmeta.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Bogendoerfer @ 1998-05-17 22:41 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, linux-alpha, axp-list

On Sun, May 17, 1998 at 03:03:05PM -0700, Linus Torvalds wrote:
> If that is true, then the machine should also hang from a simple
> 
> 	main()
> 	{
> 		for (;;) ;
> 	}
> 
> does it?

it does.

Thomas.

-- 
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>]


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: kernel profiling in 2.1 ?
       [not found]         ` <Pine.LNX.3.95.980517204428.15284D-100000@penguin.transmeta.com>
@ 1998-05-18  6:02           ` Thomas Bogendoerfer
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Bogendoerfer @ 1998-05-18  6:02 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, linux-alpha, axp-list

On Sun, May 17, 1998 at 08:47:43PM -0700, Linus Torvalds wrote:
> So make sure that SMP is commented out in the main Makefile (it defaults
> to on in the kernels I generate, because I run it that way personally on
> the x86). Just setting it to zero won't work, you really have to comment
> it out completely. 

SMP is commented out.

Thomas.

-- 
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>]


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-05-18 10:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <19980517132147.20573@alpha.franken.de>
     [not found] ` <Pine.LNX.3.95.980517113511.7404A-100000@penguin.transmeta.com>
1998-05-17 21:19   ` kernel profiling in 2.1 ? Thomas Bogendoerfer
     [not found]     ` <Pine.LNX.3.95.980517150058.11803A-100000@penguin.transmeta.com>
1998-05-17 22:41       ` Thomas Bogendoerfer
     [not found]         ` <Pine.LNX.3.95.980517204428.15284D-100000@penguin.transmeta.com>
1998-05-18  6:02           ` Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox