This is an archive of the discontinued LLVM Phabricator instance.

[profile] Add integration test to validate PGO function names
ClosedPublic

Authored by vsk on Mar 25 2016, 4:09 PM.

Details

Summary

Check that PGO function names are emitted correctly by clang, preserved during the profile merge step, and decoded properly by the coverage mapping reader.

Diff Detail

Repository
rL LLVM

Event Timeline

vsk updated this revision to Diff 51696.Mar 25 2016, 4:09 PM
vsk retitled this revision from to [profile] Add integration test to validate PGO function names.
vsk updated this object.
vsk added a reviewer: davidxl.
vsk added a subscriber: llvm-commits.
davidxl added inline comments.Mar 25 2016, 4:23 PM
test/profile/instrprof-visibility-kinds.inc
11 ↗(On Diff #51696)

Is this decl needed?

test/profile/instrprof-visibility.cpp
39 ↗(On Diff #51696)

global f2 is missing in the check?

vsk added inline comments.Mar 25 2016, 4:51 PM
test/profile/instrprof-visibility-kinds.inc
11 ↗(On Diff #51696)

Not as written -- I should define it in another TU and make sure it shows up.

test/profile/instrprof-visibility.cpp
39 ↗(On Diff #51696)

Good point. The name for f2 is not printed since there is only one expansion region. I'll update the test to check that f2() is at least covered properly.

vsk updated this revision to Diff 51701.Mar 25 2016, 4:51 PM
  • Address some of David's review comments.
  • Check line coverage directly.
vsk added inline comments.Mar 25 2016, 4:54 PM
test/profile/instrprof-visibility.cpp
40 ↗(On Diff #51701)

Also, no _ZN12_GLOBAL__N_12f2Ev because it's an error to define a weak function with internal linkage (i.e, in an anonymous namespace).

davidxl accepted this revision.Mar 25 2016, 4:59 PM
davidxl edited edge metadata.

lgtm

This revision is now accepted and ready to land.Mar 25 2016, 4:59 PM
This revision was automatically updated to reflect the committed changes.