All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/7] LLVM coverage support for Xen
@ 2018-01-24 10:01 Roger Pau Monne
  2018-01-24 10:01 ` [PATCH v3 1/7] gcov: rename sysctl and functions Roger Pau Monne
                   ` (7 more replies)
  0 siblings, 8 replies; 30+ messages in thread
From: Roger Pau Monne @ 2018-01-24 10:01 UTC (permalink / raw)
  To: xen-devel; +Cc: Roger Pau Monne

Hello,

The following patch series enables LLVM coverage support for the Xen
hypervisor. A sample coverage report obtained after booting a PVHv2 Dom0
can be found at:

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

I know the time is not the most appropriate given all the security work
going on, but it seems like the series is quite close, and I would ike
to avoid it bitrotting.

Thanks, Roger.

Roger Pau Monne (7):
  gcov: rename sysctl and functions
  gcov: introduce hooks for the sysctl
  coverage: introduce generic file
  kconfig/gcov: rename to coverage
  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    |  49 ++++++++++++-
 tools/misc/xencov.c            |  28 ++++----
 xen/Kconfig.debug              |   6 +-
 xen/Rules.mk                   |   9 ++-
 xen/common/Makefile            |   2 +-
 xen/common/coverage/Makefile   |   5 ++
 xen/common/coverage/coverage.c |  73 +++++++++++++++++++
 xen/common/coverage/coverage.h |  23 ++++++
 xen/common/coverage/gcov.c     |  42 ++---------
 xen/common/coverage/llvm.c     | 154 +++++++++++++++++++++++++++++++++++++++++
 xen/common/sysctl.c            |   6 +-
 xen/include/public/sysctl.h    |  18 +++--
 xen/include/xen/coverage.h     |   9 ++-
 xen/include/xsm/dummy.h        |  14 ++++
 14 files changed, 369 insertions(+), 69 deletions(-)
 create mode 100644 xen/common/coverage/coverage.c
 create mode 100644 xen/common/coverage/coverage.h
 create mode 100644 xen/common/coverage/llvm.c

-- 
2.15.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH v3 1/7] gcov: rename sysctl and functions
  2018-01-24 10:01 [PATCH v3 0/7] LLVM coverage support for Xen Roger Pau Monne
@ 2018-01-24 10:01 ` Roger Pau Monne
  2018-01-24 11:13   ` Wei Liu
  2018-01-24 10:01 ` [PATCH v3 2/7] gcov: introduce hooks for the sysctl Roger Pau Monne
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 30+ messages in thread
From: Roger Pau Monne @ 2018-01-24 10:01 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, Roger Pau Monne

Change gcov to cov (for internal interfaces) or coverage (for the
public ones).

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Tim Deegan <tim@xen.org>
---
Changes since v1:
 - Use coverage instead of cov in the public interface.
---
 tools/misc/xencov.c         | 28 ++++++++++++++--------------
 xen/common/coverage/gcov.c  |  8 ++++----
 xen/common/sysctl.c         |  4 ++--
 xen/include/public/sysctl.h | 12 ++++++------
 xen/include/xen/coverage.h  |  2 +-
 5 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/tools/misc/xencov.c b/tools/misc/xencov.c
index 4130f425dc..e5b40dba9c 100644
--- a/tools/misc/xencov.c
+++ b/tools/misc/xencov.c
@@ -26,31 +26,31 @@
 
 static xc_interface *xch = NULL;
 
-int gcov_sysctl(int op, struct xen_sysctl *sysctl,
-                struct xc_hypercall_buffer *buf, uint32_t buf_size)
+int cov_sysctl(int op, struct xen_sysctl *sysctl,
+               struct xc_hypercall_buffer *buf, uint32_t buf_size)
 {
     DECLARE_HYPERCALL_BUFFER_ARGUMENT(buf);
 
     memset(sysctl, 0, sizeof(*sysctl));
-    sysctl->cmd = XEN_SYSCTL_gcov_op;
+    sysctl->cmd = XEN_SYSCTL_coverage_op;
 
-    sysctl->u.gcov_op.cmd = op;
-    sysctl->u.gcov_op.size = buf_size;
-    set_xen_guest_handle(sysctl->u.gcov_op.buffer, buf);
+    sysctl->u.coverage_op.cmd = op;
+    sysctl->u.coverage_op.size = buf_size;
+    set_xen_guest_handle(sysctl->u.coverage_op.buffer, buf);
 
     return xc_sysctl(xch, sysctl);
 }
 
-static void gcov_read(const char *fn)
+static void cov_read(const char *fn)
 {
     struct xen_sysctl sys;
     uint32_t total_len;
     DECLARE_HYPERCALL_BUFFER(uint8_t, p);
     FILE *f;
 
-    if (gcov_sysctl(XEN_SYSCTL_GCOV_get_size, &sys, NULL, 0) < 0)
+    if (cov_sysctl(XEN_SYSCTL_COVERAGE_get_size, &sys, NULL, 0) < 0)
         err(1, "getting total length");
-    total_len = sys.u.gcov_op.size;
+    total_len = sys.u.coverage_op.size;
 
     /* Shouldn't exceed a few hundred kilobytes */
     if (total_len > 8u * 1024u * 1024u)
@@ -61,7 +61,7 @@ static void gcov_read(const char *fn)
         err(1, "allocating buffer");
 
     memset(p, 0, total_len);
-    if (gcov_sysctl(XEN_SYSCTL_GCOV_read, &sys, HYPERCALL_BUFFER(p),
+    if (cov_sysctl(XEN_SYSCTL_COVERAGE_read, &sys, HYPERCALL_BUFFER(p),
                     total_len) < 0)
         err(1, "getting gcov data");
 
@@ -82,11 +82,11 @@ static void gcov_read(const char *fn)
     xc_hypercall_buffer_free(xch, p);
 }
 
-static void gcov_reset(void)
+static void cov_reset(void)
 {
     struct xen_sysctl sys;
 
-    if (gcov_sysctl(XEN_SYSCTL_GCOV_reset, &sys, NULL, 0) < 0)
+    if (cov_sysctl(XEN_SYSCTL_COVERAGE_reset, &sys, NULL, 0) < 0)
         err(1, "resetting gcov information");
 }
 
@@ -126,9 +126,9 @@ int main(int argc, char **argv)
         err(1, "opening xc interface");
 
     if (strcmp(argv[0], "reset") == 0)
-        gcov_reset();
+        cov_reset();
     else if (strcmp(argv[0], "read") == 0)
-        gcov_read(argc > 1 ? argv[1] : "-");
+        cov_read(argc > 1 ? argv[1] : "-");
     else
         usage(1);
 
diff --git a/xen/common/coverage/gcov.c b/xen/common/coverage/gcov.c
index 283d2eec86..798032cbbb 100644
--- a/xen/common/coverage/gcov.c
+++ b/xen/common/coverage/gcov.c
@@ -209,18 +209,18 @@ static int gcov_dump_all(XEN_GUEST_HANDLE_PARAM(char) buffer,
     return ret;
 }
 
-int sysctl_gcov_op(struct xen_sysctl_gcov_op *op)
+int sysctl_cov_op(struct xen_sysctl_coverage_op *op)
 {
     int ret;
 
     switch ( op->cmd )
     {
-    case XEN_SYSCTL_GCOV_get_size:
+    case XEN_SYSCTL_COVERAGE_get_size:
         op->size = gcov_get_size();
         ret = 0;
         break;
 
-    case XEN_SYSCTL_GCOV_read:
+    case XEN_SYSCTL_COVERAGE_read:
     {
         XEN_GUEST_HANDLE_PARAM(char) buf;
         uint32_t size = op->size;
@@ -233,7 +233,7 @@ int sysctl_gcov_op(struct xen_sysctl_gcov_op *op)
         break;
     }
 
-    case XEN_SYSCTL_GCOV_reset:
+    case XEN_SYSCTL_COVERAGE_reset:
         gcov_reset_all_counters();
         ret = 0;
         break;
diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
index 56def766e6..f2ae6295ff 100644
--- a/xen/common/sysctl.c
+++ b/xen/common/sysctl.c
@@ -397,8 +397,8 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl)
     break;
 
 #ifdef CONFIG_GCOV
-    case XEN_SYSCTL_gcov_op:
-        ret = sysctl_gcov_op(&op->u.gcov_op);
+    case XEN_SYSCTL_coverage_op:
+        ret = sysctl_cov_op(&op->u.coverage_op);
         copyback = 1;
         break;
 #endif
diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h
index f7f26c38e3..ef10368d79 100644
--- a/xen/include/public/sysctl.h
+++ b/xen/include/public/sysctl.h
@@ -646,11 +646,11 @@ struct xen_sysctl_scheduler_op {
 
 #define XEN_GCOV_FORMAT_MAGIC    0x58434f56 /* XCOV */
 
-#define XEN_SYSCTL_GCOV_get_size 0 /* Get total size of output data */
-#define XEN_SYSCTL_GCOV_read     1 /* Read output data */
-#define XEN_SYSCTL_GCOV_reset    2 /* Reset all counters */
+#define XEN_SYSCTL_COVERAGE_get_size 0 /* Get total size of output data */
+#define XEN_SYSCTL_COVERAGE_read     1 /* Read output data */
+#define XEN_SYSCTL_COVERAGE_reset    2 /* Reset all counters */
 
-struct xen_sysctl_gcov_op {
+struct xen_sysctl_coverage_op {
     uint32_t cmd;
     uint32_t size; /* IN/OUT: size of the buffer  */
     XEN_GUEST_HANDLE_64(char) buffer; /* OUT */
@@ -1073,7 +1073,7 @@ struct xen_sysctl {
 #define XEN_SYSCTL_numainfo                      17
 #define XEN_SYSCTL_cpupool_op                    18
 #define XEN_SYSCTL_scheduler_op                  19
-#define XEN_SYSCTL_gcov_op                       20
+#define XEN_SYSCTL_coverage_op                   20
 #define XEN_SYSCTL_psr_cmt_op                    21
 #define XEN_SYSCTL_pcitopoinfo                   22
 #define XEN_SYSCTL_psr_alloc                     23
@@ -1103,7 +1103,7 @@ struct xen_sysctl {
         struct xen_sysctl_lockprof_op       lockprof_op;
         struct xen_sysctl_cpupool_op        cpupool_op;
         struct xen_sysctl_scheduler_op      scheduler_op;
-        struct xen_sysctl_gcov_op           gcov_op;
+        struct xen_sysctl_coverage_op       coverage_op;
         struct xen_sysctl_psr_cmt_op        psr_cmt_op;
         struct xen_sysctl_psr_alloc         psr_alloc;
         struct xen_sysctl_tmem_op           tmem_op;
diff --git a/xen/include/xen/coverage.h b/xen/include/xen/coverage.h
index b34c304cba..daddef37d3 100644
--- a/xen/include/xen/coverage.h
+++ b/xen/include/xen/coverage.h
@@ -3,7 +3,7 @@
 
 #ifdef CONFIG_GCOV
 #include <public/sysctl.h>
-int sysctl_gcov_op(struct xen_sysctl_gcov_op *op);
+int sysctl_cov_op(struct xen_sysctl_coverage_op *op);
 #endif
 
 #endif	/* _XEN_GCOV_H */
-- 
2.15.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 2/7] gcov: introduce hooks for the sysctl
  2018-01-24 10:01 [PATCH v3 0/7] LLVM coverage support for Xen Roger Pau Monne
  2018-01-24 10:01 ` [PATCH v3 1/7] gcov: rename sysctl and functions Roger Pau Monne
