This is the mail archive of the gcc-patches@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]

Re: Patch: enable profiling of main() for mingw32.


On Thu, Dec 05, 2002 at 01:50:23PM +1100, Danny Smith wrote:
> --- Richard Henderson <rth@redhat.com> wrote: > On Thu, Dec 05, 2002 at
>08:20:02AM +1100, Danny Smith wrote:
>> 
>>         * i386/mingw32.h (SUBTARGET_PROLOGUE): Override Cygwin definition.
>>         * i386/uwin.h (SUBTARGET_PROLOGUE): Likewise.
>> 
>> > 	* config/i386.mingw32.h (SUBTARGET_PROLUGUE): Don't disable
>> > 	the Cygwin definition.
>> 
>> Incidentally, I think Cygwin ought to be using PROFILE_HOOK
>> for this.  As it is, the call happens somewhere in the middle
>> of the prologue, which isn't ideal.
>> 
>
>
>Thanks.
>
>I have revised patch to do that.  Tested on mingw32 with GCC 3.3 pre. I'm
>bootstrapping cygwin now.  On mingw the revised patch gives virtually same
>gprof output as did my former patch on simple testcase. 
>It also gives same output as cygwin/GCC 3.2 with the SUBTARGET_PROLOGUE macro.
>
>I have attached patch as well as inlining since may be line wrapping problems

Thanks, Danny.  Please check this in.

You might want to tweak the ChangeLog and get rid of the 32 after the cygwin,
though.  It's just "cygwin.h".

cgf

>ChangeLog
>
>2002-12-04  Danny Smith  <dannysmith@users.sourceforge.net>
>
>	* config/i386/cygwin32.h (SUBTARGET_PROLOGUE): Replace with
>	PROFILE_HOOK.
>	* config/i386/mingw32.h (SUBTARGET_PROLOGUE): Don't undef.


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