Page MenuHomeFreeBSD

Extract the coverage sanitizer KPI to a new file.
ClosedPublic

Authored by andrew on Jan 25 2019, 4:47 PM.
Tags
None
Referenced Files
F101850286: D18955.id53298.diff
Mon, Nov 4, 4:29 PM
F101850141: D18955.id53199.diff
Mon, Nov 4, 4:26 PM
Unknown Object (File)
Mon, Oct 21, 12:13 AM
Unknown Object (File)
Sun, Oct 20, 3:29 PM
Unknown Object (File)
Mon, Oct 14, 8:21 PM
Unknown Object (File)
Tue, Oct 8, 4:45 AM
Unknown Object (File)
Tue, Oct 8, 3:33 AM
Unknown Object (File)
Mon, Oct 7, 8:30 PM
Subscribers

Details

Summary

This will allow multiple consumers of the coverage data to be compiled
into the kernel together. The only requirement is only one can be
registered at a given point in time, however it is expected they will
only register when the coverage data is needed.

A new kernel conflig option COVERAGE is added. This will allow kcov to
become a module that can be loaded as needed, or compiled into the
kernel.

While here clean up the #include style a little.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 22144
Build 21364: arc lint + arc unit

Event Timeline

sys/amd64/conf/GENERIC
104–106

OK for review/test but if the default changes it should be a separate commit

sys/conf/kern.pre.mk
116

If modules are built as part of the 'make kernel', could you do this evaluation once and pass the result down to modules makes with a var ? You add several hundreds of fork/execs to each build.

sys/kern/kern_kcov.c
337

This does not work.

Without D_TRACKCLOSE cdevsw flags, d_close() is only called on very last close. With D_TRACKCLOSE, d_close() calls are not synced with d_open's and can get out of sync. Also, reclaim of the device vnode causes even more unfortunate effects on d_close() mis-pairing with d_open().

546

The var is static, there is no need to reinitialize it.

Update the kcov tracking to be based on the number of threads actively
being traced.

Remove a D_TRACKCLOSE that sneaked in

This revision is now accepted and ready to land.Jan 28 2019, 7:28 PM
This revision was automatically updated to reflect the committed changes.