[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v2 0/9] Rework gcov support in Xen



The original implementation of gcov support in Xen has several
limitations:

1. The internal data structures are tied to gcc 3.4 format.
2. The sysctl interface is tied to gcc 3.4 format.
3. The gcov type definition is wrong, doesn't work with 32 bit
   hypervisor, which means arm32 wouldn't work.

Since the hypervisor interface is sysctl, we have the liberty to not
care about backward compatibility. This series completely rewrites the
gcov support inside Xen.

1. Support both gcc 3.4 and 4.7 format, configurable via Kconfig.
2. The sysctl interface is not tied to particular gcc format version.
3. Should work with arm32.

I have tested using both formats on x86. I was able to get gcov to
recognise the extracted data. I haven't really analyse the data in
detail though.

The patch series mostly consists of two parts. The meat is in the
first few patches. A few other patches are added to make available
automatic format detection.

There are still some rough edges, but I feel that this is good enough to post
so that people can review the sysctl interface.

This series can be found at:

git://xenbits.xen.org/people/liuw/xen.git wip.rework-gcov-v$VERSION

Wei.

---
v2: see individual commits for changes.

Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Cc: Tim Deegan <tim@xxxxxxx>
Cc: Wei Liu <wei.liu2@xxxxxxxxxx>

Wei Liu (9):
  Kconfig: use tab instead of space
  Kconfig: add BROKEN config
  xen: delete gcno files in clean target
  xen, tools: rip out old gcov implementation
  gcov: add new interface and 3.4 and 4.7 format support
  gcov: userspace tools to extract and split gcov data
  Config.mk: expand cc-ver a bit
  Config.mk: introduce cc-ifversion
  gcov: provide the capability to select gcov format automatically

 Config.mk                   |  13 +-
 tools/misc/xencov.c         | 111 +++++++-------
 tools/misc/xencov_split     | 288 ++++++++++++-----------------------
 xen/Kconfig                 |   3 +
 xen/Kconfig.debug           |  36 ++++-
 xen/Makefile                |   2 +-
 xen/common/gcov/Makefile    |   7 +-
 xen/common/gcov/gcc_3_4.c   | 363 ++++++++++++++++++++++++++++++++++++++++++++
 xen/common/gcov/gcc_4_7.c   | 201 ++++++++++++++++++++++++
 xen/common/gcov/gcov.c      | 308 ++++++++++++++++++++-----------------
 xen/common/gcov/gcov.h      |  36 +++++
 xen/common/gcov/gcov_base.c |  64 ++++++++
 xen/common/sysctl.c         |   7 +-
 xen/include/public/gcov.h   | 115 --------------
 xen/include/public/sysctl.h |  61 ++++----
 xen/include/xen/gcov.h      |  94 +-----------
 16 files changed, 1076 insertions(+), 633 deletions(-)
 create mode 100644 xen/common/gcov/gcc_3_4.c
 create mode 100644 xen/common/gcov/gcc_4_7.c
 create mode 100644 xen/common/gcov/gcov.h
 create mode 100644 xen/common/gcov/gcov_base.c
 delete mode 100644 xen/include/public/gcov.h

-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.