@ 2018-01-24 10:01 ` Roger Pau Monne
  2018-01-24 11:13   ` Wei Liu
  2018-01-24 10:01 ` [PATCH v3 3/7] coverage: introduce generic file Roger Pau Monne
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 30+ messages in thread
From: Roger Pau Monne @ 2018-01-24 10:01 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, Roger Pau Monne

So that other implementations of the sysctl can be added.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>
---
Changes since v2:
 - Add editor block.

Changes since v1:
 - Constify cov_ops.
 - Introduce a local coverage.h provate header and place the
   definition of cov_sysctl_ops there.
---
 xen/common/coverage/coverage.h | 22 ++++++++++++++++++++++
 xen/common/coverage/gcov.c     | 13 ++++++++++---
 2 files changed, 32 insertions(+), 3 deletions(-)
 create mode 100644 xen/common/coverage/coverage.h

diff --git a/xen/common/coverage/coverage.h b/xen/common/coverage/coverage.h
new file mode 100644
index 0000000000..9991939b70
--- /dev/null
+++ b/xen/common/coverage/coverage.h
@@ -0,0 +1,22 @@
+#ifndef _XEN_COV_PRIV_H
+#define _XEN_COV_PRIV_H
+
+#include <xen/types.h>
+
+struct cov_sysctl_ops {
+    uint32_t (*get_size)(void);
+    void     (*reset_counters)(void);
+    int      (*dump)(XEN_GUEST_HANDLE_PARAM(char), uint32_t *);
+};
+
+#endif
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/common/coverage/gcov.c b/xen/common/coverage/gcov.c
index 798032cbbb..8627ef3355 100644
--- a/xen/common/coverage/gcov.c
+++ b/xen/common/coverage/gcov.c
@@ -22,6 +22,7 @@
 
 #include <public/sysctl.h>
 
+#include "coverage.h"
 #include "gcov.h"
 
 /**
@@ -209,6 +210,12 @@ static int gcov_dump_all(XEN_GUEST_HANDLE_PARAM(char) buffer,
     return ret;
 }
 
+static const struct cov_sysctl_ops cov_ops = {
+    .get_size = gcov_get_size,
+    .reset_counters = gcov_reset_all_counters,
+    .dump = gcov_dump_all,
+};
+
 int sysctl_cov_op(struct xen_sysctl_coverage_op *op)
 {
     int ret;
@@ -216,7 +223,7 @@ int sysctl_cov_op(struct xen_sysctl_coverage_op *op)
     switch ( op->cmd )
     {
     case XEN_SYSCTL_COVERAGE_get_size:
-        op->size = gcov_get_size();
+        op->size = cov_ops.get_size();
         ret = 0;
         break;
 
@@ -227,14 +234,14 @@ int sysctl_cov_op(struct xen_sysctl_coverage_op *op)
 
         buf = guest_handle_cast(op->buffer, char);
 
-        ret = gcov_dump_all(buf, &size);
+        ret = cov_ops.dump(buf, &size);
         op->size = size;
 
         break;
     }
 
     case XEN_SYSCTL_COVERAGE_reset:
-        gcov_reset_all_counters();
+        cov_ops.reset_counters();
         ret = 0;
         break;
 
-- 
2.15.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 3/7] coverage: introduce generic file
  2018-01-24 10:01 [PATCH v3 0/7] LLVM coverage support for Xen Roger Pau Monne
  2018-01-24 10:01 ` [PATCH v3 1/7] gcov: rename sysctl and functions Roger Pau Monne
  2018-01-24 10:01 ` [PATCH v3 2/7] gcov: introduce hooks for the sysctl Roger Pau Monne
@ 2018-01-24 10:01 ` Roger Pau Monne
  2018-01-24 11:14   ` Wei Liu
  2018-01-25 14:47   ` Konrad Rzeszutek Wilk
  2018-01-24 10:01 ` [PATCH v3 4/7] kconfig/gcov: rename to coverage Roger Pau Monne
                   ` (4 subsequent siblings)
  7 siblings, 2 replies; 30+ messages in thread
From: Roger Pau Monne @ 2018-01-24 10:01 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, Roger Pau Monne

It will contain the generic implementation of sysctl_cov_op, which
will be shared between all the coverage implementations.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>
---
Changes since v1:
 - Use private coverage.h header.
 - Sort alphabetically the obj-y list.
---
 xen/common/coverage/Makefile   |  2 +-
 xen/common/coverage/coverage.c | 73 ++++++++++++++++++++++++++++++++++++++++++
 xen/common/coverage/coverage.h |  1 +
 xen/common/coverage/gcov.c     | 39 +---------------------
 4 files changed, 76 insertions(+), 39 deletions(-)
 create mode 100644 xen/common/coverage/coverage.c

