diff options
author | Frediano Ziglio <frediano.ziglio@citrix.com> | 2013-02-14 12:37:15 +0000 |
---|---|---|
committer | Keir <keir.xen@gmail.com> | 2013-02-21 16:23:57 +0000 |
commit | 5043f14b5e0043bb6a2c8b794adb440b8b8b3b4a (patch) | |
tree | 6effd876ab42231e2873fc66887309f9ecf78409 /xen/common/sysctl.c | |
parent | 26c9d03dd4a7356ed697bec98fe8108a5eebd562 (diff) | |
download | xen-5043f14b5e0043bb6a2c8b794adb440b8b8b3b4a.tar.gz xen-5043f14b5e0043bb6a2c8b794adb440b8b8b3b4a.tar.bz2 xen-5043f14b5e0043bb6a2c8b794adb440b8b8b3b4a.zip |
gcov: Implement code to read coverage informations
Operations are handled by a sysctl specific operation.
Implement 4 operations
- check if coverage is compiled in
- read size of coverage information
- read coverage information
- reset coverage counters
Information are stored in a single blob in a format specific to Xen designed
to make code that generate coverage as small as possible.
This patch add a public header with the structure of blob exported by Xen.
This avoid problems distributing header which is GPL2.
Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Diffstat (limited to 'xen/common/sysctl.c')
-rw-r--r-- | xen/common/sysctl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c index b8d2c736f7..31f9650ecc 100644 --- a/xen/common/sysctl.c +++ b/xen/common/sysctl.c @@ -26,6 +26,7 @@ #include <xen/nodemask.h> #include <xsm/xsm.h> #include <xen/pmstat.h> +#include <xen/gcov.h> long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl) { @@ -357,6 +358,11 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl) } break; +#ifdef TEST_COVERAGE + case XEN_SYSCTL_coverage_op: + ret = sysctl_coverage_op(&op->u.coverage_op); + break; +#endif default: ret = arch_do_sysctl(op, u_sysctl); |