Page MenuHomePhabricator

[GCOV] Avoid emitting profile arcs for module and skeleton CU's

Authored by vsk on Jan 8 2016, 9:49 AM.



Do not emit profile arc files and note files for module and skeleton

Our users report seeing unexpected *.gcda and *.gcno files in their
projects when using gcov-style profiling with modules or frameworks.
The unwanted files come from these modules. This is not very helpful
for end-users. Further, we've seen reports of instrumented programs
crashing while writing these files out (due to I/O failures).


Diff Detail


Event Timeline

vsk updated this revision to Diff 44334.Jan 8 2016, 9:49 AM
vsk retitled this revision from to [GCOV] Avoid emitting profile arcs for module and skeleton CU's.
vsk updated this object.
vsk added reviewers: nlewycky, dblaikie.
vsk added a subscriber: llvm-commits.
aprantl added inline comments.Jan 11 2016, 1:13 PM
498 ↗(On Diff #44334)
// Skip module and module skeleton CUs.

would be more accurate. Regular split-dwarf skeleton CUs won't (and shouldn't) be affected because they are generated later and don't exist in the IR.

vsk updated this revision to Diff 44574.Jan 11 2016, 3:49 PM

Updated comments. Would it be appropriate to add a isModuleOrModuleSkeleton predicate to DICompileUnit?

aprantl accepted this revision.Jan 20 2016, 5:27 PM
aprantl added a reviewer: aprantl.

I'm not sure — this seems to be a fairly special use-case.

If modules did contain code (which they currently don't) we probably wouldn't want to skip them. But at the moment we cannot distinguish a skeleton CU from a module CU at the IR level.

Let's just change the comment to
// Skip module skeleton (and module) CUs.
and be done with it.

This revision is now accepted and ready to land.Jan 20 2016, 5:27 PM
This revision was automatically updated to reflect the committed changes.