diff --git a/xen/common/coverage/Makefile b/xen/common/coverage/Makefile
index a7a48494ca..5387bc6429 100644
--- a/xen/common/coverage/Makefile
+++ b/xen/common/coverage/Makefile
@@ -1,4 +1,4 @@
-obj-y += gcov_base.o gcov.o
+obj-y += coverage.o gcov_base.o gcov.o
 obj-y += $(call cc-ifversion,lt,0x040700, \
 		gcc_3_4.o, $(call cc-ifversion,lt,0x040900, \
 		gcc_4_7.o, $(call cc-ifversion,lt,0x050000, \
diff --git a/xen/common/coverage/coverage.c b/xen/common/coverage/coverage.c
new file mode 100644
index 0000000000..bd90f28663
--- /dev/null
+++ b/xen/common/coverage/coverage.c
@@ -0,0 +1,73 @@
+/*
+ * Generic functionality for coverage analysis.
+ *
+ * Copyright (C) 2017 Citrix Systems R&D
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms and conditions of the GNU General Public
+ * License, version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <xen/errno.h>
+#include <xen/guest_access.h>
+#include <xen/types.h>
+#include <xen/coverage.h>
+
+#include <public/sysctl.h>
+
+#include "coverage.h"
+
+int sysctl_cov_op(struct xen_sysctl_coverage_op *op)
+{
+    int ret;
+
+    switch ( op->cmd )
+    {
+    case XEN_SYSCTL_COVERAGE_get_size:
+        op->size = cov_ops.get_size();
+        ret = 0;
+        break;
+
+    case XEN_SYSCTL_COVERAGE_read:
+    {
+        XEN_GUEST_HANDLE_PARAM(char) buf;
+        uint32_t size = op->size;
+
+        buf = guest_handle_cast(op->buffer, char);
+
+        ret = cov_ops.dump(buf, &size);
+        op->size = size;
+
+        break;
+    }
+
+    case XEN_SYSCTL_COVERAGE_reset:
+        cov_ops.reset_counters();
+        ret = 0;
+        break;
+
+    default:
+        ret = -EOPNOTSUPP;
+        break;
+    }
+
+    return ret;
+}
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/common/coverage/coverage.h b/xen/common/coverage/coverage.h
index 9991939b70..aa66396c08 100644
--- a/xen/common/coverage/coverage.h
+++ b/xen/common/coverage/coverage.h
@@ -8,6 +8,7 @@ struct cov_sysctl_ops {
     void     (*reset_counters)(void);
     int      (*dump)(XEN_GUEST_HANDLE_PARAM(char), uint32_t *);
 };
+extern const struct cov_sysctl_ops cov_ops;
 
 #endif
 
diff --git a/xen/common/coverage/gcov.c b/xen/common/coverage/gcov.c
index 8627ef3355..3cc98728bf 100644
--- a/xen/common/coverage/gcov.c
+++ b/xen/common/coverage/gcov.c
@@ -210,49 +210,12 @@ static int gcov_dump_all(XEN_GUEST_HANDLE_PARAM(char) buffer,
     return ret;
 }
 
-static const struct cov_sysctl_ops cov_ops = {
+const struct cov_sysctl_ops cov_ops = {
     .get_size = gcov_get_size,
     .reset_counters = gcov_reset_all_counters,
     .dump = gcov_dump_all,
 };
 
-int sysctl_cov_op(struct xen_sysctl_coverage_op *op)
-{
-    int ret;
-
-    switch ( op->cmd )
-    {
-    case XEN_SYSCTL_COVERAGE_get_size:
-        op->size = cov_ops.get_size();
-        ret = 0;
-        break;
-
-    case XEN_SYSCTL_COVERAGE_read:
-    {
-        XEN_GUEST_HANDLE_PARAM(char) buf;
-        uint32_t size = op->size;
-
-        buf = guest_handle_cast(op->buffer, char);
-
-        ret = cov_ops.dump(buf, &size);
-        op->size = size;
-
-        break;
-    }
-
-    case XEN_SYSCTL_COVERAGE_reset:
-        cov_ops.reset_counters();
-        ret = 0;
-        break;
-
-    default:
-        ret = -EOPNOTSUPP;
-        break;
-    }
-
-    return ret;
-}
-
 /*
  * Local variables:
  * mode: C
-- 
2.15.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 4/7] kconfig/gcov: rename to coverage
  2018-01-24 10:01 [PATCH v3 0/7] LLVM coverage support for Xen Roger Pau Monne
                   ` (2 preceding siblings ...)
  2018-01-24 10:01 ` [PATCH v3 3/7] coverage: introduce generic file Roger Pau Monne
@ 2018-01-24 10:01 ` Roger Pau Monne
  2018-01-24 11:17   ` Wei Liu
  2018-01-24 11:27   ` [PATCH v3 " Ian Jackson
  2018-01-24 10:01 ` [PATCH v3 5/7] coverage: introduce support for llvm profiling Roger Pau Monne
                   ` (3 subsequent siblings)
  7 siblings, 2 replies; 30+ messages in thread
From: Roger Pau Monne @ 2018-01-24 10:01 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, Roger Pau Monne

So it can be used by both gcc and clang. Just add the Kconfig option
and modify the makefiles so the llvm coverage specific code can be
added in a follow up patch.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>
---
Changes since v2:
 - select SUPPRESS_DUPLICATE_SYMBOL_WARNINGS when enabling coverage
   support in Kconfig.
 - Introduce COV_FLAGS to store the compiler flags to enable coverage
   support for clang and gcc.
 - Return -EOPNOTSUPP in sysctl_cov_op if not implemented.

Changes since v1:
 - Use a choice in kconfig to select code coverage technology.
 - Compile coverage.c regardless of selected code coverage technology.
 - Introduce an unimplemented sysctl_cov_op function if
   CONFIG_COVERAGE is not set.
---
 docs/misc/coverage.markdown  | 2 +-
 xen/Kconfig.debug            | 6 +++---
 xen/Rules.mk                 | 9 +++++++--
 xen/common/Makefile          | 2 +-
 xen/common/coverage/Makefile | 5 ++++-
 xen/common/sysctl.c          | 2 --
 xen/include/xen/coverage.h   | 7 ++++++-
 7 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/docs/misc/coverage.markdown b/docs/misc/coverage.markdown
index b47aba2648..430cd27b2f 100644
--- a/docs/misc/coverage.markdown
+++ b/docs/misc/coverage.markdown
@@ -10,7 +10,7 @@ down your hypervisor.
 
 ## Enable coverage
 
-Test coverage support can be turned on compiling Xen with the `CONFIG_GCOV`
+Test coverage support can be turned on compiling Xen with the `CONFIG_COVERAGE`
 option set to `y`.
 
 Change your `.config` or run `make -C xen menuconfig`.
diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug
index 7bb0465b5d..380c4e8d75 100644
--- a/xen/Kconfig.debug
+++ b/xen/Kconfig.debug
@@ -28,12 +28,12 @@ config FRAME_POINTER
 	  maybe slower, but it gives very useful debugging information
 	  in case of any Xen bugs.
 
-config GCOV
-	bool "Gcov Support"
+config COVERAGE
+	bool "Code coverage support"
 	depends on !LIVEPATCH
 	select SUPPRESS_DUPLICATE_SYMBOL_WARNINGS
 	---help---
-	  Enable gcov (a test coverage program in GCC) support.
+	  Enable code coverage support.
 
 	  If unsure, say N here.
 
diff --git a/xen/Rules.mk b/xen/Rules.mk
index 3cf40754a6..0bc40fd0e6 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -115,8 +115,13 @@ subdir-all := $(subdir-y) $(subdir-n)
 
 $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS += -DINIT_SECTIONS_ONLY
 
-ifeq ($(CONFIG_GCOV),y)
-$(filter-out %.init.o $(nogcov-y),$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS += -fprofile-arcs -ftest-coverage
+ifeq ($(CONFIG_COVERAGE),y)
+ifeq ($(clang),y)
+    COV_FLAGS := -fprofile-instr-generate -fcoverage-mapping
+else
+    COV_FLAGS := -fprofile-arcs -ftest-coverage
+endif
+    $(filter-out %.init.o $(nogcov-y),$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS += $(COV_FLAGS)
 endif
 
 ifeq ($(CONFIG_UBSAN),y)
diff --git a/xen/common/Makefile b/xen/common/Makefile
index ad181636f6..3a349f478b 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -74,7 +74,7 @@ tmem-y := tmem.o tmem_xen.o tmem_control.o
 tmem-$(CONFIG_COMPAT) += compat/tmem_xen.o
 obj-$(CONFIG_TMEM) += $(tmem-y)
 
-subdir-$(CONFIG_GCOV) += coverage
+subdir-$(CONFIG_COVERAGE) += coverage
 subdir-$(CONFIG_UBSAN) += ubsan
 
 subdir-y += libelf
diff --git a/xen/common/coverage/Makefile b/xen/common/coverage/Makefile
index 5387bc6429..1039a160c4 100644
--- a/xen/common/coverage/Makefile
+++ b/xen/common/coverage/Makefile
@@ -1,6 +1,9 @@
-obj-y += coverage.o gcov_base.o gcov.o
+obj-y += coverage.o
+ifneq ($(clang),y)
+obj-y += gcov_base.o gcov.o
 obj-y += $(call cc-ifversion,lt,0x040700, \
 		gcc_3_4.o, $(call cc-ifversion,lt,0x040900, \
 		gcc_4_7.o, $(call cc-ifversion,lt,0x050000, \
 		gcc_4_9.o, $(call cc-ifversion,lt,0x070000, \
 		gcc_5.o, gcc_7.o))))
+endif
diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
index f2ae6295ff..8e83c33a16 100644
--- a/xen/common/sysctl.c
+++ b/xen/common/sysctl.c
@@ -396,12 +396,10 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl)
     }
     break;
 
-#ifdef CONFIG_GCOV
     case XEN_SYSCTL_coverage_op:
         ret = sysctl_cov_op(&op->u.coverage_op);
         copyback = 1;
         break;
-#endif
 
 #ifdef CONFIG_HAS_PCI
     case XEN_SYSCTL_pcitopoinfo:
diff --git a/xen/include/xen/coverage.h b/xen/include/xen/coverage.h
index daddef37d3..ba5fb67947 100644
--- a/xen/include/xen/coverage.h
+++ b/xen/include/xen/coverage.h
@@ -1,9 +1,14 @@
 #ifndef _XEN_COV_H
 #define _XEN_COV_H
 
-#ifdef CONFIG_GCOV
+#ifdef CONFIG_COVERAGE
 #include <public/sysctl.h>
 int sysctl_cov_op(struct xen_sysctl_coverage_op *op);
+#else
+static inline int sysctl_cov_op(void *unused)
+{
+    return -EOPNOTSUPP;
+}
 #endif
 
 #endif	/* _XEN_GCOV_H */
-- 
2.15.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 5/7] coverage: introduce support for llvm profiling
  2018-01-24 10:01 [PATCH v3 0/7] LLVM coverage support for Xen Roger Pau Monne
                   ` (3 preceding siblings ...)
  2018-01-24 10:01 ` [PATCH v3 4/7] kconfig/gcov: rename to coverage Roger Pau Monne
@ 2018-01-24 10:01 ` Roger Pau Monne
  2018-01-24 11:18   ` Wei Liu
  2018-01-24 10:01 ` [PATCH v3 6/7] xsm: add bodge when compiling with llvm coverage support Roger Pau Monne
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 30+ messages in thread
From: Roger Pau Monne @ 2018-01-24 10:01 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, Roger Pau Monne

Introduce the functionality in order to fill the hooks of the
cov_sysctl_ops struct. Note that the functionality is still not wired
into the build system.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>
---
Note that the file that contains the helpers is under a BSD 2-clause
license. This is done so it can be shared with other OSes that use the
llvm/clang compiler.
---
Changes since v1:
 - Include private coverage.h header.
 - Define LLVM_PROFILE_MAGIC based on the bitness of the arch.
 - Add a comment regarding __llvm_profile_runtime.
 - Constify data/names extern symbols.
 - Use defines instead of variables to store the addresses of the
   external symbols.
 - Parenthesize size in APPEND_TO_BUFFER.
 - Use >= for minor version check.
 - Use sizeof(header).
---
 xen/common/coverage/Makefile |   2 +
 xen/common/coverage/llvm.c   | 154 +++++++++++++++++++++++++++++++++++++++++++
 xen/include/public/sysctl.h  |   6 ++
 3 files changed, 162 insertions(+)
 create mode 100644 xen/common/coverage/llvm.c

diff --git a/xen/common/coverage/Makefile b/xen/common/coverage/Makefile
index 1039a160c4..46c78d1086 100644
--- a/xen/common/coverage/Makefile
+++ b/xen/common/coverage/Makefile
@@ -6,4 +6,6 @@ obj-y += $(call cc-ifversion,lt,0x040700, \
 		gcc_4_7.o, $(call cc-ifversion,lt,0x050000, \
 		gcc_4_9.o, $(call cc-ifversion,lt,0x070000, \
 		gcc_5.o, gcc_7.o))))
+else
+obj-y += llvm.o
 endif
diff --git a/xen/common/coverage/llvm.c b/xen/common/coverage/llvm.c
new file mode 100644
index 0000000000..889699a9a0
--- /dev/null
+++ b/xen/common/coverage/llvm.c
@@ -0,0 +1,154 @@
+/*
+ * Copyright (C) 2017 Citrix Systems R&D
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <xen/errno.h>
+#include <xen/guest_access.h>
+#include <xen/types.h>
+
+#include "coverage.h"
+
+#ifndef __clang__
+#error "LLVM coverage selected without clang compiler"
+#endif
+
+#if BITS_PER_LONG == 64
+#define LLVM_PROFILE_MAGIC (((uint64_t)255 << 56) | ((uint64_t)'l' << 48) | \
+    ((uint64_t)'p' << 40) | ((uint64_t)'r' << 32) | ((uint64_t)'o' << 24) | \
+    ((uint64_t)'f' << 16) | ((uint64_t)'r' << 8)  | ((uint64_t)129))
+#else
+#define LLVM_PROFILE_MAGIC (((uint64_t)255 << 56) | ((uint64_t)'l' << 48) | \
+    ((uint64_t)'p' << 40) | ((uint64_t)'r' << 32) | ((uint64_t)'o' << 24) | \
+    ((uint64_t)'f' << 16) | ((uint64_t)'R' << 8)  | ((uint64_t)129)
+#endif
+
+#if __clang_major__ >= 4 || (__clang_major__ == 3 && __clang_minor__ >= 9)
+#define LLVM_PROFILE_VERSION    4
+#define LLVM_PROFILE_NUM_KINDS  2
+#else
+#error "clang version not supported with coverage"
+#endif
+
+struct llvm_profile_data {
+    uint64_t name_ref;
+    uint64_t function_hash;
+    void *counter;
+    void *function;
+    void *values;
+    uint32_t nr_counters;
+    uint16_t nr_value_sites[LLVM_PROFILE_NUM_KINDS];
+};
+
+struct llvm_profile_header {
+    uint64_t magic;
+    uint64_t version;
+    uint64_t data_size;
+    uint64_t counters_size;
+    uint64_t names_size;
+    uint64_t counters_delta;
+    uint64_t names_delta;
+    uint64_t value_kind_last;
+};
+
+/*
+ * Since Xen uses the llvm code coverage support without the run time library
+ * __llvm_profile_runtime must be defined according to the docs at:
+ *
+ * https://clang.llvm.org/docs/SourceBasedCodeCoverage.html
+ */
+int __llvm_profile_runtime;
+
+extern const struct llvm_profile_data __start___llvm_prf_data[];
+extern const struct llvm_profile_data __stop___llvm_prf_data[];
+extern const char __start___llvm_prf_names[];
+extern const char __stop___llvm_prf_names[];
+extern uint64_t __start___llvm_prf_cnts[];
+extern uint64_t __stop___llvm_prf_cnts[];
+
+#define START_DATA      ((const void *)__start___llvm_prf_data)
+#define END_DATA        ((const void *)__stop___llvm_prf_data)
+#define START_NAMES     ((const void *)__start___llvm_prf_names)
+#define END_NAMES       ((const void *)__stop___llvm_prf_names)
+#define START_COUNTERS  ((void *)__start___llvm_prf_cnts)
+#define END_COUNTERS    ((void *)__stop___llvm_prf_cnts)
+
+static void reset_counters(void)
+{
+    memset(START_COUNTERS, 0, END_COUNTERS - START_COUNTERS);
+}
+
+static uint32_t get_size(void)
+{
+    return ROUNDUP(sizeof(struct llvm_profile_header) + END_DATA - START_DATA +
+                   END_COUNTERS - START_COUNTERS + END_NAMES - START_NAMES, 8);
+}
+
+static int dump(XEN_GUEST_HANDLE_PARAM(char) buffer, uint32_t *buf_size)
+{
+    struct llvm_profile_header header = {
+        .magic = LLVM_PROFILE_MAGIC,
+        .version = LLVM_PROFILE_VERSION,
+        .data_size = (END_DATA - START_DATA) / sizeof(struct llvm_profile_data),
+        .counters_size = (END_COUNTERS - START_COUNTERS) / sizeof(uint64_t),
+        .names_size = END_NAMES - START_NAMES,
+        .counters_delta = (uintptr_t)START_COUNTERS,
+        .names_delta = (uintptr_t)START_NAMES,
+        .value_kind_last = LLVM_PROFILE_NUM_KINDS - 1,
+    };
+    unsigned int off = 0;
+
+#define APPEND_TO_BUFFER(src, size)                             \
+({                                                              \
+    if ( off + (size) > *buf_size )                             \
+        return -ENOMEM;                                         \
+    copy_to_guest_offset(buffer, off, (const char *)src, size); \
+    off += (size);                                              \
+})
+    APPEND_TO_BUFFER(&header, sizeof(header));
+    APPEND_TO_BUFFER(START_DATA, END_DATA - START_DATA);
+    APPEND_TO_BUFFER(START_COUNTERS, END_COUNTERS - START_COUNTERS);
+    APPEND_TO_BUFFER(START_NAMES, END_NAMES - START_NAMES);
+#undef APPEND_TO_BUFFER
+
+    clear_guest_offset(buffer, off, *buf_size - off);
+
+    return 0;
+}
+
+const struct cov_sysctl_ops cov_ops = {
+    .get_size = get_size,
+    .reset_counters = reset_counters,
+    .dump = dump,
+};
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h
index ef10368d79..cfc7b11de8 100644
--- a/xen/include/public/sysctl.h
+++ b/xen/include/public/sysctl.h
@@ -646,6 +646,12 @@ struct xen_sysctl_scheduler_op {
 
 #define XEN_GCOV_FORMAT_MAGIC    0x58434f56 /* XCOV */
 
+/*
+ * Ouput format of LLVM coverage data is just a raw stream, as would be
+ * written by the compiler_rt run time library into a .profraw file. There
+ * are no special Xen tags or delimiters because none are needed.
+ */
+
 #define XEN_SYSCTL_COVERAGE_get_size 0 /* Get total size of output data */
 #define XEN_SYSCTL_COVERAGE_read     1 /* Read output data */
 #define XEN_SYSCTL_COVERAGE_reset    2 /* Reset all counters */
-- 
2.15.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 6/7] xsm: add bodge when compiling with llvm coverage support
  2018-01-24 10:01 [PATCH v3 0/7] LLVM coverage support for Xen Roger Pau Monne
                   ` (4 preceding siblings ...)
  2018-01-24 10:01 ` [PATCH v3 5/7] coverage: introduce support for llvm profiling Roger Pau Monne
@ 2018-01-24 10:01 ` Roger Pau Monne
  2018-01-24 15:07   ` Daniel De Graaf
  2018-01-24 10:01 ` [PATCH v3 7/7] coverage: add documentation for LLVM coverage Roger Pau Monne
  2018-02-13 15:53 ` [PATCH v3 0/7] LLVM coverage support for Xen Roger Pau Monné
  7 siblings, 1 reply; 30+ messages in thread
From: Roger Pau Monne @ 2018-01-24 10:01 UTC (permalink / raw)
  To: xen-devel; +Cc: Daniel De Graaf, Roger Pau Monne

llvm coverage support seems to disable some of the optimizations
needed in order to compile xsm, and the end result is that references
to __xsm_action_mismatch_detected are left in the object files.

Since coverage support cannot be used in production, introduce
__xsm_action_mismatch_detected for llvm coverage builds.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>
---
Changes since v1:
 - Add inline.
 - Use CONIFG_COVERAGE and __clang__ to detect if the bodge is needed.
---
 xen/include/xsm/dummy.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index d6ddadcafd..466bbcbde8 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -24,8 +24,22 @@
  * if references remain at link time.
  */
 #define LINKER_BUG_ON(x) do { if (x) __xsm_action_mismatch_detected(); } while (0)
+
+#if defined(CONFIG_COVERAGE) && defined(__clang__)
+/*
+ * LLVM coverage support seems to disable some of the optimizations needed in
+ * order for XSM to compile. Since coverage should not be used in production
+ * provide an implementation of __xsm_action_mismatch_detected to satisfy the
+ * linker.
+ */
+static inline void __xsm_action_mismatch_detected(void)
+{
+    ASSERT_UNREACHABLE();
+}
+#else
 /* DO NOT implement this function; it is supposed to trigger link errors */
 void __xsm_action_mismatch_detected(void);
+#endif
 
 #ifdef CONFIG_XSM
 
-- 
2.15.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 7/7] coverage: add documentation for LLVM coverage
  2018-01-24 10:01 [PATCH v3 0/7] LLVM coverage support for Xen Roger Pau Monne
                   ` (5 preceding siblings ...)
  2018-01-24 10:01 ` [PATCH v3 6/7] xsm: add bodge when compiling with llvm coverage support Roger Pau Monne
@ 2018-01-24 10:01 ` Roger Pau Monne
  2018-01-24 11:18   ` Wei Liu
  2018-02-13 15:53 ` [PATCH v3 0/7] LLVM coverage support for Xen Roger Pau Monné
  7 siblings, 1 reply; 30+ messages in thread
From: Roger Pau Monne @ 2018-01-24 10:01 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, Roger Pau Monne

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>
---
Changes since v1:
 - s/gmake/make/.
 - Fix gcov section to mention CONFIG_COVERAGE instead of CONFIG_GCOV.
---
 docs/misc/coverage.markdown | 47 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/docs/misc/coverage.markdown b/docs/misc/coverage.markdown
index 430cd27b2f..3554659fe4 100644
--- a/docs/misc/coverage.markdown
+++ b/docs/misc/coverage.markdown
@@ -8,6 +8,8 @@ information. Every basic block in the code will be instrumented by the compiler
 to compute these statistics. It should not be used in production as it slows
 down your hypervisor.
 
+# GCOV (GCC coverage)
+
 ## Enable coverage
 
 Test coverage support can be turned on compiling Xen with the `CONFIG_COVERAGE`
@@ -75,3 +77,48 @@ blob extracted from xencov!**
 * See output in a browser
 
         firefox cov/index.html
+
+# LLVM coverage
+
+## Enable coverage
+
+Coverage can be enabled using a Kconfig option, from the top-level directory
+use the following command to display the Kconfig menu:
+
+    make -C xen menuconfig clang=y
+
+The code coverage option can be found inside of the "Debugging Options"
+section. After enabling it just compile Xen as you would normally do:
+
+    make xen clang=y
+
+## Extract coverage data
+
+LLVM coverage can be extracted from the hypervisor using the `xencov` tool.
+The following actions are available:
+
+* `xencov read` extract data
+* `xencov reset` reset all coverage counters
+* `xencov read-reset` extract data and reset counters at the same time.
+
+## Possible use
+
+**This section is just an example on how to use these tools!**
+
+This example assumes you compiled Xen and copied the xen-syms file from
+xen/xen-syms into your current directory.
+
+* Extract the coverage data from Xen:
+
+    xencov read xen.profraw
+
+* Convert the data into a profile. Note that you can merge more than one
+  profraw file into a single profdata file.
+
+    llvm-profdata merge xen.profraw -o xen.profdata
+
+* Generate a HTML report of the code coverage:
+
+    llvm-cov show -format=html -output-dir=cov/ xen-syms -instr-profile=xen.profdata
+
+* Open cov/index.html with your browser in order to display the profile.
-- 
2.15.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 1/7] gcov: rename sysctl and functions
  2018-01-24 10:01 ` [PATCH v3 1/7] gcov: rename sysctl and functions Roger Pau Monne
@ 2018-01-24 11:13   ` Wei Liu
  0 siblings, 0 replies; 30+ messages in thread
From: Wei Liu @ 2018-01-24 11:13 UTC (permalink / raw)
  To: Roger Pau Monne
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, xen-devel

On Wed, Jan 24, 2018 at 10:01:19AM +0000, Roger Pau Monne wrote:
> Change gcov to cov (for internal interfaces) or coverage (for the
> public ones).
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 2/7] gcov: introduce hooks for the sysctl
  2018-01-24 10:01 ` [PATCH v3 2/7] gcov: introduce hooks for the sysctl Roger Pau Monne
@ 2018-01-24 11:13   ` Wei Liu
  0 siblings, 0 replies; 30+ messages in thread
