summaryrefslogtreecommitdiffstats
path: root/scripts/tracetool/backend/ftrace.py
diff options
context:
space:
mode:
authorPeter Maydell2016-07-19 11:54:49 +0200
committerPeter Maydell2016-07-19 11:54:49 +0200
commit0c1b58f25025cc09463aae235162b19ff45c37b7 (patch)
tree93f05bbeadc130a91399cc98ac3c914df87958e3 /scripts/tracetool/backend/ftrace.py
parentMerge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20160718.0' i... (diff)
parenttrace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state (diff)
downloadqemu-0c1b58f25025cc09463aae235162b19ff45c37b7.tar.gz
qemu-0c1b58f25025cc09463aae235162b19ff45c37b7.tar.xz
qemu-0c1b58f25025cc09463aae235162b19ff45c37b7.zip
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
# gpg: Signature made Mon 18 Jul 2016 22:59:55 BST # gpg: using RSA key 0x9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/tracing-pull-request: trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state trace: Allow event name pattern in "info trace-events" trace: Conditionally trace events based on their per-vCPU state trace: Add per-vCPU tracing states for events with the 'vcpu' property trace: Cosmetic changes on fast-path tracing disas: Remove unused macro '_' trace: Identify events with the 'vcpu' property trace: [bsd-user] Commandline arguments to control tracing trace: [linux-user] Commandline arguments to control tracing Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts/tracetool/backend/ftrace.py')
-rw-r--r--scripts/tracetool/backend/ftrace.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/scripts/tracetool/backend/ftrace.py b/scripts/tracetool/backend/ftrace.py
index d798c71347..80dcf30478 100644
--- a/scripts/tracetool/backend/ftrace.py
+++ b/scripts/tracetool/backend/ftrace.py
@@ -30,17 +30,17 @@ def generate_h(event):
if len(event.args) > 0:
argnames = ", " + argnames
- out(' {',
- ' char ftrace_buf[MAX_TRACE_STRLEN];',
- ' int unused __attribute__ ((unused));',
- ' int trlen;',
- ' if (trace_event_get_state(%(event_id)s)) {',
- ' trlen = snprintf(ftrace_buf, MAX_TRACE_STRLEN,',
- ' "%(name)s " %(fmt)s "\\n" %(argnames)s);',
- ' trlen = MIN(trlen, MAX_TRACE_STRLEN - 1);',
- ' unused = write(trace_marker_fd, ftrace_buf, trlen);',
+ out(' {',
+ ' char ftrace_buf[MAX_TRACE_STRLEN];',
+ ' int unused __attribute__ ((unused));',
+ ' int trlen;',
+ ' if (trace_event_get_state(%(event_id)s)) {',
+ ' trlen = snprintf(ftrace_buf, MAX_TRACE_STRLEN,',
+ ' "%(name)s " %(fmt)s "\\n" %(argnames)s);',
+ ' trlen = MIN(trlen, MAX_TRACE_STRLEN - 1);',
+ ' unused = write(trace_marker_fd, ftrace_buf, trlen);',
+ ' }',
' }',
- ' }',
name=event.name,
args=event.args,
event_id="TRACE_" + event.name.upper(),