Module Name: src Committed By: kamil Date: Sun Mar 10 17:51:00 UTC 2019
Modified Files: src/share/man/man4: kcov.4 src/sys/kern: subr_kcov.c src/sys/sys: kcov.h src/tests/modules: t_kcov.c Log Message: Add support for trace type selection in kcov(4) Allow to specify mode in KCOV_IOC_ENABLE synchronizing the functionality with Linux, FreeBSD and OpenBSD. As a NetBSD (and OpenBSD) specific of the ioctl(2) interface, the mode argument has to be specified as &value rather than value. There are 3 modes available: 1. KCOV_MODE_NONE -- no trace specified, useful for testing purposes 2. KCOV_MODE_TRACE_PC -- trace the kernel program counter 3. KCOV_MODE_TRACE_CMP -- trace comparison instructions and switch statements Adapt the ATF tests and documentation for new API. The KCOV_MODE_TRACE_CMP mode is implemented but still awaits for the GCC 8.x upgrade or selection of Clang/LLVM as the kernel compiler. Obtained from OpenBSD and adapted for NetBSD by myself. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/kcov.4 cvs rdiff -u -r1.4 -r1.5 src/sys/kern/subr_kcov.c cvs rdiff -u -r1.3 -r1.4 src/sys/sys/kcov.h cvs rdiff -u -r1.6 -r1.7 src/tests/modules/t_kcov.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.