This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: profiling on sh


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]