summaryrefslogtreecommitdiffstats
path: root/doc/gcov.rst
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2016-07-27 17:43:05 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-08-02 17:31:12 +1000
commitc90c25742ad3d41c66d88c22358ddd2a76194900 (patch)
treee2a0a86502224ae9acb462b7b98e0a772a1a30e3 /doc/gcov.rst
parentcce80be2fc7d9114ea0000349cc52f0947ea00f1 (diff)
downloadtalos-skiboot-c90c25742ad3d41c66d88c22358ddd2a76194900.tar.gz
talos-skiboot-c90c25742ad3d41c66d88c22358ddd2a76194900.zip
doc/*.rst: fix ReSTructured text syntax
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'doc/gcov.rst')
-rw-r--r--doc/gcov.rst41
1 files changed, 25 insertions, 16 deletions
diff --git a/doc/gcov.rst b/doc/gcov.rst
index 956c5c88..d50fbe55 100644
--- a/doc/gcov.rst
+++ b/doc/gcov.rst
@@ -1,11 +1,11 @@
GCOV for skiboot
-----------------
+================
Unit tests
----------
-All unit tests are built+run with gcov enabled.
+All unit tests are built+run with gcov enabled. ::
-make coverage-report
+ make coverage-report
will generate a unit test coverage report like:
http://open-power.github.io/skiboot/coverage-report/
@@ -18,10 +18,11 @@ from real hardware (or a simulator).
Building Skiboot with GCOV
--------------------------
+::
-SKIBOOT_GCOV=1 make
+ SKIBOOT_GCOV=1 make
-You may need to "make clean" first.
+You may need to ``make clean`` first.
This will build a skiboot lid roughly *twice* the size.
@@ -33,28 +34,36 @@ The way we extract the gcov data from a system is by dumping the contents
of skiboot memory and then parsing the data structures in user space with
the extract-gcov utility in the skiboot repo.
-mambo:
+mambo: ::
+
mysim memory fwrite 0x30000000 0x240000 skiboot.dump
-FSP:
+
+FSP: ::
+
getmemproc 30000000 3407872 -fb skiboot.dump
-linux (e.g. petitboot environment):
+
+linux (e.g. petitboot environment): ::
+
dd if=/proc/kcore skip=1572864 count=6656 of=skiboot.dump
You basically need to dump out the first 3MB of skiboot memory.
-Then you need to find out where the gcov data structures are:
-perl -e "printf '0x%x', 0x30000000 + 0x`grep gcov_info_list skiboot.map|cut -f 1 -d ' '`"
+Then you need to find out where the gcov data structures are: ::
+
+ perl -e "printf '0x%x', 0x30000000 + 0x`grep gcov_info_list skiboot.map|cut -f 1 -d ' '`"
-That address needs to be supplied to the extract-gcov utility:
-./extract-gcov skiboot.dump 0x3023ec40
+That address needs to be supplied to the extract-gcov utility: ::
+
+ ./extract-gcov skiboot.dump 0x3023ec40
Once you've run extract-gcov, it will have extracted the gcda files
from the skiboot memory image.
-You can then run lcov:
-lcov -b . -q -c -d . -o skiboot-boot.info \
---gcov-tool
-/opt/cross/gcc-4.8.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcov
+You can then run lcov: ::
+
+ lcov -b . -q -c -d . -o skiboot-boot.info
+ --gcov-tool
+ /opt/cross/gcc-4.8.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcov
*IMPORTANT* you should point lcov to the gcov for the compiler you used
to build skiboot, otherwise you're likely to get errors.
OpenPOWER on IntegriCloud