lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 22 Jul 2010 19:14:28 +0800 From: Lin Ming <ming.m.lin@...el.com> To: Ingo Molnar <mingo@...e.hu>, Avi Kivity <avi@...hat.com> Cc: Robert Richter <robert.richter@....com>, Corey Ashford <cjashfor@...ux.vnet.ibm.com>, Johannes Berg <johannes@...solutions.net>, Peter Zijlstra <peterz@...radead.org>, Greg KH <greg@...ah.com>, Frederic Weisbecker <fweisbec@...il.com>, Paul Mundt <lethal@...ux-sh.org>, "eranian@...il.com" <eranian@...il.com>, "Gary.Mohr@...l.com" <Gary.Mohr@...l.com>, "arjan@...ux.intel.com" <arjan@...ux.intel.com>, "Zhang, Yanmin" <yanmin_zhang@...ux.intel.com>, Paul Mackerras <paulus@...ba.org>, "David S. Miller" <davem@...emloft.net>, Russell King <rmk+kernel@....linux.org.uk>, Arnaldo Carvalho de Melo <acme@...hat.com>, Will Deacon <will.deacon@....com>, Maynard Johnson <mpjohn@...ibm.com>, Carl Love <carll@...ibm.com>, Kay Sievers <kay.sievers@...y.org>, lkml <linux-kernel@...r.kernel.org>, Thomas Gleixner <tglx@...utronix.de>, Steven Rostedt <rostedt@...dmis.org> Subject: [RFC][PATCH v1 08/15] perf: export tracepoint events via sysfs: kvm and kvm_mmu kvm and kvm_mmu tracepoint events are exported like below, /sys/devices/system/kvm/kvm0/events/ |-- kvm_ack_irq | |-- config | `-- type .... .... |-- kvm_mmu_get_page | |-- config | `-- type .... .... --- virt/kvm/kvm_main.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index f032806..0acb4f6 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -46,6 +46,7 @@ #include <linux/srcu.h> #include <linux/hugetlb.h> #include <linux/slab.h> +#include <linux/perf_event.h> #include <asm/processor.h> #include <asm/io.h> @@ -2178,6 +2179,18 @@ static void kvm_sched_out(struct preempt_notifier *pn, kvm_arch_vcpu_put(vcpu); } +static void kvm_sys_add_tp(struct kobject *kvm_kobj) +{ + struct kobject *events_kobj; + + events_kobj = perf_sys_create_events_dir(kvm_kobj); + if (!events_kobj) + return; + + perf_sys_add_tp_events(events_kobj, "kvm"); + perf_sys_add_tp_events(events_kobj, "kvm_mmu"); +} + int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align, struct module *module) { @@ -2227,6 +2240,8 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align, if (r) goto out_free_4; + kvm_sys_add_tp(&kvm_sysdev.kobj); + /* A kmem cache lets us meet the alignment requirements of fx_save. */ if (!vcpu_align) vcpu_align = __alignof__(struct kvm_vcpu); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists