From d3cedfba5553227dec328ed0000221ed5c4294ad Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Thu, 7 May 2015 17:11:46 +1000 Subject: 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 --- Makefile.main | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile.main') 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 $@ $< -- cgit v1.1