This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

profiling on ARM


Hi,

I'm trying to get profiling working on an ARM platform (arm-linux) and
I've observed following behavior :

(glibc-2.2.5 compiled with gcc-3.0.4;
 testprogram with gcc-3.0.4 and gcc-3.2) :

- using no optimizations and static compilation produces a
  binary that generates a 'gmon.out' file containing useful data.
  (ex. gcc -static -g -pg testfile.c)
- enabling optimizations and static compilation produces a
  binary that generates a 'gmon.out' file, but that contains no call graph
  information
  (ex. gcc -static -g -pg -O3 testfile.c)

   debugging the code shows that the problem is due to frame pointers being
   optimized away.
   adding '-fno-omit-frame-pointer' resolves this problem.

   QUESTION : shouldn't this been taken care of automatically when providing '-pg',
              or should the profiling still work without frame pointers.

- using 'shared libraries', no 'gmon.out' is created. It seems that the
  initalisation code for profile monitoring ('moncontrol') is never called.
  Any idea where this should be told to the program ?


The same tests on an i686 platform produces valid output for each of those cases...

Greetings,
--
Jeroen Dobbelaere
Embedded Software Engineer

ACUNIA Embedded Solutions
http://www.acunia.com/aes



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