This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: __cyg_profile_func_enter is not called with correct address ?
- From: Andrew Haley <aph at redhat dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 06 Mar 2009 09:41:50 +0000
- Subject: Re: __cyg_profile_func_enter is not called with correct address ?
- References: <3e004f8e0902260444ta80c5e2j5bdce78a5e8c2d86@mail.gmail.com> <49A69C2B.6050401@redhat.com> <3e004f8e0902260815q174ce412t44341224d9879bf5@mail.gmail.com> <49A6E69D.8010103@redhat.com> <3e004f8e0902262244w2ca74cb4m7698d6ec898affb3@mail.gmail.com> <3e004f8e0903051833k3df35f22t88d5d16bd9521969@mail.gmail.com>
robert song wrote:
> Hello, everyone.
> It is another question, now I used kview to test, by rebuilding it in the
> kdegraphics-3.5.4 with -finstrument-functions option. But I found that in
> libkdeinit_kview.so, one function can have multiply profiling entry, for
> example, kdemain function (located in kdegraphics-3.5.4/kview/main.cpp)
> has three _cyg_profile_func_{enter,exit} pairs.
>
> the return address after these entries are located at:
> kdegraphics-3.5.4/kview/main.cpp:39
> /usr/lib/qt-3.3/include/qapplication.h:501
> kdegraphics-3.5.4/kview/main.cpp:45
>
> I don't know why this happens, and can anyone help me ?
It's probably because functions have been inlined.
Andrew.