From: Wei Liu @ 2018-01-24 11:13 UTC (permalink / raw)
  To: Roger Pau Monne
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, xen-devel

On Wed, Jan 24, 2018 at 10:01:20AM +0000, Roger Pau Monne wrote:
> So that other implementations of the sysctl can be added.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Acked-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 3/7] coverage: introduce generic file
  2018-01-24 10:01 ` [PATCH v3 3/7] coverage: introduce generic file Roger Pau Monne
@ 2018-01-24 11:14   ` Wei Liu
  2018-01-25 14:47   ` Konrad Rzeszutek Wilk
  1 sibling, 0 replies; 30+ messages in thread
From: Wei Liu @ 2018-01-24 11:14 UTC (permalink / raw)
  To: Roger Pau Monne
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, xen-devel

On Wed, Jan 24, 2018 at 10:01:21AM +0000, Roger Pau Monne wrote:
> It will contain the generic implementation of sysctl_cov_op, which
> will be shared between all the coverage implementations.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 4/7] kconfig/gcov: rename to coverage
  2018-01-24 10:01 ` [PATCH v3 4/7] kconfig/gcov: rename to coverage Roger Pau Monne
@ 2018-01-24 11:17   ` Wei Liu
  2018-02-07 10:53     ` [PATCH v4 " Roger Pau Monne
  2018-01-24 11:27   ` [PATCH v3 " Ian Jackson
  1 sibling, 1 reply; 30+ messages in thread
From: Wei Liu @ 2018-01-24 11:17 UTC (permalink / raw)
  To: Roger Pau Monne
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, xen-devel

On Wed, Jan 24, 2018 at 10:01:22AM +0000, Roger Pau Monne wrote:
> So it can be used by both gcc and clang. Just add the Kconfig option
> and modify the makefiles so the llvm coverage specific code can be
> added in a follow up patch.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> diff --git a/xen/Rules.mk b/xen/Rules.mk
> index 3cf40754a6..0bc40fd0e6 100644
> --- a/xen/Rules.mk
> +++ b/xen/Rules.mk
> @@ -115,8 +115,13 @@ subdir-all := $(subdir-y) $(subdir-n)
>  
>  $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS += -DINIT_SECTIONS_ONLY
>  
> -ifeq ($(CONFIG_GCOV),y)
> -$(filter-out %.init.o $(nogcov-y),$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS += -fprofile-arcs -ftest-coverage
> +ifeq ($(CONFIG_COVERAGE),y)
> +ifeq ($(clang),y)
> +    COV_FLAGS := -fprofile-instr-generate -fcoverage-mapping
> +else
> +    COV_FLAGS := -fprofile-arcs -ftest-coverage
> +endif
> +    $(filter-out %.init.o $(nogcov-y),$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS += $(COV_FLAGS)

Please also change nogcov to nocov. Also remove the leading spaces from
this line.

Other than this, this patch looks good.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 5/7] coverage: introduce support for llvm profiling
  2018-01-24 10:01 ` [PATCH v3 5/7] coverage: introduce support for llvm profiling Roger Pau Monne
@ 2018-01-24 11:18   ` Wei Liu
  0 siblings, 0 replies; 30+ messages in thread
From: Wei Liu @ 2018-01-24 11:18 UTC (permalink / raw)
  To: Roger Pau Monne
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, xen-devel

On Wed, Jan 24, 2018 at 10:01:23AM +0000, Roger Pau Monne wrote:
> Introduce the functionality in order to fill the hooks of the
> cov_sysctl_ops struct. Note that the functionality is still not wired
> into the build system.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Acked-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 7/7] coverage: add documentation for LLVM coverage
  2018-01-24 10:01 ` [PATCH v3 7/7] coverage: add documentation for LLVM coverage Roger Pau Monne
@ 2018-01-24 11:18   ` Wei Liu
  0 siblings, 0 replies; 30+ messages in thread
From: Wei Liu @ 2018-01-24 11:18 UTC (permalink / raw)
  To: Roger Pau Monne
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, xen-devel

On Wed, Jan 24, 2018 at 10:01:25AM +0000, Roger Pau Monne wrote:
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 4/7] kconfig/gcov: rename to coverage
  2018-01-24 10:01 ` [PATCH v3 4/7] kconfig/gcov: rename to coverage Roger Pau Monne
  2018-01-24 11:17   ` Wei Liu
@ 2018-01-24 11:27   ` Ian Jackson
  2018-01-24 11:33     ` Wei Liu
  1 sibling, 1 reply; 30+ messages in thread
From: Ian Jackson @ 2018-01-24 11:27 UTC (permalink / raw)
  To: Roger Pau Monne
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Tim Deegan, Jan Beulich, xen-devel

Roger Pau Monne writes ("[PATCH v3 4/7] kconfig/gcov: rename to coverage"):
> So it can be used by both gcc and clang. Just add the Kconfig option
> and modify the makefiles so the llvm coverage specific code can be
> added in a follow up patch.
...
> diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
> index f2ae6295ff..8e83c33a16 100644
> --- a/xen/common/sysctl.c
> +++ b/xen/common/sysctl.c
> @@ -396,12 +396,10 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl)
>      }
>      break;
>  
> -#ifdef CONFIG_GCOV
>      case XEN_SYSCTL_coverage_op:
>          ret = sysctl_cov_op(&op->u.coverage_op);
>          copyback = 1;
>          break;
> -#endif
>  

This hunk seems erroneous ?  Surely the name should be updated, but
the #ifdef should remain.

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 4/7] kconfig/gcov: rename to coverage
  2018-01-24 11:27   ` [PATCH v3 " Ian Jackson
@ 2018-01-24 11:33     ` Wei Liu
  2018-01-24 11:35       ` Ian Jackson
  0 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2018-01-24 11:33 UTC (permalink / raw)
  To: Ian Jackson
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Tim Deegan, Jan Beulich, xen-devel, Roger Pau Monne

On Wed, Jan 24, 2018 at 11:27:22AM +0000, Ian Jackson wrote:
> Roger Pau Monne writes ("[PATCH v3 4/7] kconfig/gcov: rename to coverage"):
> > So it can be used by both gcc and clang. Just add the Kconfig option
> > and modify the makefiles so the llvm coverage specific code can be
> > added in a follow up patch.
> ...
> > diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
> > index f2ae6295ff..8e83c33a16 100644
> > --- a/xen/common/sysctl.c
> > +++ b/xen/common/sysctl.c
> > @@ -396,12 +396,10 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl)
> >      }
> >      break;
> >  
> > -#ifdef CONFIG_GCOV
> >      case XEN_SYSCTL_coverage_op:
> >          ret = sysctl_cov_op(&op->u.coverage_op);
> >          copyback = 1;
> >          break;
> > -#endif
> >  
> 
> This hunk seems erroneous ?  Surely the name should be updated, but
> the #ifdef should remain.
> 

