summaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
authorZach Clark <zach@ibm.com>2019-05-01 11:18:13 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-05-13 09:10:45 -0500
commit6a2bedba84d0cc0b4a8837341e516a491218b729 (patch)
tree97b465ab89b43692408a5d2329ff7fdb6a65f185 /makefile
parent06d0a08aa27fa9e28cc300fbd2814fd9b84d59cf (diff)
downloadtalos-hostboot-6a2bedba84d0cc0b4a8837341e516a491218b729.tar.gz
talos-hostboot-6a2bedba84d0cc0b4a8837341e516a491218b729.zip
Developer Improvement: Get code coverage tool working with Hostboot
This commit fixes GCOV code coverage for P9 with GCC 4.9.2 Change-Id: Ie1e7c35f67414531dbd6e7a771ac1529a9ebd59d RTC: 208351 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/76812 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'makefile')
-rw-r--r--makefile26
1 files changed, 20 insertions, 6 deletions
diff --git a/makefile b/makefile
index 16217fd5d..fc344b76c 100644
--- a/makefile
+++ b/makefile
@@ -56,14 +56,28 @@ docs: src/build/doxygen/doxygen.conf
citest:
src/build/citest/cxxtest-start.sh
+gcov: HOSTBOOT_PROFILE := 1
+
+export HOSTBOOT_PROFILE
+
.PHONY: gcov
gcov:
- rm -rf obj/gcov/*
- $(MAKE) gcov_pass
- find obj/gcov/ -size 0c | xargs rm # Delete empty files.
- genhtml obj/gcov/*.lcov -o obj/gcov/html --prefix `pwd` \
- --title `git describe --dirty`
- @echo "View GCOV results with: firefox obj/gcov/html/index.html"
+ @echo Building Hostboot with profiling enabled.
+ $(MAKE)
+ @echo Run simics and execute the hb-Gcov command at the end of the simulation to extract gcov data.
+ @echo Then you can "make lcov" to generate the coverage report.
+
+.PHONY: lcov
+lcov:
+ rm -f obj/lcov_data
+ lcov -c --dir . -o obj/lcov_data --gcov-tool $(GCOV)
+ rm -rf obj/gcov_report
+ genhtml obj/lcov_data -o obj/gcov_report --ignore-errors source
+ @echo Coverage report now available in obj/gcov_report
+
+.PHONY: gcda_clean
+gcda_clean:
+ find -name '*.gcda' -exec rm -f {} \;
$(GENDIR)/hwp_id.html :
$(ROOTPATH)/src/build/tools/hwp_id.pl -i -l > $@
OpenPOWER on IntegriCloud