All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tracetool: Omit useless QEMU_*_ENABLED() check
@ 2011-09-27  8:00 Stefan Hajnoczi
  2011-09-27  8:49 ` Masami Hiramatsu
  2012-01-10 14:23 ` Stefan Hajnoczi
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2011-09-27  8:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Masami Hiramatsu, Josh Stone, Stefan Hajnoczi

SystemTap provides a "semaphore" that can optionally be tested before
executing a trace event.  The purpose of this mechanism is to skip
expensive tracing code when the trace event is disabled.

For example, some applications may have trace events that format or
convert strings for trace events.  This expensive processing should only
be done in the case where the trace event is enabled.

Since QEMU's generated trace events never have such special-purpose
code, there is no reason to add the semaphore check.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 scripts/tracetool |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/scripts/tracetool b/scripts/tracetool
index 4c9951d..ffe3eba 100755
--- a/scripts/tracetool
+++ b/scripts/tracetool
@@ -415,9 +415,7 @@ linetoh_dtrace()
     # Define an empty function for the trace event
     cat <<EOF
 static inline void trace_$name($args) {
-    if (QEMU_${nameupper}_ENABLED()) {
-        QEMU_${nameupper}($argnames);
-    }
+    QEMU_${nameupper}($argnames);
 }
 EOF
 }
-- 
1.7.5.4

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

end of thread, other threads:[~2012-01-10 14:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-27  8:00 [Qemu-devel] [PATCH] tracetool: Omit useless QEMU_*_ENABLED() check Stefan Hajnoczi
2011-09-27  8:49 ` Masami Hiramatsu
2012-01-10 14:23 ` Stefan Hajnoczi

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.