]> xenbits.xensource.com Git - xen.git/commitdiff
xen: add a gcov Kconfig option
authorWei Liu <wei.liu2@citrix.com>
Wed, 31 Aug 2016 15:26:52 +0000 (16:26 +0100)
committerWei Liu <wei.liu2@citrix.com>
Wed, 31 Aug 2016 15:37:47 +0000 (16:37 +0100)
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
Config.mk
xen/Kconfig.debug
xen/Rules.mk
xen/common/Makefile

index 9c608960497fb39c06a0f5ea9442a2d98205a679..081ff691c304ddd1ecc1162c051bd4eea0953a77 100644 (file)
--- a/Config.mk
+++ b/Config.mk
@@ -20,9 +20,6 @@ or       = $(if $(strip $(1)),$(1),$(if $(strip $(2)),$(2),$(if $(strip $(3)),$(
 debug ?= y
 debug_symbols ?= $(debug)
 
-# Test coverage support
-coverage ?= n
-
 XEN_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
                          -e s/i86pc/x86_32/ -e s/amd64/x86_64/ \
                          -e s/armv7.*/arm32/ -e s/armv8.*/arm64/ \
index 1be63445e31ee4ad1ec66e296c5376a9dd0c9ab3..06afd80ff8a7ebe0bd34734d10561358cef41b28 100644 (file)
@@ -28,6 +28,11 @@ config FRAME_POINTER
          maybe slower, but it gives very useful debugging information
          in case of any Xen bugs.
 
+config GCOV
+       bool "Gcov Support"
+       ---help---
+         Enable gcov (a test coverage program in GCC) support.
+
 config LOCK_PROFILE
        bool "Lock Profiling"
        ---help---
index 22aca0ac6918cc2d112be4277840c3cd25f698c4..696aaa81fa5971fccad1ce88ffbd7356d8cf8e08 100644 (file)
@@ -115,7 +115,7 @@ subdir-all := $(subdir-y) $(subdir-n)
 
 $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS += -DINIT_SECTIONS_ONLY
 
-ifeq ($(coverage),y)
+ifeq ($(CONFIG_GCOV),y)
 $(filter-out %.init.o $(nogcov-y),$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS += -fprofile-arcs -ftest-coverage -DTEST_COVERAGE
 endif
 
index c2e6846a4362b00afc58ad607fac9fbf64b6f9f6..0fed30bcc64cfecb9ba1886d70f487a38a173b98 100644 (file)
@@ -75,7 +75,7 @@ obj-$(CONFIG_TMEM) += $(tmem-y)
 
 subdir-$(CONFIG_X86) += hvm
 
-subdir-$(coverage) += gcov
+subdir-$(CONFIG_GCOV) += gcov
 
 subdir-y += libelf
 subdir-$(CONFIG_HAS_DEVICE_TREE) += libfdt