This is an archive of the discontinued LLVM Phabricator instance.

Fix the bug when SampleProfileWriter writes out number of callsites.
ClosedPublic

Authored by danielcdh on Aug 2 2017, 3:48 PM.

Details

Summary

As we support multiple callsites for the same location, we need to traverse all locations to get the number of callsites.

Event Timeline

danielcdh created this revision.Aug 2 2017, 3:48 PM
davidxl added inline comments.Aug 2 2017, 4:41 PM
test/tools/llvm-profdata/Inputs/sample-profile.proftext
13

What does this actually test?

danielcdh added inline comments.Aug 2 2017, 4:51 PM
test/tools/llvm-profdata/Inputs/sample-profile.proftext
13

It tests if the profile reader/writer can handle 2 functions inlined at the same location. Without the patch, the test will fail.

davidxl accepted this revision.Aug 2 2017, 4:58 PM

lgtm

This revision is now accepted and ready to land.Aug 2 2017, 4:58 PM
danielcdh closed this revision.Aug 2 2017, 5:09 PM