This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib 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]

mcount and -pg


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


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