Add LLVM GCOV coverage supportWith this patch, it is now possible to generate coverage informationfor MINIX3 system services with LLVM. In particular, the system canbe built with MKCOVERAGE=yes,
Add LLVM GCOV coverage supportWith this patch, it is now possible to generate coverage informationfor MINIX3 system services with LLVM. In particular, the system canbe built with MKCOVERAGE=yes, either with a native "make build" orwith crosscompilation. Either way, MKCOVERAGE=yes will build theMINIX3 system services with coverage profiling support, generating a.gcno file for each source module. After a reboot it is possible toobtain runtime coverage data (.gcda files) for individual systemservices using gcov-pull(8). The combination of the .gcno and .gcdafiles can then be inspected with llvm-cov(1).For reasons documented in minix.gcov.mk, only system service programmodules 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 generatedby the LLVM coverage hooks into a serialized format using the routineswe already had for GCC GCOV. Unfortunately, the new llvm_gcov.c codeis LLVM ABI dependent, and may therefore have to be updated later whenwe upgrade LLVM. The current implementation should support all LLVMversions 3.x with x >= 4.The rest of this patch is mostly a light cleanup of our existing GCOVinfrastructure, with as most visible change that gcov-pull(8) nowtakes a service label string rather than a PID number.Change-Id: I6de055359d3d2b3f53e426f3fffb17af7877261f
show more ...
New sources layoutChange-Id: Ic716f336b7071063997cf5b4dae6d50e0b4631e9