Subject: Re: mips kernel profiling?
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Ethan Solomita <firstname.lastname@example.org>
Date: 04/19/2000 19:07:01
Jonathan Stone wrote:
> One thing that may be going wrong is that GCC is completely unaware of
> the call to mcount() which we're splicing in. So its adjustment of $gp
> (which is correct for main()) is all whacked for mcount().
Now I'm doubly confused -- I'd thought that gcc was the entity that
adds the mcount call that is being spliced in, as a result of the -pg
option. And, BTW, the problem isn't with the adjustment but with the
addi sp,sp,-8 that is coming too late, and should be before (or in the
bdslot) the call to mcount.
> Ethan: what happens if you acutally run this? Does your machine lock
> up, or do you quickly get a coredump?
It does what I expected -- I got a coredump. It pulls up the wrong $gp
because $sp is wrong, and then tries to load relative to $gp and gets a
> (PS: Take this with a _big_ grain of salt, I'm working on a SIGCOMM
> paper and we're out of coffee filters...)
I guess you'll have to take the coffee straight, then. 8-)