From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [patch 1/2] KVM: convert custom marker based tracing to event traces Date: Tue, 16 Jun 2009 09:44:22 -0300 Message-ID: <20090616124422.GB1014@amt.cnet> References: <20090615183125.190496699@localhost.localdomain> <20090615183243.182853565@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: Steven Rostedt Return-path: Received: from mx2.redhat.com ([66.187.237.31]:41795 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752879AbZFPMot (ORCPT ); Tue, 16 Jun 2009 08:44:49 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Jun 15, 2009 at 04:03:10PM -0400, Steven Rostedt wrote: > > On Mon, 15 Jun 2009, Marcelo Tosatti wrote: > > > This allows use of the powerful ftrace infrastructure. > > > > See Documentation/trace/ for usage information. > > > > Signed-off-by: Marcelo Tosatti > > > > Index: kvm/arch/x86/kvm/svm.c > > =================================================================== > > --- kvm.orig/arch/x86/kvm/svm.c > > +++ kvm/arch/x86/kvm/svm.c > > @@ -29,6 +29,9 @@ > > #include > > > > #include > > +#include "svm-trace.h" > > +#define CREATE_TRACE_POINTS > > +#include > > > > #define __ex(x) __kvm_handle_fault_on_reboot(x) > > > > > > Index: kvm/arch/x86/kvm/vmx.c > > =================================================================== > > --- kvm.orig/arch/x86/kvm/vmx.c > > +++ kvm/arch/x86/kvm/vmx.c > > @@ -34,6 +34,10 @@ > > #include > > #include > > > > +#include "vmx-trace.h" > > +#define CREATE_TRACE_POINTS > > +#include > > + > > #define __ex(x) __kvm_handle_fault_on_reboot(x) > > > > MODULE_AUTHOR("Qumranet"); > > > Index: kvm/arch/x86/kvm/x86.c > > =================================================================== > > --- kvm.orig/arch/x86/kvm/x86.c > > +++ kvm/arch/x86/kvm/x86.c > > @@ -37,6 +37,8 @@ > > #include > > #include > > #include > > +#define CREATE_TRACE_POINTS > > +#include > > > > #include > > #include > > @@ -347,9 +349,6 @@ EXPORT_SYMBOL_GPL(kvm_set_cr0); > > > > Index: kvm/include/trace/events/kvm/x86-arch.h > > =================================================================== > > --- /dev/null > > +++ kvm/include/trace/events/kvm/x86-arch.h > > > One suggestion. Instead of putting in arch specific trace points into > generic code, you can put these into arch/x86/kvm/trace.h ? > > Then you can in the Makefile add: > > CFLAGS_x86.o := -I. > CFLAGS_svm.o := -I. > CFLAGS_vmx.o := -I. > > Or better yet, have a single file called trace.c: > > in the Makefile: > CFLAGS_trace.o := -I. > obj-$(EVENT_TRACING) += trace.o > > in trace.c: > > #define CREATE_TRACE_POINTS > #include "trace.h" > #include "trace-arch.h" > > > Then have the kvm/x86.h moved to trace.h > and the kvm/arch-x86.h move to trace-arch.h > > Just change the "TRACE_INCLUDE_FILE" to include the proper name. > > -- Steve Similar to http://patchwork.kernel.org/patch/23829/, but moving the x86 tracepoint definitions to arch/x86/kvm/ ? I thought the point of include/trace/ was to have all tracepoints definitions in a single directory?