aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2011-09-27 09:00:22 +0100
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-03-12 10:12:34 +0000
commitbcec43324d02d586a8bc0c9093623636e870ad19 (patch)
tree000a968dc4e7fd5fab3d7766b48dec5e3dd03886 /scripts
parentb7d66a761f44a725352e19b64c587924647e6f83 (diff)
tracetool: Omit useless QEMU_*_ENABLED() check
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 <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/tracetool4
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/tracetool b/scripts/tracetool
index 701b517ec1..65bd0a1b4c 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
}