public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: avi@redhat.com
Cc: kvm@vger.kernel.org, Marcelo Tosatti <mtosatti@redhat.com>
Subject: [patch 3/3] kvm-kmod: dummy event trace hooks
Date: Thu, 18 Jun 2009 11:47:29 -0300	[thread overview]
Message-ID: <20090618144819.646605314@localhost.localdomain> (raw)
In-Reply-To: 20090618144726.270388200@localhost.localdomain

[-- Attachment #1: compat-trace-event --]
[-- Type: text/plain, Size: 1975 bytes --]

And don't stop if kvm_trace.c is gone.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Index: kvm-kmod/external-module-compat-comm.h
===================================================================
--- kvm-kmod.orig/external-module-compat-comm.h
+++ kvm-kmod/external-module-compat-comm.h
@@ -762,6 +762,18 @@ static inline bool zalloc_cpumask_var(cp
 
 #endif
 
+/* event traces added in 2.6.31 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
+
+#define TP_PROTO(args...) args
+
+#define TRACE_EVENT(name, proto, args, entry, fa, printk)               \
+	static inline void trace_##name(proto) { }
+
+static inline void tracepoint_synchronize_unregister(void) { }
+
+#endif
+
 
 /* Macro introduced only on newer kernels: */
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
Index: kvm-kmod/sync
===================================================================
--- kvm-kmod.orig/sync
+++ kvm-kmod/sync
@@ -171,6 +171,10 @@ def header_sync(arch):
                % { 'T': T, 'name': os.path.basename(file) })
         cp(file, out)
         unifdef(out)
+    for file in glob('%(linux)s/include/trace/events/kvm.h' % { 'linux': linux }):
+        out = ('%(T)s/include/trace/events/%(name)s'
+                % { 'T': T, 'name': os.path.basename(file) })
+        cp(file, out)
     arch_headers = (
         [x
          for dir in ['%(linux)s/arch/%(arch)s/include/asm/./kvm*.h',
@@ -207,7 +211,13 @@ def source_sync(arch):
         unifdef(i)
 
     for i in hack_files[arch]:
-        hack(T, arch, i)
+        try:
+            os.stat(T + "/" + i )
+        except OSError:
+              if i != "kvm_trace.c":
+                  raise
+        else:
+              hack(T, arch, i)
 
     copy_if_changed(T, arch)
     rmtree(T)
Index: kvm-kmod/include-compat/trace/define_trace.h
===================================================================
--- /dev/null
+++ kvm-kmod/include-compat/trace/define_trace.h
@@ -0,0 +1 @@
+/* Dummy file */

-- 


  parent reply	other threads:[~2009-06-18 14:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-15 18:31 [patch 0/2] replace kvmtrace with event traces Marcelo Tosatti
2009-06-15 18:31 ` [patch 1/2] KVM: convert custom marker based tracing to " Marcelo Tosatti
2009-06-15 20:03   ` Steven Rostedt
2009-06-16 12:44     ` Marcelo Tosatti
2009-06-16 13:40       ` Steven Rostedt
2009-06-16 22:13         ` [patch 0/2] replace kvmtrace with event traces v2 Marcelo Tosatti
2009-06-16 22:13           ` [patch 1/2] KVM: convert custom marker based tracing to event traces Marcelo Tosatti
2009-06-17 11:52             ` Avi Kivity
2009-06-17 12:22               ` [patch 0/2] replace kvmtrace with event traces rebased Marcelo Tosatti
2009-06-17 12:22                 ` [patch 1/2] KVM: convert custom marker based tracing to event traces Marcelo Tosatti
2009-06-17 12:22                 ` [patch 2/2] KVM: remove old KVMTRACE support code Marcelo Tosatti
2009-06-17 13:33                   ` Avi Kivity
2009-06-18 14:47                     ` [patch 0/3] " Marcelo Tosatti
2009-06-18 14:47                       ` [patch 1/3] KVM: PPC: convert marker probes to event trace Marcelo Tosatti
2009-06-18 14:47                       ` [patch 2/3] KVM: remove old KVMTRACE support code Marcelo Tosatti
2009-06-18 14:47                       ` Marcelo Tosatti [this message]
2009-06-28 15:57                       ` [patch 0/3] " Avi Kivity
2009-06-17 12:35                 ` [patch 0/2] replace kvmtrace with event traces rebased Avi Kivity
2009-06-16 22:13           ` [patch 2/2] KVM: remove old KVMTRACE support code Marcelo Tosatti
2009-06-17 11:53             ` Avi Kivity
2009-06-15 18:31 ` Marcelo Tosatti

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=20090618144819.646605314@localhost.localdomain \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.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