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
Unknown Object (File)
Fri, Dec 13, 1:24 PM
Unknown Object (File)
Sun, Nov 24, 12:12 PM
Unknown Object (File)
Nov 4 2024, 4:36 PM
Unknown Object (File)
Nov 4 2024, 4:29 PM
Unknown Object (File)
Nov 4 2024, 4:26 PM
Unknown Object (File)
Oct 21 2024, 12:13 AM
Unknown Object (File)
Oct 20 2024, 3:29 PM
Unknown Object (File)
Oct 14 2024, 8:21 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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/amd64/conf/GENERIC
104–106 ↗(On Diff #53199)

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

sys/conf/kern.pre.mk
116 ↗(On Diff #53199)

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 ↗(On Diff #53199)

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 ↗(On Diff #53199)

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.