mcount and -pg
Joel Sherrill
joel.sherrill@OARcorp.com
Wed Feb 12 22:34:00 GMT 2003
Hi,
I noticed that mcount is now in a couple of libgloss targets. is
this all that is required to make profiling work on a target?
If so, any guidance on providing it in a way that could be
shared across more configurations?
My impression is that if you are using gcc, it is only CPU family
dependent and now OS dependent. Is this right?
I see implementations that might be usable for at least 3 common CPU
families in the gcc/newlib tree
./libgloss/i386/cygmon-gmon.c
./libgloss/rs6000/mcount.S -- dummy stub ignore
./gcc/config/m68k/aux-mcount.c
The implementation in ./libgloss/i386/cygmon-gmon.c looks generic
enough given that __builtin_return_address() is available. I
am wondering if the profiling code could be moved out of there
and be used on other target CPUs.
Any thoughts? Advice, experience doing profiling on embedded targets?
--
Joel Sherrill, Ph.D. Director of Research & Development
joel@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the Newlib
mailing list