minix/share/mk
David van Moolenbroek 3ac58492b3 Add LLVM GCOV coverage support
With this patch, it is now possible to generate coverage information
for MINIX3 system services with LLVM.  In particular, the system can
be built with MKCOVERAGE=yes, either with a native "make build" or
with crosscompilation.  Either way, MKCOVERAGE=yes will build the
MINIX3 system services with coverage profiling support, generating a
.gcno file for each source module.  After a reboot it is possible to
obtain runtime coverage data (.gcda files) for individual system
services using gcov-pull(8).  The combination of the .gcno and .gcda
files can then be inspected with llvm-cov(1).

For reasons documented in minix.gcov.mk, only system service program
modules are supported for now; system service libraries (libsys etc.)
are not included.  Userland programs are not affected by MKCOVERAGE.

The heart of this patch is the libsys code that writes data generated
by the LLVM coverage hooks into a serialized format using the routines
we already had for GCC GCOV.  Unfortunately, the new llvm_gcov.c code
is LLVM ABI dependent, and may therefore have to be updated later when
we upgrade LLVM.  The current implementation should support all LLVM
versions 3.x with x >= 4.

The rest of this patch is mostly a light cleanup of our existing GCOV
infrastructure, with as most visible change that gcov-pull(8) now
takes a service label string rather than a PID number.

Change-Id: I6de055359d3d2b3f53e426f3fffb17af7877261f
2016-09-24 22:18:31 +00:00
..
bsd.buildinstall.mk Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC) 2014-07-28 17:05:06 +02:00
bsd.clang-analyze.mk Upgrading build system to new NetBSD revision 2012-11-15 16:07:29 +01:00
bsd.clean.mk Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC) 2014-07-28 17:05:06 +02:00
bsd.dep.mk NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
bsd.doc.mk NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
bsd.endian.mk NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
bsd.files.mk Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC) 2014-07-28 17:05:06 +02:00
bsd.gcc.mk NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
bsd.host.mk NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
bsd.hostlib.mk NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
bsd.hostprog.mk NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
bsd.inc.mk Upgrading build system to new NetBSD revision 2012-11-15 16:07:29 +01:00
bsd.info.mk Upgrading build system to new NetBSD revision 2012-11-15 16:07:29 +01:00
bsd.init.mk Upgrading build system to new NetBSD revision 2012-11-15 16:07:29 +01:00
bsd.ioconf.mk NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
bsd.kernobj.mk Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC) 2014-07-28 17:05:06 +02:00
bsd.kinc.mk share/mk: use original stat -qf 2011-07-19 18:38:06 +02:00
bsd.klinks.mk NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
bsd.kmodule.mk NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
bsd.lib.mk libmagicrt: integrate into build system 2016-01-13 20:32:32 +01:00
bsd.links.mk Move mkfiles from /etc/mk to /usr/share/mk 2010-06-25 19:33:56 +00:00
bsd.lua.mk NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
bsd.man.mk NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
bsd.nls.mk Add mk and h files needed for cross compilation 2012-06-18 10:53:37 +00:00
bsd.obj.mk Upgrading build system to new NetBSD revision 2012-11-15 16:07:29 +01:00
bsd.own.mk Enable building with MKDEBUG and MKDEBUGLIB 2016-09-10 12:42:45 +02:00
bsd.prog.mk NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
bsd.README NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
bsd.rpc.mk NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
bsd.shlib.mk Upgrading build system to new NetBSD revision 2012-11-15 16:07:29 +01:00
bsd.subdir.mk Upgrading build system to new NetBSD revision 2012-11-15 16:07:29 +01:00
bsd.sys.mk NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
bsd.syscall.mk NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
bsd.test.mk Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC) 2014-07-28 17:05:06 +02:00
bsd.x11.mk NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
Makefile NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
minix.gcov.mk Add LLVM GCOV coverage support 2016-09-24 22:18:31 +00:00
minix.service.mk Add LLVM GCOV coverage support 2016-09-24 22:18:31 +00:00
sys.mk Integrate ASR instrumentation into build system 2016-01-13 20:32:34 +01:00