minix/minix/lib
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
..
libasyn Enable building with MKDEBUG and MKDEBUGLIB 2016-09-10 12:42:45 +02:00
libaudiodriver Resolve more warnings 2015-09-23 12:04:58 +00:00
libbdev Resolve more warnings 2015-09-23 12:04:58 +00:00
libblockdriver Resolve more warnings 2015-09-23 12:04:58 +00:00
libc Add LLVM GCOV coverage support 2016-09-24 22:18:31 +00:00
libchardriver libchardriver: make some pointers constant 2016-06-18 12:20:45 +00:00
libclkconf Resolve more warnings 2015-09-23 12:04:58 +00:00
libddekit Fix usage of parenthesis in Makefiles 2016-02-07 19:17:44 +01:00
libdevman Fix ARM noassert builds -g/-O{s/0/1/2/3} 2016-01-24 18:56:38 +01:00
libexec Improve libexec debug output 2016-01-16 14:04:28 +01:00
libfsdriver libfsdriver: clear VM cache only if used 2015-06-23 14:38:54 +00:00
libgcc_s_empty New sources layout 2014-07-31 16:00:30 +02:00
libgpio New sources layout 2014-07-31 16:00:30 +02:00
libhgfs NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
libi2cdriver Resolve more warnings 2015-09-23 12:04:58 +00:00
libinputdriver New sources layout 2014-07-31 16:00:30 +02:00
liblwip Kernel: export clock information on kernel page 2015-09-23 12:00:46 +00:00
libmagicrt made PAE enabled by accident and fixed libmagicrt.h 2016-08-06 10:52:09 +02:00
libminc Enable building with MKDEBUG and MKDEBUGLIB 2016-09-10 12:42:45 +02:00
libminixfs MFS: do not crash when reading superblock fails 2016-06-17 19:48:20 +00:00
libmthread libmthread: resolve memory leaks on exception path 2016-08-05 11:17:30 +00:00
libnetdriver Resolve more warnings 2015-09-23 12:04:58 +00:00
libnetsock libc: enable all functionality in net/ 2016-03-13 16:03:39 +00:00
libpuffs libpuffs: clean up, unbreak 2015-09-23 12:05:03 +00:00
libsffs Fix gcc -O1 builds for ARM 2015-10-04 03:47:57 -07:00
libsys Add LLVM GCOV coverage support 2016-09-24 22:18:31 +00:00
libtimers Various timer improvements 2016-08-05 11:12:44 +00:00
libusb Resolve more warnings 2015-09-23 12:04:58 +00:00
libvassert Resolve more warnings 2015-09-23 12:04:58 +00:00
libvboxfs libsffs: make path names constant 2014-09-30 12:48:10 +00:00
libvirtio Correct bad assignments in various conditions 2016-06-17 20:07:55 +00:00
libvtreefs Resolve more warnings 2015-09-23 12:04:58 +00:00
Makefile libmagicrt: integrate into build system 2016-01-13 20:32:32 +01:00
Makefile.inc New sources layout 2014-07-31 16:00:30 +02:00