This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix profiling on PA under hpux
- From: law at redhat dot com
- To: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 09 Jan 2002 15:57:06 -0700
- Subject: Re: Fix profiling on PA under hpux
- Reply-to: law at redhat dot com
> Profiling has been broken under HP-UX since the code was updated to use
> PROFILE_HOOK.
>
> The first problem fixed is to output the profile counter before the
> prologue function because the assembler doesn't allow changing sections
> in the body of a function. We do this in 3.0.X.
>
> The second issue fixed is the GNU assembler can't do the necessary
> relocation for the difference of a non-local symbol and local symbol.
> I added a local symbol at the start of the prologue to work around
> this problem.
>
> Finally, I have removed the restriction regarding inline functions
> as it is unnecessary. Inlined copies of a function don't call _mcount
> when using PROFILE_HOOK and there are no extra counters. However,
> a non-inlined copy of a function is profiled.
>
> Bootstrap checked with no regressions under hppa2.0w-hp-hpux11.11.
> If there are no comments, I will install the patch later today.
>
> Dave
> --
> J. David Anglin dave.anglin@nrc.ca
> National Research Council of Canada (613) 990-0752 (FAX: 952-660
> 5)
>
> 2002-01-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
>
> * pa.c (FUNC_BEGIN_PROLOG_LABEL, current_function_number): Define.
> (pa_output_function_prologue): Output local label at the beginning of
> the prologue when profiling.
> (hppa_profile_hook): Use the local label rather than the function label
> .
> * pa.h (PROFILE_BEFORE_PROLOGUE): Define.
This looks good. Please check it in if you haven't done so already.
jeff