[llvm-dev] [PATCH for-next 0/9] LLVM coverage support for Xen

Roger Pau Monne via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 26 02:19:29 PDT 2017


Hello,

The following patch series enables LLVM coverage support for the Xen
hypervisor. This first patches are a re-organization of the gcov
support, in order to make the support generic for all coverage
technologies. This is mostly a name change from gcov -> cov in several
places and files, together with the addition of a Kconfig option in
order to enable LLVM coverage.

Patch 7 introduces the actual LLVM coverage support code that allows
fetching the coverage data from Xen. Finally patch 9 adds the
documentation on how to use this feature.

A sample coverage report obtained after booting a PVHv2 Dom0 can be
found at:

http://xenbits.xen.org/people/royger/xen_profile/

Thanks, Roger.

Roger Pau Monne (9):
  gcov: return ENOSYS for unimplemented gcov domctl
  gcov: rename folder and header to coverage
  gcov: rename sysctl and functions
  gcov: introduce hooks for the sysctl
  coverage: introduce generic file
  kconfig: add llvm coverage option
  coverage: introduce support for llvm profiling
  xsm: add bodge when compiling with llvm coverage support
  coverage: add documentation for LLVM coverage

 docs/misc/coverage.markdown               |  47 ++++++++++
 tools/misc/xencov.c                       |  28 +++---
 xen/Kconfig.debug                         |  16 ++++
 xen/Rules.mk                              |   4 +
 xen/common/Makefile                       |   2 +-
 xen/common/{gcov => coverage}/Makefile    |   6 +-
 xen/common/coverage/coverage.c            |  71 ++++++++++++++
 xen/common/{gcov => coverage}/gcc_3_4.c   |   0
 xen/common/{gcov => coverage}/gcc_4_7.c   |   0
 xen/common/{gcov => coverage}/gcc_4_9.c   |   0
 xen/common/{gcov => coverage}/gcc_5.c     |   0
 xen/common/{gcov => coverage}/gcc_7.c     |   0
 xen/common/{gcov => coverage}/gcov.c      |  44 ++-------
 xen/common/{gcov => coverage}/gcov.h      |   0
 xen/common/{gcov => coverage}/gcov_base.c |   0
 xen/common/coverage/llvm.c                | 148 ++++++++++++++++++++++++++++++
 xen/common/sysctl.c                       |   8 +-
 xen/include/public/sysctl.h               |  18 ++--
 xen/include/xen/coverage.h                |  17 ++++
 xen/include/xen/gcov.h                    |   9 --
 xen/include/xsm/dummy.h                   |  14 +++
 21 files changed, 359 insertions(+), 73 deletions(-)
 rename xen/common/{gcov => coverage}/Makefile (82%)
 create mode 100644 xen/common/coverage/coverage.c
 rename xen/common/{gcov => coverage}/gcc_3_4.c (100%)
 rename xen/common/{gcov => coverage}/gcc_4_7.c (100%)
 rename xen/common/{gcov => coverage}/gcc_4_9.c (100%)
 rename xen/common/{gcov => coverage}/gcc_5.c (100%)
 rename xen/common/{gcov => coverage}/gcc_7.c (100%)
 rename xen/common/{gcov => coverage}/gcov.c (88%)
 rename xen/common/{gcov => coverage}/gcov.h (100%)
 rename xen/common/{gcov => coverage}/gcov_base.c (100%)
 create mode 100644 xen/common/coverage/llvm.c
 create mode 100644 xen/include/xen/coverage.h
 delete mode 100644 xen/include/xen/gcov.h

-- 
2.13.5 (Apple Git-94)



More information about the llvm-dev mailing list