Official MINIX sources - Automatically replicated from gerrit.minix3.org
Go to file
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
bin Import NetBSD ps(1) 2016-01-13 20:32:52 +01:00
common w(1): switch to libkvm 2016-01-13 20:32:50 +01:00
crypto Fix ARM noassert builds -g/-O{s/0/1/2/3} 2016-01-24 18:56:38 +01:00
dist/pf/sbin/pfctl Import a subset of PF distribution files 2016-06-18 12:20:46 +00:00
distrib Enable building with MKDEBUG and MKDEBUGLIB 2016-09-10 12:42:45 +02:00
docs Import locale tools and ressource files 2016-07-09 12:18:33 +02:00
etc Enable building with MKDEBUG and MKDEBUGLIB 2016-09-10 12:42:45 +02:00
external Enable building with MKDEBUG and MKDEBUGLIB 2016-09-10 12:42:45 +02:00
games Fix ARM noassert builds -g/-O{s/0/1/2/3} 2016-01-24 18:56:38 +01:00
gnu Improve the process for GNU tools 2016-09-01 21:16:13 +02:00
include Start using sysctl(3) throughout userland 2016-01-13 20:32:45 +01:00
lib Import locale tools and ressource files 2016-07-09 12:18:33 +02:00
libexec ld.elf_so: sysctl support uncommented 2016-01-16 14:04:24 +01:00
minix Add LLVM GCOV coverage support 2016-09-24 22:18:31 +00:00
releasetools made minix3 bootable via EFI 2016-07-02 13:43:03 +02:00
sbin Fix ARM noassert builds -g/-O{s/0/1/2/3} 2016-01-24 18:56:38 +01:00
share Add LLVM GCOV coverage support 2016-09-24 22:18:31 +00:00
sys [boot-i386] Reduce differences with NetBSD 2016-09-10 12:47:42 +02:00
tests tests: add most kyua kernel tests 2016-01-16 14:04:25 +01:00
tools Improve the process for GNU tools 2016-09-01 21:16:13 +02:00
usr.bin Import locale tools and ressource files 2016-07-09 12:18:33 +02:00
usr.sbin Adapt MINIX-specific part of tools/installboot 2016-08-03 08:09:00 +02:00
.gitignore Add LLVM GCOV coverage support 2016-09-24 22:18:31 +00:00
.gitreview build:update 'git review' config to match gerrit.minix3.org 2014-07-28 17:05:15 +02:00
build.sh NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
LICENSE Fix parameter parsing in cut 2010-01-21 10:16:05 +00:00
Makefile NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
Makefile.inc Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC) 2014-07-28 17:05:06 +02:00