This is an archive of the discontinued LLVM Phabricator instance.

[sancov] Ignore PC samples with value 0
ClosedPublic

Authored by mcgrathr on Jun 23 2019, 3:58 PM.

Details

Summary

The sancov runtime for the (Fuchsia) Zircon kernel delivers results
in the standard format, but as the full array of possible samples
with 0 in uncovered slots. That runtime delivers "live" data and
has no final "export" pass to compactify out the uncovered slots,
and it seems silly to require another offline tool just for that.

Diff Detail

Repository
rL LLVM

Event Timeline

mcgrathr created this revision.Jun 23 2019, 3:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 23 2019, 3:58 PM

https://fuchsia-review.googlesource.com/c/fuchsia/+/295508 has the runtime implementation that motivated this.

MaskRay added inline comments.Jun 24 2019, 2:48 AM
llvm/tools/sancov/sancov.cpp
265 ↗(On Diff #206142)

The erase(0) logic should probably be moved here.

mcgrathr updated this revision to Diff 206277.Jun 24 2019, 12:22 PM

Move logic out of RawCoverage constructor.

mcgrathr marked an inline comment as done.Jun 24 2019, 12:23 PM
phosek accepted this revision.Jun 29 2019, 1:12 PM

LGTM

This revision is now accepted and ready to land.Jun 29 2019, 1:12 PM
MaskRay accepted this revision.Jul 1 2019, 8:09 PM
This revision was automatically updated to reflect the committed changes.