[LLVMdev] asan coverage

Kostya Serebryany kcc at google.com
Wed Feb 12 10:31:02 PST 2014


Hi,

Justin is making nice commits for llvm-cov, so I thought we may continue
this discussion now.
The quick-and-dirty implementation of coverage (in asan) is getting some
early users and they seem to be happy.
AsanCoverage allows to collect per-function or per-basic-block coverage
(booleans only, no counters) at a very low cost:
1% for per-function and 20% for per-basic-block:
https://code.google.com/p/address-sanitizer/wiki/AsanCoverage
The output format is very simple and does not require any external tool
(other than 56 lines in python) to handle it.
So, I was wondering it some similar functionality could be included as part
of llvm-cov effort.
Also, do you have some documentation about the llvm-cov (how it works, what
is the performance, etc)?

BTW, would a 5-minute lightning talk about AsanCoverage be interesting at
LLVM Euro 2014?

Thanks,

--kcc


On Thu, Nov 14, 2013 at 5:42 PM, Kostya Serebryany <kcc at google.com> wrote:

> Bob, Justin,
>
> I've just committed a poor man's coverage implementation that works with
> asan.
> http://llvm.org/viewvc/llvm-project?rev=194701&view=rev
> http://llvm.org/viewvc/llvm-project?rev=194702&view=rev
> It provides only function-level boolean coverage (i.e. no counters, just
> "visited or not"),
> but is very fast and very simple (no extra sections to the binary file,
> etc)
> I've tried it for Chrome's content_shell (huge and heavy binary) and the
> overhead
> is negligible at both run-time and shutdown-time.
>
> We'll be evaluating this implementation and collecting usage stats.
> Maybe we want to implement something simple like this in the Clang
> coverage.
>
> --kcc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140212/561e3b07/attachment.html>


More information about the llvm-dev mailing list