[Skiboot] [PATCH 00/11] skiboot gcov support

Stewart Smith stewart at linux.vnet.ibm.com
Thu May 7 17:11:39 AEST 2015


Hi all,

This patch series enables building and running skiboot with gcov support.

With the associated extract-gcov utility, with this patch set, you can
build skiboot with SKIBOOT_GCOV=1, load it onto a machine, boot, and then
extract the gcda files from a memory dump to get gcov/lcov reports on
code coverage for tests on real hardware.

In addition to gcov support, because I had to increase the amount of
memory we reserved for skiboot, I've also increased our HEAP size a bit.
On larger systems, we were getting relatively close to using most of the
heap, and this alleviates that potential problem.

The following things I'm not entirely happy with and would love suggestions:
1) needing to remove the gc-sections options to the linker
2) needing to look at the skiboot log to find the magic address of gcov
   structures to pass to extract-gcov

Stewart Smith (11):
  Make relocate() return specific error as to what went wrong
  Make skiboot able to be 2MB rather than 1MB
  Dump out free space in each memory region on boot.
  Enable SKIBOOT_GCOV build option for building with profiling
  Run gcc constructors
  Construct linked list of gcov data structures
  Add extract-gcov utility for extracting gcda from skiboot dump
  Don't exclude sections during link
  Optimize memset() implementation to do word at a time
  Add 2MB to skiboot heap
  Add basic documentation of skiboot gcov

 Makefile.main               |   11 ++-
 asm/head.S                  |    2 +-
 core/Makefile.inc           |    6 ++
 core/gcov-profiling.c       |  132 ++++++++++++++++++++++++++
 core/init.c                 |   25 +++++
 core/mem_region.c           |   38 +++++++-
 core/relocate.c             |    8 +-
 doc/gcov.txt                |   62 ++++++++++++
 extract-gcov.c              |  220 +++++++++++++++++++++++++++++++++++++++++++
 include/mem-map.h           |   23 +++--
 libc/string/memset.c        |   15 ++-
 libc/test/run-memops-test.c |   16 ++++
 libc/test/run-memops.c      |    3 +
 skiboot.lds.S               |   12 ++-
 14 files changed, 552 insertions(+), 21 deletions(-)
 create mode 100644 core/gcov-profiling.c
 create mode 100644 doc/gcov.txt
 create mode 100644 extract-gcov.c

-- 
1.7.10.4



More information about the Skiboot mailing list