profiling with cc

Andreas Tobler toa at pop.agri.ch
Wed Feb 8 10:02:02 PST 2006


Marius Strobl wrote:

> It should work fine for C functions but the ENTRY macro in
> sparc64/include/asm.h has to be changed to call _mcount() so profiling
> info is also gathered for asm functions (e.g. those in libc).

Ok, need to find out how.

> 
>> Would you mind giving me some feedback if the attached is useful/needs 
>> rework?
>>
> 
> It has some style issues and inconsitencies (see style(9) and other
> inline asm in e.g. sparc64/include/cpufunc.h). Otherwise it looks
> good but probably needs a PIC version of the MCOUNT asm so it also
> works when compiling with -p.

Thanks, for the comments. I try to address them, I need some doc and 
code reading then. I'm new to your style guide. I hope the code in cvs 
is worth as example ;)


[enterprise:~] andreast% cc -p hello hello.c
consider using `-pg' instead of `-p' with gprof(1)
....

Well it spits some errors, so I guess you're correct regarding the pic 
variant.

Thanks again,
Andreas


More information about the freebsd-sparc64 mailing list