[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sparc-rtems-gcc "-pg" option




CLAUDIO SICILIA wrote:
> 
> Hy everybody!
> 
> I'd like to use the sparc-rtems-gcc with option "-pg" in order to profile
> a
> my C program.
> There is a problem with the automatically instanced mcount() function, as
> follows:
> 
> `undefined reference to "_mcount"`
> 
> with this command:
> 
> `sparc-rtems-gcc -S -pg -O my_prog.c -o my_prog.s`
> 
> Any suggestion about it?

_mcount is a CPU specific routine that supports profiling.
Here are some example implementations I found:

newlib-1.11.0/libgloss/i386/cygmon-gmon.c
newlib-1.11.0/libgloss/rs6000/mcount.S
gcc-3.2.1/libffi/src/powerpc/asm.h
gcc-3.2.1/gcc/config/m68k/aux-mcount.c

Here is the GNU manual reference to this:

http://www.gnu.org/manual/gprof-2.9.1/html_chapter/gprof_9.html

Having this routine supported by RTEMS would be considered a value 
contribution.  

FWIW collecting the data is 1/2 the battle, then you have
to get it off your target.


> Thanks in advance.
> 
> Claudio S.
> ______________________________
>  Ing. Claudio SICILIA, PhD Student
>  University of Pisa
>  Dept. Information Engineering
>  Via Diotisalvi 2 - I56122 PISA - Italy
>  mobile  : +39 328 185 62 33
>  mailto   : claudio.sicila at iet.unipi.it
> ______________________________
> 
> CLAUDIO SICILIA
> hom: +39 050 220 10 98
> mob: +39 328 185 62 33
> 
> __________________________________________________________________
> Tiscali ADSL parte da 6,1 euro al mese e in pi?
> l'attivazione e il primo mese sono GRATIS!
> Vai all'offerta, oppure scopri di che ADSL sei con il test on line.
> http://point.tiscali.it/adsl

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985