aboutsummaryrefslogtreecommitdiff
path: root/Makefile.main
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-05-07 17:11:46 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-05-15 07:59:18 +1000
commitd3cedfba5553227dec328ed0000221ed5c4294ad (patch)
tree70be07441f6b139779792e95588c59c43712468a /Makefile.main
parent614aa6a7833839146de2769a09de355a49b8ed3d (diff)
downloadskiboot-d3cedfba5553227dec328ed0000221ed5c4294ad.zip
skiboot-d3cedfba5553227dec328ed0000221ed5c4294ad.tar.gz
skiboot-d3cedfba5553227dec328ed0000221ed5c4294ad.tar.bz2
Add extract-gcov utility for extracting gcda from skiboot dump
If you dump the (relocated) skiboot memory (2MB, from 0x30000000) and point extract-gcov at it, you'll get a bunch of gcda files extracted in pwd that you can then feed to gcov to get real usage data. This is a different approach than, say, the linux kernel, which when built with gcov provides a debugfs interface to the gcda files that you can just copy with normal userspace utilities. For skiboot, I have no desire to add a VFS style interface and since if you're dealing with GCOV+skiboot you should probably pretty well know what you're doing, parsing the gcov data structures in userspace from a dump of memory is actually not too bad. You can grab this memory from linux, FSP, mambo or any debug mechanism that lets you dump out a section of physical memory. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'Makefile.main')
-rw-r--r--Makefile.main5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile.main b/Makefile.main
index c01b16b..310601d 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -119,7 +119,7 @@ include $(SRC)/libc/Makefile.inc
include $(SRC)/ccan/Makefile.inc
include $(SRC)/$(DEVSRC)/Makefile.inc
-all: $(SUBDIRS) $(TARGET).lid $(TARGET).map
+all: $(SUBDIRS) $(TARGET).lid $(TARGET).map extract-gcov
OBJS := $(ASM) $(CORE) $(HW) $(PLATFORMS) $(LIBFDT) $(LIBFLASH)
ifeq ($(PORE),1)
@@ -171,6 +171,9 @@ version.c: $(SRC)/make_version.sh $(OBJS_NO_VER) .version
.PHONY: coverage
include $(shell find $(SRC)/* -name Makefile.check)
+extract-gcov: extract-gcov.c
+ $(call Q, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) -O0 -g -I . -o $@ $<,$<)
+
coverage-report: skiboot.info
genhtml -q -o $@ $<