This is an archive of the discontinued LLVM Phabricator instance.

[llvm-profdata] Improve error messaging when merging mismatched profile data
ClosedPublic

Authored by slingn on Nov 16 2015, 5:39 PM.

Details

Summary

This change tries to make the root cause of instrumented profile data merge failures clearer.

Previous:

$ llvm-profdata merge test_0.profraw test_1.profraw -o test_merged.profdata
test_1.profraw: foo: Function count mismatch
test_1.profraw: bar: Function count mismatch
test_1.profraw: baz: Function count mismatch
...

Changed:

$ llvm-profdata merge test_0.profraw test_1.profraw -o test_merged.profdata
test_1.profraw: foo: Function basic block count change detected (counter mismatch)
Make sure that all profile data to be merged is generated from the same binary.
test_1.profraw: bar: Function basic block count change detected (counter mismatch)
test_1.profraw: baz: Function basic block count change detected (counter mismatch)
...

Diff Detail

Repository
rL LLVM

Event Timeline

slingn updated this revision to Diff 40367.Nov 16 2015, 5:39 PM
slingn retitled this revision from to [llvm-profdata] Improve error messaging when merging mismatched profile data.
slingn updated this object.
slingn added reviewers: dnovillo, davidxl, bogner.
slingn added a subscriber: llvm-commits.
dnovillo accepted this revision.Nov 17 2015, 9:50 AM
dnovillo edited edge metadata.

LGTM

tools/llvm-profdata/llvm-profdata.cpp
48 ↗(On Diff #40367)

Could you commit pure clang-format changes separately? No need to have these reviewed.

This revision is now accepted and ready to land.Nov 17 2015, 9:50 AM
This revision was automatically updated to reflect the committed changes.