Subject: Re: mips kernel profiling
To: None <port-mips@netbsd.org>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-mips
Date: 04/17/2000 01:17:04
Wow, apologies for the delay.  Seems like I'm not getting port-mips
mail these days?!?...


>_splset is a LEAF function, so it calls MCOUNT.  From what I understand,
>we shouldn't profile the profiling support :)

Yep.  Or your stack runneth over. ;).


When _splset() was introduced, we should've created non-profiled
entrypoints, say __splhigh() and __splx() entrypoint, and changed
mips/include/profile.h to do

   #define MCOUNT_ENTER s = __splhigh();
   #define MCOUNT_EXIT  __splx(s);


(or _splhigh_()/_splx_(), whatever works best with ANSI namespace
rules).  _KERNEL_MCOUNT_DECL should change to match.

One way to do this is to use XLEAF() to add alias entrypoints after
the profiling goop emitted by the LEAF() macros.  That's what the
locore code used to do with splhigh/_splhigh, once upon a time.

*Sigh*.  Its a real shame kernel profiling keeps getting busted.  That
suggests that kernel changes being arent being adequately profiled
before they get committed.  NetBSD/pmax used to be enough faster than
the alternatives that some large campuses switched servers just for
the performance improvement.  I wonder if that's still true.

Simon -- can you run lmbench binaries on both Ultrix and NetBSD,
on a 60Mhz r4400?