No the ifdef needs to go.

There is a new stub introduced in this patch.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 4/7] kconfig/gcov: rename to coverage
  2018-01-24 11:33     ` Wei Liu
@ 2018-01-24 11:35       ` Ian Jackson
  2018-01-24 11:38         ` Wei Liu
  0 siblings, 1 reply; 30+ messages in thread
From: Ian Jackson @ 2018-01-24 11:35 UTC (permalink / raw)
  To: Wei Liu
  Cc: Stefano Stabellini, George Dunlap, Andrew Cooper, Tim Deegan,
	Jan Beulich, xen-devel, Roger Pau Monne

Wei Liu writes ("Re: [PATCH v3 4/7] kconfig/gcov: rename to coverage"):
> On Wed, Jan 24, 2018 at 11:27:22AM +0000, Ian Jackson wrote:
> > This hunk seems erroneous ?  Surely the name should be updated, but
> > the #ifdef should remain.
> 
> No the ifdef needs to go.
> 
> There is a new stub introduced in this patch.

Oh, hrm.  Yes, there is.  But why is this better ?

One reason for all this Kconfig stuff is to be able to disable unused
interfaces for security reasons.  That also means being able to easily
audit what interfaces are enabled, which is a lot simpler if you can
read the main switch statement for the relevant hypercall, than if you
have to go chasing off after definitions.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 4/7] kconfig/gcov: rename to coverage
  2018-01-24 11:35       ` Ian Jackson
