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] PR86957


On 09/21/2018 05:27 PM, Indu Bhagat wrote:
Attached is the refreshed patch for trunk.

After commit 264462 (Remove arc profile histogram in non-LTO mode.), the
API
of get_coverage_counts was changed a bit. So the main difference between
the
current version of my patch from the previous one is that :

Now I use
+      if (counter == GCOV_COUNTER_ARCS)
+       warning_at (DECL_SOURCE_LOCATION (current_function_decl),
+                   OPT_Wmissing_profile,
+                   "profile for function %qD not found in profile data",
+                   current_function_decl);

instead of
+      if (summary)
+       warning_at (DECL_SOURCE_LOCATION (current_function_decl),
+                   OPT_Wmissing_profile,
+                   "profile for function %qD not found in profile data",
+                   current_function_decl);

to warn about missing profile of a function only once
(get_coverage_counts is
called from two diff flows : getting exec counts for arc counter and
computing
histogram for other other counters)

I am not sure of any better way to avoid superfluous warnings per function.

Is the patch OK ?


In the text below:

@@ -4823,6 +4823,23 @@
 This warning is enabled by @option{-Wall}.
 @opindex Wno-missing-include-dirs
 Warn if a user-supplied include directory does not exist.

+@item -Wmissing-profile
+@opindex Wmissing-profile
+@opindex Wno-missing-profile
+Warn if feedback profiles are missing when using the
+@option{-fprofile-use} option.
+This option diagnoses those cases where a new function or a new file is added +to the user code between compiling with @option{-fprofile-generate} and with +@option{-fprofile-use}, without regenerating the profiles. In these cases, the +profile feedback data files do not contain any profile feedback information for +the newly added function or file respectively. Also, in the case when profile +count data (.gcda) files are wiped out, GCC cannot use any profile feedback
+information.

I would suggest to use the term "remove" or "delete" instead of
the informal "wipe out" when referring to removing files or their
contents.

Martin


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