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]

[GOOGLE] guard recording of autofdo annotation info in a flag


This patch guards autofdo annotation coverage recording with a flag.

Test on-going.

OK for google-4_8 if test passes?

Thanks,
Dehao

Index: gcc/auto-profile.c
===================================================================
--- gcc/auto-profile.c (revision 208753)
+++ gcc/auto-profile.c (working copy)
@@ -1634,7 +1634,8 @@ auto_profile (void)
       pop_cfun ();
     }

-  autofdo::afdo_source_profile->write_annotated_count ();
+  if (flag_auto_profile_record_coverage_in_elf)
+    autofdo::afdo_source_profile->write_annotated_count ();
   return 0;
 }

Index: gcc/common.opt
===================================================================
--- gcc/common.opt (revision 208753)
+++ gcc/common.opt (working copy)
@@ -946,6 +946,10 @@ fauto-profile-accurate
 Common Report Var(flag_auto_profile_accurate) Optimization
 Whether to assume the sample profile is accurate.

+fauto-profile-record-coverage-in-elf
+Common Report Var(flag_auto_profile_record_coverage_in_elf) Optimization
+Whether to record annotation coverage info in elf.
+
 ; -fcheck-bounds causes gcc to generate array bounds checks.
 ; For C, C++ and ObjC: defaults off.
 ; For Java: defaults to on.


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