From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Wei Liu <wei.liu2@citrix.com>, philippe.gabriel@citrix.com
Subject: [RFC PATCH 0/8] Rework gcov support in Xen
Date: Thu, 6 Oct 2016 15:37:30 +0100 [thread overview]
Message-ID: <1475764658-30809-1-git-send-email-wei.liu2@citrix.com> (raw)
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.
Wei.
Wei Liu (8):
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/Makefile | 2 +-
tools/misc/xencov.c | 111 +++++++-------
tools/misc/xencov_split | 288 ++++++++++++-----------------------
xen/Kconfig | 3 +
xen/Kconfig.debug | 30 +++-
xen/Makefile | 1 +
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 | 305 ++++++++++++++++++++-----------------
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 | 59 ++++---
xen/include/xen/gcov.h | 94 +-----------
17 files changed, 1070 insertions(+), 629 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@lists.xen.org
https://lists.xen.org/xen-devel
next reply other threads:[~2016-10-06 14:37 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-06 14:37 Wei Liu [this message]
2016-10-06 14:37 ` [RFC PATCH 1/8] Kconfig: add BROKEN config Wei Liu
2016-10-07 9:48 ` Jan Beulich
2016-10-06 14:37 ` [RFC PATCH 2/8] xen: delete gcno files in clean target Wei Liu
2016-10-06 14:55 ` Andrew Cooper
2016-10-06 15:00 ` Wei Liu
2016-10-06 14:37 ` [RFC PATCH 3/8] xen, tools: rip out old gcov implementation Wei Liu
2016-10-06 14:37 ` [RFC PATCH 4/8] gcov: add new interface and 3.4 and 4.7 format support Wei Liu
2016-10-07 11:06 ` Jan Beulich
2016-10-07 11:10 ` Wei Liu
2016-10-07 11:43 ` Wei Liu
2016-10-07 11:52 ` Jan Beulich
2016-10-07 11:54 ` Wei Liu
2016-10-06 14:37 ` [RFC PATCH 5/8] gcov: userspace tools to extract and split gcov data Wei Liu
2016-10-07 10:47 ` Andrew Cooper
2016-10-07 10:49 ` Wei Liu
2016-10-06 14:37 ` [RFC PATCH 6/8] Config.mk: expand cc-ver a bit Wei Liu
2016-10-07 9:52 ` Jan Beulich
2016-10-07 10:13 ` Wei Liu
2016-10-06 14:37 ` [RFC PATCH 7/8] Config.mk: introduce cc-ifversion Wei Liu
2016-10-06 14:37 ` [RFC PATCH 8/8] gcov: provide the capability to select gcov format automatically Wei Liu
2016-10-07 9:55 ` Jan Beulich
2016-10-07 11:06 ` Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1475764658-30809-1-git-send-email-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=philippe.gabriel@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).