[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/7] tracetool: Omit useless QEMU_*_ENABLED() check
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 2/7] tracetool: Omit useless QEMU_*_ENABLED() check |
Date: |
Mon, 12 Mar 2012 12:37:57 +0000 |
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.
Reviewed-by: Masami Hiramatsu <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
scripts/tracetool | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/scripts/tracetool b/scripts/tracetool
index 701b517..65bd0a1 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.9.1
- [Qemu-devel] [PULL 0/7] Tracing patches, Stefan Hajnoczi, 2012/03/12
- [Qemu-devel] [PATCH 7/7] vga: add trace event for ppm_save, Stefan Hajnoczi, 2012/03/12
- [Qemu-devel] [PATCH 3/7] trace: make trace_thread_create() use its function arg, Stefan Hajnoczi, 2012/03/12
- [Qemu-devel] [PATCH 2/7] tracetool: Omit useless QEMU_*_ENABLED() check,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH 6/7] console: add some trace events, Stefan Hajnoczi, 2012/03/12
- [Qemu-devel] [PATCH 4/7] docs: correct ./configure line in tracing.txt, Stefan Hajnoczi, 2012/03/12
- [Qemu-devel] [PATCH 5/7] maintainers: Add docs/tracing.txt to Tracing, Stefan Hajnoczi, 2012/03/12
- [Qemu-devel] [PATCH 1/7] trace: Provide a per-event status define for conditional compilation, Stefan Hajnoczi, 2012/03/12
- Re: [Qemu-devel] [PULL 0/7] Tracing patches, Anthony Liguori, 2012/03/12