public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, rs6000] Don't emit profile code for procedures marked no_instrument_function
@ 2014-01-14 20:42 Pat Haugen
  2014-01-14 21:58 ` David Edelsohn
  0 siblings, 1 reply; 2+ messages in thread
From: Pat Haugen @ 2014-01-14 20:42 UTC (permalink / raw)
  To: GCC Patches; +Cc: David Edelsohn, Ulrich Weigand

This patch fixes a problem where the attribute no_instrument_function 
was being ignored and profile code was emitted. Testcase 
gcc.target/powerpc/ppc64-abi-2.c exposed the issue.

Bootstrap/regtest with no new regressions, ok for trunk?

-Pat


2014-01-13  Pat Haugen  <pthaugen@us.ibm.com>

         * config/rs6000/rs6000.c (rs6000_output_function_prologue): 
Check if
         current procedure should be profiled.



Index: config/rs6000/rs6000.c
===================================================================
--- config/rs6000/rs6000.c    (revision 206602)
+++ config/rs6000/rs6000.c    (working copy)
@@ -23198,7 +23198,7 @@ rs6000_output_function_prologue (FILE *f
    /* Output -mprofile-kernel code.  This needs to be done here instead of
       in output_function_profile since it must go after the ELFv2 ABI
       local entry point.  */
-  if (TARGET_PROFILE_KERNEL)
+  if (TARGET_PROFILE_KERNEL && crtl->profile)
      {
        gcc_assert (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2);
        gcc_assert (!TARGET_32BIT);





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH, rs6000] Don't emit profile code for procedures marked no_instrument_function
  2014-01-14 20:42 [PATCH, rs6000] Don't emit profile code for procedures marked no_instrument_function Pat Haugen
@ 2014-01-14 21:58 ` David Edelsohn
  0 siblings, 0 replies; 2+ messages in thread
From: David Edelsohn @ 2014-01-14 21:58 UTC (permalink / raw)
  To: Pat Haugen; +Cc: GCC Patches, Ulrich Weigand

On Tue, Jan 14, 2014 at 3:42 PM, Pat Haugen <pthaugen@linux.vnet.ibm.com> wrote:
> This patch fixes a problem where the attribute no_instrument_function was
> being ignored and profile code was emitted. Testcase
> gcc.target/powerpc/ppc64-abi-2.c exposed the issue.
>
> Bootstrap/regtest with no new regressions, ok for trunk?
>
> -Pat
>
>
> 2014-01-13  Pat Haugen  <pthaugen@us.ibm.com>
>
>         * config/rs6000/rs6000.c (rs6000_output_function_prologue): Check if
>         current procedure should be profiled.

okay.

Thanks, David

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-14 21:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-14 20:42 [PATCH, rs6000] Don't emit profile code for procedures marked no_instrument_function Pat Haugen
2014-01-14 21:58 ` David Edelsohn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).