This is an archive of the discontinued LLVM Phabricator instance.

[sancov] blacklist support.
ClosedPublic

Authored by aizatsky on Dec 8 2015, 5:08 PM.

Details

Summary

Using the blacklist the user can filter own unwanted functions
from all outputs. By default blacklist contains "fun:__sancov*" line.

Diff Detail

Event Timeline

aizatsky updated this revision to Diff 42252.Dec 8 2015, 5:08 PM
aizatsky retitled this revision from to [sancov] blacklist support..
aizatsky updated this object.
aizatsky added a subscriber: llvm-commits.
krasin edited edge metadata.Dec 8 2015, 5:21 PM

LGTM with nits

test/tools/sancov/blacklist.test
3

Please, also add a test case for the default blacklist.

tools/sancov/sancov.cc
88

Do we ever want to see __sancov* functions in the output? Right now, the logic is:

  1. If we don't have a blacklist specified, use the default one and suppress __sancov* functions
  2. If there's a blacklist specified, exclusively use it, forget about the default one.

It means that the following weird behavior is possible: a user creates a blacklist, puts a function or two there, runs the tool with the blacklist specified and gets *more* output than without --blacklist.

If would rather not have a default blacklist, or always have it. No strong opinion though.

aizatsky updated this revision to Diff 42930.Dec 15 2015, 3:42 PM
aizatsky marked an inline comment as done.
aizatsky edited edge metadata.

review

aizatsky marked an inline comment as done.Dec 15 2015, 3:43 PM

All done, ptal.

LGTM

tools/sancov/sancov.cc
363

FYI: this approach seems error-prone, but it's ok for now.

aizatsky added inline comments.Dec 15 2015, 4:34 PM
tools/sancov/sancov.cc
363

ACK.

This revision was automatically updated to reflect the committed changes.