@ 2018-01-24 11:38         ` Wei Liu
  0 siblings, 0 replies; 30+ messages in thread
From: Wei Liu @ 2018-01-24 11:38 UTC (permalink / raw)
  To: Ian Jackson
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Tim Deegan, Jan Beulich, xen-devel, Roger Pau Monne

On Wed, Jan 24, 2018 at 11:35:51AM +0000, Ian Jackson wrote:
> Wei Liu writes ("Re: [PATCH v3 4/7] kconfig/gcov: rename to coverage"):
> > On Wed, Jan 24, 2018 at 11:27:22AM +0000, Ian Jackson wrote:
> > > This hunk seems erroneous ?  Surely the name should be updated, but
> > > the #ifdef should remain.
> > 
> > No the ifdef needs to go.
> > 
> > There is a new stub introduced in this patch.
> 
> Oh, hrm.  Yes, there is.  But why is this better ?
> 

It is not better or worse but that's how Roger managed to return
-EOPNOTSUPP I assume.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 6/7] xsm: add bodge when compiling with llvm coverage support
  2018-01-24 10:01 ` [PATCH v3 6/7] xsm: add bodge when compiling with llvm coverage support Roger Pau Monne
@ 2018-01-24 15:07   ` Daniel De Graaf
  0 siblings, 0 replies; 30+ messages in thread
From: Daniel De Graaf @ 2018-01-24 15:07 UTC (permalink / raw)
  To: Roger Pau Monne, xen-devel

On 01/24/2018 05:01 AM, Roger Pau Monne wrote:
> llvm coverage support seems to disable some of the optimizations
> needed in order to compile xsm, and the end result is that references
> to __xsm_action_mismatch_detected are left in the object files.
> 
> Since coverage support cannot be used in production, introduce
> __xsm_action_mismatch_detected for llvm coverage builds.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 3/7] coverage: introduce generic file
  2018-01-24 10:01 ` [PATCH v3 3/7] coverage: introduce generic file Roger Pau Monne
  2018-01-24 11:14   ` Wei Liu
@ 2018-01-25 14:47   ` Konrad Rzeszutek Wilk
  2018-01-25 15:02     ` George Dunlap
  1 sibling, 1 reply; 30+ messages in thread
From: Konrad Rzeszutek Wilk @ 2018-01-25 14:47 UTC (permalink / raw)
  To: Roger Pau Monne
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, xen-devel

On Wed, Jan 24, 2018 at 10:01:21AM +0000, Roger Pau Monne wrote:
> It will contain the generic implementation of sysctl_cov_op, which
> will be shared between all the coverage implementations.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> Cc: George Dunlap <George.Dunlap@eu.citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Tim Deegan <tim@xen.org>
> Cc: Wei Liu <wei.liu2@citrix.com>
> ---
> Changes since v1:
>  - Use private coverage.h header.
>  - Sort alphabetically the obj-y list.
> ---
>  xen/common/coverage/Makefile   |  2 +-
>  xen/common/coverage/coverage.c | 73 ++++++++++++++++++++++++++++++++++++++++++
>  xen/common/coverage/coverage.h |  1 +
>  xen/common/coverage/gcov.c     | 39 +---------------------
>  4 files changed, 76 insertions(+), 39 deletions(-)
>  create mode 100644 xen/common/coverage/coverage.c
> 
> diff --git a/xen/common/coverage/Makefile b/xen/common/coverage/Makefile
> index a7a48494ca..5387bc6429 100644
> --- a/xen/common/coverage/Makefile
> +++ b/xen/common/coverage/Makefile
> @@ -1,4 +1,4 @@
> -obj-y += gcov_base.o gcov.o
> +obj-y += coverage.o gcov_base.o gcov.o
>  obj-y += $(call cc-ifversion,lt,0x040700, \
>  		gcc_3_4.o, $(call cc-ifversion,lt,0x040900, \
>  		gcc_4_7.o, $(call cc-ifversion,lt,0x050000, \
> diff --git a/xen/common/coverage/coverage.c b/xen/common/coverage/coverage.c
> new file mode 100644
> index 0000000000..bd90f28663
> --- /dev/null
> +++ b/xen/common/coverage/coverage.c
> @@ -0,0 +1,73 @@
> +/*
> + * Generic functionality for coverage analysis.
> + *
> + * Copyright (C) 2017 Citrix Systems R&D

2018 now I believe.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 3/7] coverage: introduce generic file
  2018-01-25 14:47   ` Konrad Rzeszutek Wilk
@ 2018-01-25 15:02     ` George Dunlap
  2018-01-25 15:33       ` Ian Jackson
  0 siblings, 1 reply; 30+ messages in thread
From: George Dunlap @ 2018-01-25 15:02 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, Roger Pau Monne
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, xen-devel

