[llvm] r253400 - [llvm-profdata] Show hint for other mismatch errors when merging instr profdata

Nathan Slingerland via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 17 16:04:38 PST 2015


Hi Bruno,

OK - I am on it.

-Nathan

On Tue, Nov 17, 2015 at 3:58 PM, Bruno Cardoso Lopes <
bruno.cardoso at gmail.com> wrote:

> Hi Nathan,
>
> This is causing the warning:
>
> ../tools/llvm-profdata/llvm-profdata.cpp:78:15: warning: 12
> enumeration values not handled in switch: 'success', 'eof',
> 'unrecognized_format'... [-Wswitch]
>       switch (instrError) {
>               ^
> 1 warning generated.
>
> On Tue, Nov 17, 2015 at 3:37 PM, Nathan Slingerland via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Author: slingn
> > Date: Tue Nov 17 17:37:09 2015
> > New Revision: 253400
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=253400&view=rev
> > Log:
> > [llvm-profdata] Show hint for other mismatch errors when merging instr
> profdata
> >
> > Missed bit of feedback from D14720.
> >
> > Show the same "Make sure that all profile
> > data to be merged is generated from the same binary." hint for hash
> mismatch
> > and value site count mismatch as we now do for counter mismatch when
> merging
> > incompatible instrumentation profile data.
> >
> > Modified:
> >     llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp
> >
> > Modified: llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp?rev=253400&r1=253399&r2=253400&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp (original)
> > +++ llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp Tue Nov 17 17:37:09
> 2015
> > @@ -75,9 +75,13 @@ static void handleMergeWriterError(std::
> >      StringRef Hint = "";
> >      if (Error.category() == instrprof_category()) {
> >        instrprof_error instrError =
> static_cast<instrprof_error>(Error.value());
> > -      if (instrError == instrprof_error::count_mismatch) {
> > +      switch (instrError) {
> > +      case instrprof_error::hash_mismatch:
> > +      case instrprof_error::count_mismatch:
> > +      case instrprof_error::value_site_count_mismatch:
> >          Hint = "Make sure that all profile data to be merged is
> generated " \
> >                 "from the same binary.";
> > +        break;
> >        }
> >      }
> >
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
>
> --
> Bruno Cardoso Lopes
> http://www.brunocardoso.cc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151117/5c1630fc/attachment.html>


More information about the llvm-commits mailing list