Hi,
this patch adds initial support for the GNU profiler on the SPU. The flat
profile is based on a histogram that is created using the sampling mechanism
provided by spu_timer.h (http://sourceware.org/ml/newlib/2008/msg00316.html).
For the call graph the compiler generates a particular prologue that causes
every function to call _mcount. The call graph is stored in PPU memory using
the named address space support
(http://sourceware.org/ml/newlib/2008/msg00600.html).
Ken
libgloss/ChangeLog:
2008-11-26 Ken Werner <ken.werner@de.ibm.com
* spu/crt0.S: Call __monstartup if profiling is enabled.
* spu/Makefile.in: Add gcrt1.o gcrt2.o.
newlib/ChangeLog:
2008-11-26 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/Makefile.am: Add spu-mcount.S spu-gmon.c.
* libc/machine/spu/spu-gmon.c: New file.
* libc/machine/spu/spu-mcount.S: New file.