On 01/25/2018 02:47 PM, Konrad Rzeszutek Wilk wrote:
> On Wed, Jan 24, 2018 at 10:01:21AM +0000, Roger Pau Monne wrote:
>> It will contain the generic implementation of sysctl_cov_op, which
>> will be shared between all the coverage implementations.
>>
>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>> ---
>> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
>> Cc: George Dunlap <George.Dunlap@eu.citrix.com>
>> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
>> Cc: Jan Beulich <jbeulich@suse.com>
>> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>> Cc: Stefano Stabellini <sstabellini@kernel.org>
>> Cc: Tim Deegan <tim@xen.org>
>> Cc: Wei Liu <wei.liu2@citrix.com>
>> ---
>> Changes since v1:
>>  - Use private coverage.h header.
>>  - Sort alphabetically the obj-y list.
>> ---
>>  xen/common/coverage/Makefile   |  2 +-
>>  xen/common/coverage/coverage.c | 73 ++++++++++++++++++++++++++++++++++++++++++
>>  xen/common/coverage/coverage.h |  1 +
>>  xen/common/coverage/gcov.c     | 39 +---------------------
>>  4 files changed, 76 insertions(+), 39 deletions(-)
>>  create mode 100644 xen/common/coverage/coverage.c
>>
>> diff --git a/xen/common/coverage/Makefile b/xen/common/coverage/Makefile
>> index a7a48494ca..5387bc6429 100644
>> --- a/xen/common/coverage/Makefile
>> +++ b/xen/common/coverage/Makefile
>> @@ -1,4 +1,4 @@
>> -obj-y += gcov_base.o gcov.o
>> +obj-y += coverage.o gcov_base.o gcov.o
>>  obj-y += $(call cc-ifversion,lt,0x040700, \
>>  		gcc_3_4.o, $(call cc-ifversion,lt,0x040900, \
>>  		gcc_4_7.o, $(call cc-ifversion,lt,0x050000, \
>> diff --git a/xen/common/coverage/coverage.c b/xen/common/coverage/coverage.c
>> new file mode 100644
>> index 0000000000..bd90f28663
>> --- /dev/null
>> +++ b/xen/common/coverage/coverage.c
>> @@ -0,0 +1,73 @@
>> +/*
>> + * Generic functionality for coverage analysis.
>> + *
>> + * Copyright (C) 2017 Citrix Systems R&D
> 
> 2018 now I believe.

I'm pretty sure the copyright starts from the time the work is created,
not the time it gets checked into a public tree.  Most of this would
have been written last year.

Since we're being pedantic. ;-)

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 3/7] coverage: introduce generic file
  2018-01-25 15:02     ` George Dunlap
@ 2018-01-25 15:33       ` Ian Jackson
  0 siblings, 0 replies; 30+ messages in thread
From: Ian Jackson @ 2018-01-25 15:33 UTC (permalink / raw)
  To: George Dunlap
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, xen-devel, Roger Pau Monne

George Dunlap writes ("Re: [PATCH v3 3/7] coverage: introduce generic file"):
> I'm pretty sure the copyright starts from the time the work is created,
> not the time it gets checked into a public tree.  Most of this would
> have been written last year.
> 
> Since we're being pedantic. ;-)

`(maintain) Copyright Notices' says:

   To update the list of year numbers, add each year in which you have
   made nontrivial changes to the package.  (Here we assume you're
   using a publicly accessible revision control server, so that every
   revision installed is also immediately and automatically
   published.) ...

So I think it is the date on which the _overall version_ is published,
ie for us the date it gets pushed to staging, or the date it gets
published by the submitter as a git branch (if sooner).  But I doubt
this really matters very much.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH v4 4/7] kconfig/gcov: rename to coverage
  2018-01-24 11:17   ` Wei Liu
@ 2018-02-07 10:53     ` Roger Pau Monne
  2018-02-07 11:05       ` Wei Liu
       [not found]       ` <5A7ADAE002000051043D0449@prv-mh.provo.novell.com>
  0 siblings, 2 replies; 30+ messages in thread
From: Roger Pau Monne @ 2018-02-07 10:53 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, Roger Pau Monne

So it can be used by both gcc and clang. Just add the Kconfig option
and modify the makefiles so the llvm coverage specific code can be
added in a follow up patch.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>
---
Changes since v3:
 - s/nogcov/nocov.
 - Remove leading spaces in filter-out.

Changes since v2:
 - select SUPPRESS_DUPLICATE_SYMBOL_WARNINGS when enabling coverage
   support in Kconfig.
 - Introduce COV_FLAGS to store the compiler flags to enable coverage
   support for clang and gcc.
 - Return -EOPNOTSUPP in sysctl_cov_op if not implemented.

Changes since v1:
 - Use a choice in kconfig to select code coverage technology.
 - Compile coverage.c regardless of selected code coverage technology.
 - Introduce an unimplemented sysctl_cov_op function if
   CONFIG_COVERAGE is not set.
---
 docs/misc/coverage.markdown  | 2 +-
 xen/Kconfig.debug            | 6 +++---
 xen/Rules.mk                 | 9 +++++++--
 xen/arch/x86/efi/Makefile    | 2 +-
 xen/common/Makefile          | 2 +-
 xen/common/coverage/Makefile | 5 ++++-
 xen/common/sysctl.c          | 2 --
 xen/include/xen/coverage.h   | 7 ++++++-
 8 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/docs/misc/coverage.markdown b/docs/misc/coverage.markdown
index b47aba2648..430cd27b2f 100644
--- a/docs/misc/coverage.markdown
+++ b/docs/misc/coverage.markdown
@@ -10,7 +10,7 @@ down your hypervisor.
 
 ## Enable coverage
 
-Test coverage support can be turned on compiling Xen with the `CONFIG_GCOV`
+Test coverage support can be turned on compiling Xen with the `CONFIG_COVERAGE`
 option set to `y`.
 
 Change your `.config` or run `make -C xen menuconfig`.
diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug
index 7bb0465b5d..380c4e8d75 100644
--- a/xen/Kconfig.debug
+++ b/xen/Kconfig.debug
@@ -28,12 +28,12 @@ config FRAME_POINTER
 	  maybe slower, but it gives very useful debugging information
 	  in case of any Xen bugs.
 
-config GCOV
-	bool "Gcov Support"
+config COVERAGE
+	bool "Code coverage support"
 	depends on !LIVEPATCH
 	select SUPPRESS_DUPLICATE_SYMBOL_WARNINGS
 	---help---
-	  Enable gcov (a test coverage program in GCC) support.
+	  Enable code coverage support.
 
 	  If unsure, say N here.
 
diff --git a/xen/Rules.mk b/xen/Rules.mk
index 541ed13aa1..da3c35ba36 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -119,8 +119,13 @@ subdir-all := $(subdir-y) $(subdir-n)
 
 $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS += -DINIT_SECTIONS_ONLY
 
-ifeq ($(CONFIG_GCOV),y)
-$(filter-out %.init.o $(nogcov-y),$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS += -fprofile-arcs -ftest-coverage
+ifeq ($(CONFIG_COVERAGE),y)
+ifeq ($(clang),y)
+    COV_FLAGS := -fprofile-instr-generate -fcoverage-mapping
+else
+    COV_FLAGS := -fprofile-arcs -ftest-coverage
+endif
+$(filter-out %.init.o $(nocov-y),$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS += $(COV_FLAGS)
 endif
 
 ifeq ($(CONFIG_UBSAN),y)
diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile
index 3edff1cf24..3be9661108 100644
--- a/xen/arch/x86/efi/Makefile
+++ b/xen/arch/x86/efi/Makefile
@@ -13,4 +13,4 @@ boot.init.o: buildid.o
 obj-y := stub.o
 obj-$(efi) := boot.init.o compat.o relocs-dummy.o runtime.o
 extra-$(efi) += buildid.o
-nogcov-$(efi) += stub.o
+nocov-$(efi) += stub.o
diff --git a/xen/common/Makefile b/xen/common/Makefile
index ad181636f6..3a349f478b 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -74,7 +74,7 @@ tmem-y := tmem.o tmem_xen.o tmem_control.o
 tmem-$(CONFIG_COMPAT) += compat/tmem_xen.o
 obj-$(CONFIG_TMEM) += $(tmem-y)
 
-subdir-$(CONFIG_GCOV) += coverage
+subdir-$(CONFIG_COVERAGE) += coverage
 subdir-$(CONFIG_UBSAN) += ubsan
 
 subdir-y += libelf
diff --git a/xen/common/coverage/Makefile b/xen/common/coverage/Makefile
index 5387bc6429..1039a160c4 100644
--- a/xen/common/coverage/Makefile
+++ b/xen/common/coverage/Makefile
@@ -1,6 +1,9 @@
-obj-y += coverage.o gcov_base.o gcov.o
+obj-y += coverage.o
+ifneq ($(clang),y)
+obj-y += gcov_base.o gcov.o
 obj-y += $(call cc-ifversion,lt,0x040700, \
 		gcc_3_4.o, $(call cc-ifversion,lt,0x040900, \
 		gcc_4_7.o, $(call cc-ifversion,lt,0x050000, \
 		gcc_4_9.o, $(call cc-ifversion,lt,0x070000, \
 		gcc_5.o, gcc_7.o))))
+endif
diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
index f2ae6295ff..8e83c33a16 100644
--- a/xen/common/sysctl.c
+++ b/xen/common/sysctl.c
@@ -396,12 +396,10 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl)
     }
     break;
 
-#ifdef CONFIG_GCOV
     case XEN_SYSCTL_coverage_op:
         ret = sysctl_cov_op(&op->u.coverage_op);
         copyback = 1;
         break;
-#endif
 
 #ifdef CONFIG_HAS_PCI
     case XEN_SYSCTL_pcitopoinfo:
diff --git a/xen/include/xen/coverage.h b/xen/include/xen/coverage.h
index daddef37d3..ba5fb67947 100644
--- a/xen/include/xen/coverage.h
+++ b/xen/include/xen/coverage.h
@@ -1,9 +1,14 @@
 #ifndef _XEN_COV_H
 #define _XEN_COV_H
 
-#ifdef CONFIG_GCOV
+#ifdef CONFIG_COVERAGE
 #include <public/sysctl.h>
 int sysctl_cov_op(struct xen_sysctl_coverage_op *op);
+#else
+static inline int sysctl_cov_op(void *unused)
+{
+    return -EOPNOTSUPP;
+}
 #endif
 
 #endif	/* _XEN_GCOV_H */
-- 
2.15.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH v4 4/7] kconfig/gcov: rename to coverage
  2018-02-07 10:53     ` [PATCH v4 " Roger Pau Monne
@ 2018-02-07 11:05       ` Wei Liu
       [not found]       ` <5A7ADAE002000051043D0449@prv-mh.provo.novell.com>
  1 sibling, 0 replies; 30+ messages in thread
From: Wei Liu @ 2018-02-07 11:05 UTC (permalink / raw)
  To: Roger Pau Monne
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, xen-devel

On Wed, Feb 07, 2018 at 10:53:56AM +0000, Roger Pau Monne wrote:
> So it can be used by both gcc and clang. Just add the Kconfig option
> and modify the makefiles so the llvm coverage specific code can be
> added in a follow up patch.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v4 4/7] kconfig/gcov: rename to coverage
       [not found]       ` <5A7ADAE002000051043D0449@prv-mh.provo.novell.com>
@ 2018-02-07 15:37         ` Jan Beulich
  2018-02-07 16:16           ` Roger Pau Monné
  0 siblings, 1 reply; 30+ messages in thread
From: Jan Beulich @ 2018-02-07 15:37 UTC (permalink / raw)
  To: Roger Pau Monne
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	IanJackson, Tim Deegan, xen-devel

>>> On 07.02.18 at 11:53, <roger.pau@citrix.com> wrote:
>  docs/misc/coverage.markdown  | 2 +-
>  xen/Kconfig.debug            | 6 +++---
>  xen/Rules.mk                 | 9 +++++++--
>  xen/arch/x86/efi/Makefile    | 2 +-
>  xen/common/Makefile          | 2 +-
>  xen/common/coverage/Makefile | 5 ++++-
>  xen/common/sysctl.c          | 2 --
>  xen/include/xen/coverage.h   | 7 ++++++-
>  8 files changed, 23 insertions(+), 12 deletions(-)

I've taken the liberty to also adjust the shim's stored config while
committing.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v4 4/7] kconfig/gcov: rename to coverage
  2018-02-07 15:37         ` Jan Beulich
@ 2018-02-07 16:16           ` Roger Pau Monné
  0 siblings, 0 replies; 30+ messages in thread
From: Roger Pau Monné @ 2018-02-07 16:16 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	IanJackson, Tim Deegan, xen-devel

On Wed, Feb 07, 2018 at 08:37:13AM -0700, Jan Beulich wrote:
> >>> On 07.02.18 at 11:53, <roger.pau@citrix.com> wrote:
> >  docs/misc/coverage.markdown  | 2 +-
> >  xen/Kconfig.debug            | 6 +++---
> >  xen/Rules.mk                 | 9 +++++++--
> >  xen/arch/x86/efi/Makefile    | 2 +-
> >  xen/common/Makefile          | 2 +-
> >  xen/common/coverage/Makefile | 5 ++++-
> >  xen/common/sysctl.c          | 2 --
> >  xen/include/xen/coverage.h   | 7 ++++++-
> >  8 files changed, 23 insertions(+), 12 deletions(-)
> 
> I've taken the liberty to also adjust the shim's stored config while
> committing.

Thanks. This shim config is going to be a PITA.

Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 0/7] LLVM coverage support for Xen
  2018-01-24 10:01 [PATCH v3 0/7] LLVM coverage support for Xen Roger Pau Monne
                   ` (6 preceding siblings ...)
  2018-01-24 10:01 ` [PATCH v3 7/7] coverage: add documentation for LLVM coverage Roger Pau Monne
