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 i386]: Add for win32 targets pre-prologue profiling feature


2010/7/28 Andi Kleen <andi@firstfloor.org>:
> On Wed, Jul 28, 2010 at 08:49:45AM -0700, Richard Henderson wrote:
>> On 07/28/2010 12:53 AM, Kai Tietz wrote:
>> > But well, I can give it a whirl. To
>> > make it default for all targets by defining the default in i386.h is
>> > fine by me, but this will cause for targets - not providing in their
>> > profiler-library this new entry - link-time failures. By defining it
>> > for each target separately makes analyzis of support possible, but
>> > well, what ever you want here.
>>
>> Yes, but there are consumers like the linux kernel that plan to
>> provide their own version of the entry point.
>
> At least on Linux it has to be guarded by the explicit -mfentry
> option for now. Later on the default could be set by testing glibc
> support in autoconf.
>
> I don't see any reason to not enable non default -mfentry on any i386
> target.
>
> -Andi
> --
> ak@linux.intel.com -- Speaking for myself only.
>

Well, so here is the updated patch for this.

ChangeLog

2010-07-28  Kai Tietz

	* config/i386/i386.h (MCOUNT_NAME_BEFORE_PROLOGUE): New.
	* config/i386/i386.c (ix86_profile_before_prologue): New.
	(override_options): Add special handling for -mfentry.
	(ix86_function_regparm): Likewise.
	(ix86_function_sseregparm): Likewise.
	(ix86_frame_pointer_required): Likewise.
	(ix86_expand_prologue): Check for ms_hook_prologue.
	(x86_function_profiler): Adjust mcount output.
	(TARGET_PROFILE_BEFORE_PROLOGUE): Define hook.
	* config/i386/i386.opt (mfentry): New.
	* doc/invoke.texi (mfentry): Add documentation.
	* doc/tm.texi: Regenerated..
	* doc/tm.texi.in (TARGET_PROFILE_BEFORE_PROLOGUE): New.
	* final.c (final_start_function): Replace macro
	PROFILE_BEFORE_PROLOGUE by target hook.
	* function.c (thread_prologue_and_epilogue_insns): Likewise.
	* target.def (profile_before_prologue): New hook.
	* targhooks.c (default_profile_before_prologue): New.
	* targhooks.h (default_profile_before_prologue): New.

Ok for apply?

Regards,
Kai

-- 
|? (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

Attachment: profileb.diff
Description: Binary data


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