profiling on sh
Daniel Jacobowitz
drow@mvista.com
Sat Mar 16 09:53:00 GMT 2002
On Sat, Mar 16, 2002 at 01:46:46PM -0000, kewarken@qnx.com wrote:
> That was part of my original question. What exactly is the trapa supposed to
> be doing? I don't see a handler for that anywhere or know of how to set it
> up. I'd love to just be able to set trapa #33 to call mcount but I don't
> know where that would be done...OS level or code level.
Presumably, the trapa #33 calls a profile handler in some SH embedded
OS. You can't do it that way for something heavier-weight like Linux,
so you do need to emit the call to _mcount - however that is done.
Perhaps write a tiny C program that actually calls _mcount and just
mimic what it does? It may not have the same calling convention as
normal functions, however.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
More information about the Gcc
mailing list