@ 2018-02-13 15:53 ` Roger Pau Monné
  2018-02-13 16:16   ` Jan Beulich
  7 siblings, 1 reply; 30+ messages in thread
From: Roger Pau Monné @ 2018-02-13 15:53 UTC (permalink / raw)
  To: Jan Beulich, Wei Liu; +Cc: xen-devel

On Wed, Jan 24, 2018 at 10:01:18AM +0000, Roger Pau Monne wrote:
> Hello,
> 
> The following patch series enables LLVM coverage support for the Xen
> hypervisor. A sample coverage report obtained after booting a PVHv2 Dom0
> can be found at:
> 
> http://xenbits.xen.org/people/royger/xen_profile/
> 
> I know the time is not the most appropriate given all the security work
> going on, but it seems like the series is quite close, and I would ike
> to avoid it bitrotting.

Patches 5, 6 and 7 have already been reviewed/acked by the relevant
maintainers, is there anything preventing them from going in?

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 0/7] LLVM coverage support for Xen
  2018-02-13 15:53 ` [PATCH v3 0/7] LLVM coverage support for Xen Roger Pau Monné
@ 2018-02-13 16:16   ` Jan Beulich
  2018-02-13 16:28     ` Roger Pau Monné
  0 siblings, 1 reply; 30+ messages in thread
From: Jan Beulich @ 2018-02-13 16:16 UTC (permalink / raw)
  To: Roger Pau Monné; +Cc: xen-devel, Wei Liu

>>> On 13.02.18 at 16:53, <roger.pau@citrix.com> wrote:
> On Wed, Jan 24, 2018 at 10:01:18AM +0000, Roger Pau Monne wrote:
>> Hello,
>> 
>> The following patch series enables LLVM coverage support for the Xen
>> hypervisor. A sample coverage report obtained after booting a PVHv2 Dom0
>> can be found at:
>> 
>> http://xenbits.xen.org/people/royger/xen_profile/ 
>> 
>> I know the time is not the most appropriate given all the security work
>> going on, but it seems like the series is quite close, and I would ike
>> to avoid it bitrotting.
> 
> Patches 5, 6 and 7 have already been reviewed/acked by the relevant
> maintainers, is there anything preventing them from going in?

I didn't keep them in my inbox when it became clear that patch 4
needs another version, which is why I did apply only that single
patch.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 0/7] LLVM coverage support for Xen
  2018-02-13 16:16   ` Jan Beulich
@ 2018-02-13 16:28     ` Roger Pau Monné
  2018-02-13 17:00       ` Jan Beulich
  0 siblings, 1 reply; 30+ messages in thread
From: Roger Pau Monné @ 2018-02-13 16:28 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel, Wei Liu

On Tue, Feb 13, 2018 at 09:16:19AM -0700, Jan Beulich wrote:
> >>> On 13.02.18 at 16:53, <roger.pau@citrix.com> wrote:
> > On Wed, Jan 24, 2018 at 10:01:18AM +0000, Roger Pau Monne wrote:
> >> Hello,
> >> 
> >> The following patch series enables LLVM coverage support for the Xen
> >> hypervisor. A sample coverage report obtained after booting a PVHv2 Dom0
> >> can be found at:
> >> 
> >> http://xenbits.xen.org/people/royger/xen_profile/ 
> >> 
> >> I know the time is not the most appropriate given all the security work
> >> going on, but it seems like the series is quite close, and I would ike
> >> to avoid it bitrotting.
> > 
> > Patches 5, 6 and 7 have already been reviewed/acked by the relevant
> > maintainers, is there anything preventing them from going in?
> 
> I didn't keep them in my inbox when it became clear that patch 4
> needs another version, which is why I did apply only that single
> patch.

Oh, since patch 4 was the only one that had comments I only sent that.
Would you like me to send or push to a git branch the remaining ones?

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 0/7] LLVM coverage support for Xen
  2018-02-13 16:28     ` Roger Pau Monné
@ 2018-02-13 17:00       ` Jan Beulich
  0 siblings, 0 replies; 30+ messages in thread
From: Jan Beulich @ 2018-02-13 17:00 UTC (permalink / raw)
  To: Roger Pau Monné; +Cc: xen-devel, Wei Liu

>>> On 13.02.18 at 17:28, <roger.pau@citrix.com> wrote:
> On Tue, Feb 13, 2018 at 09:16:19AM -0700, Jan Beulich wrote:
>> >>> On 13.02.18 at 16:53, <roger.pau@citrix.com> wrote:
>> > On Wed, Jan 24, 2018 at 10:01:18AM +0000, Roger Pau Monne wrote:
>> >> Hello,
>> >> 
>> >> The following patch series enables LLVM coverage support for the Xen
>> >> hypervisor. A sample coverage report obtained after booting a PVHv2 Dom0
>> >> can be found at:
>> >> 
>> >> http://xenbits.xen.org/people/royger/xen_profile/ 
>> >> 
>> >> I know the time is not the most appropriate given all the security work
>> >> going on, but it seems like the series is quite close, and I would ike
>> >> to avoid it bitrotting.
>> > 
>> > Patches 5, 6 and 7 have already been reviewed/acked by the relevant
>> > maintainers, is there anything preventing them from going in?
>> 
>> I didn't keep them in my inbox when it became clear that patch 4
>> needs another version, which is why I did apply only that single
>> patch.
> 
> Oh, since patch 4 was the only one that had comments I only sent that.
> Would you like me to send or push to a git branch the remaining ones?

Normally I think it would have been best if you resent them
without asking, rather than just sending a singleton 4/7 patch.
This time, however, I've managed to fish them out of the mail
client's waste basket, and I've just committed and pushed them.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2018-02-13 17:00 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24 10:01 [PATCH v3 0/7] LLVM coverage support for Xen Roger Pau Monne
2018-01-24 10:01 ` [PATCH v3 1/7] gcov: rename sysctl and functions Roger Pau Monne
2018-01-24 11:13   ` Wei Liu
2018-01-24 10:01 ` [PATCH v3 2/7] gcov: introduce hooks for the sysctl Roger Pau Monne
2018-01-24 11:13   ` Wei Liu
2018-01-24 10:01 ` [PATCH v3 3/7] coverage: introduce generic file Roger Pau Monne
2018-01-24 11:14   ` Wei Liu
2018-01-25 14:47   ` Konrad Rzeszutek Wilk
2018-01-25 15:02     ` George Dunlap
2018-01-25 15:33       ` Ian Jackson
2018-01-24 10:01 ` [PATCH v3 4/7] kconfig/gcov: rename to coverage Roger Pau Monne
2018-01-24 11:17   ` Wei Liu
2018-02-07 10:53     ` [PATCH v4 " Roger Pau Monne
2018-02-07 11:05       ` Wei Liu
     [not found]       ` <5A7ADAE002000051043D0449@prv-mh.provo.novell.com>
2018-02-07 15:37         ` Jan Beulich
2018-02-07 16:16           ` Roger Pau Monné
2018-01-24 11:27   ` [PATCH v3 " Ian Jackson
2018-01-24 11:33     ` Wei Liu
2018-01-24 11:35       ` Ian Jackson
2018-01-24 11:38         ` Wei Liu
2018-01-24 10:01 ` [PATCH v3 5/7] coverage: introduce support for llvm profiling Roger Pau Monne
2018-01-24 11:18   ` Wei Liu
2018-01-24 10:01 ` [PATCH v3 6/7] xsm: add bodge when compiling with llvm coverage support Roger Pau Monne
2018-01-24 15:07   ` Daniel De Graaf
2018-01-24 10:01 ` [PATCH v3 7/7] coverage: add documentation for LLVM coverage Roger Pau Monne
2018-01-24 11:18   ` Wei Liu
2018-02-13 15:53 ` [PATCH v3 0/7] LLVM coverage support for Xen Roger Pau Monné
2018-02-13 16:16   ` Jan Beulich
2018-02-13 16:28     ` Roger Pau Monné
2018-02-13 17:00       ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.