[arm-gnu] gprof problem with glibc in 2008q3-72 arm-non-linux-gnueabi
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[arm-gnu] gprof problem with glibc in 2008q3-72 arm-non-linux-gnueabi



Hi,

I downloaded the 2008q3 toolchain (binary) from CodeSourcery. I included -pg (as well as -O2, -march=armv4t, and -static) compiler switch(s) in my program to enable profiling for my program. When I open up the gprof report, I notice the following:

index % time    self  children    called     name
                                                 <spontaneous>
[1]     27.1   62.10    0.00                 __adddf3 [1]
-----------------------------------------------
                                                 <spontaneous>
[2]     23.7   54.24    0.00                 __muldf3 [2]
-----------------------------------------------
                0.00   39.43       1/1           __libc_start_main [5]
[3]     17.2    0.00   39.43       1         main [3]
                0.00   39.43       1/1           runPerformanceTest(int, bool) [4]
-----------------------------------------------

As your can see above. My program uses significant amount of float point operations on the ARM, and we are trying to identify the hot spots in order to begin our optimization efforts to fix point operations. However, it appears the glibc packaged with CodeSourcery toolchain is compiled with --disable-profile. When I look at the man page for gprof, it indicates <spontaneous> means the parent of addf3 and muldf3 are not compiled with profiling enabled. I confirmed my suspicion when I download the source for the toolchain and looked at the arm-2008q3-72-arm-non-linux-gnueabi.sh.

I tried to the arm-2008q3-72-arm-non-linux-gnueabi.sh and remove the --disable-profile switch, but I cannot get the toolchain to compile. The following comments are included in the head of the script file:

# This file is provided as a guideline for users who wish to
# modify and rebuild a free or open-source component of
# Sourcery G++ from source. For a number of reasons, though,
# you may not be able to successfully run this script directly
# on your system. Certain aspects of the CodeSourcery build
# environment (such as directory names) are included in these
# commands. CodeSourcery uses Canadian cross compilers so you
# may need to modify various configuration options and paths
# if you are building natively. This sequence of commands
# includes those used to build proprietary components of
# Sourcery G++ for which source code is not provided.

Can anyone give me some pointers on how I can compile the glibc with profiling enabled? Or if there is a pre-compiled compatible glibc (EABI) with profiling enabled, it will also be much appreciated.

Thank you very much for your assistance.
Charles