This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Help with IA64 profiling bug - g++.dg/tree-prof/indir-call-prof.C
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 6 Oct 2008 16:18:32 -0700 (PDT)
- Subject: Help with IA64 profiling bug - g++.dg/tree-prof/indir-call-prof.C
I have been looking at why g++.dg/tree-prof/indir-call-prof.C fails on
IA64 (HP-UX and Linux). It looks like the optimization (turning an
indirect call into a direct call) does not happen because the initial
run with -fprofile-generate is not generating any count data about
indirect calls.
Comparing x86 (where things work) and IA64 (where they do not), I see
the test case, when compiled with -fprofile-generate, has calls
__gcov_indirect_call_profiler in both cases. But on IA64, cur_func is
never equal to callee_func and so __gcov_one_value_profiler_body is
never called. On x86 we do have cur_func equal to callee_func and so
__gcov_one_value_profiler_body is called to write out profile
information.
This is about as far as I have gotten. I am not sure why there is this
difference or how to fix it. I *think* it may be related to the fact
that IA64 GCC defines TARGET_VTABLE_USES_DESCRIPTORS but my only reason
for thinking that is that IA64 is the only platform that defines this
macro and I think that the profiler must be getting callee addresses out
of the vtable (though I am not sure about that and I don't know where it
would be doing it from).
So this is a request to anyone who might know the profiling code to help
me with some advise about what I should look at next or about how to go
about fixing this bug.
Steve Ellcey
sje@cup.hp.com