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]

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


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