Adding Profiling support - GCC 4.1.1

Rohit Arul Raj rohitarulraj@gmail.com
Wed Mar 21 06:23:00 GMT 2007


Hi all,

I need to implement profiling support for my backend (GCC 4.1.1).
There is only limited information in GCC Internals to define the
following macros (FUNCTION_PROFILER, PROFILE_HOOK ,NO_PROFILE_COUNTERS
& PROFILE_BEFORE_PROLOGUE) to add profiling support. I need to know
the following details:

1. The function mcount: While building with native gcc, the mcount
function is defined in glibc. Is the same mcount function available in
newlib? or is it that we have to define it in our back-end as SPARC
does (gmon-sol2.c).

2. Is it possible to reuse the existing mcount definition or is it
customized for every backend?

3. Any other existing back-ends that support profiling.

Thanks in advance.

Regards,
Rohit



More information about the Gcc mailing list