aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2025-09-16 09:16:36 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2025-09-16 13:31:40 -0400
commitc47db9b1db906bd05cf83e0d70df2beba2ef9eaf (patch)
treebd0d760784bffe312c39654f15fa5774cc540d51 /scripts
parentda949d495ddd4d36f2c9750eb4d70f4135018199 (diff)
downloadqemu-c47db9b1db906bd05cf83e0d70df2beba2ef9eaf.zip
qemu-c47db9b1db906bd05cf83e0d70df2beba2ef9eaf.tar.gz
qemu-c47db9b1db906bd05cf83e0d70df2beba2ef9eaf.tar.bz2
tracetool: drop the probe "__nocheck__" wrapping
Every generated inline probe function is wrapped with a trivial caller that has a hard-coded condition test: static inline void _nocheck__trace_test_wibble(void * context, int value) { tracepoint(qemu, test_wibble, context, value); } static inline void trace_test_wibble(void * context, int value) { if (true) { _nocheck__trace_test_wibble(context, value); } } This was introduced for TCG probes back in 864a2178: trace: [tcg] Do not generate TCG code to trace dynamically-disabled events but is obsolete since 126d4123 tracing: excise the tcg related from tracetool This commit removes the wrapping such that we have static inline void trace_test_wibble(void * context, int value) { tracepoint(qemu, test_wibble, context, value); } The default build of qemu-system-x86_64 on Fedora with the 'log' backend, has its size reduced by 1 MB Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20250916081638.764020-7-berrange@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/tracetool/__init__.py1
-rw-r--r--scripts/tracetool/format/h.py16
2 files changed, 1 insertions, 16 deletions
diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
index 0f33758..1d5238a 100644
--- a/scripts/tracetool/__init__.py
+++ b/scripts/tracetool/__init__.py
@@ -338,7 +338,6 @@ class Event(object):
return self._FMT.findall(self.fmt)
QEMU_TRACE = "trace_%(name)s"
- QEMU_TRACE_NOCHECK = "_nocheck__" + QEMU_TRACE
QEMU_TRACE_TCG = QEMU_TRACE + "_tcg"
QEMU_DSTATE = "_TRACE_%(NAME)s_DSTATE"
QEMU_BACKEND_DSTATE = "TRACE_%(NAME)s_BACKEND_DSTATE"
diff --git a/scripts/tracetool/format/h.py b/scripts/tracetool/format/h.py
index a00ae47..b42a826 100644
--- a/scripts/tracetool/format/h.py
+++ b/scripts/tracetool/format/h.py
@@ -64,7 +64,7 @@ def generate(events, backend, group):
out('',
'static inline void %(api)s(%(args)s)',
'{',
- api=e.api(e.QEMU_TRACE_NOCHECK),
+ api=e.api(),
args=e.args)
if "disable" not in e.properties:
@@ -72,20 +72,6 @@ def generate(events, backend, group):
out('}')
- cond = "true"
-
- out('',
- 'static inline void %(api)s(%(args)s)',
- '{',
- ' if (%(cond)s) {',
- ' %(api_nocheck)s(%(names)s);',
- ' }',
- '}',
- api=e.api(),
- api_nocheck=e.api(e.QEMU_TRACE_NOCHECK),
- args=e.args,
- names=", ".join(e.args.names()),
- cond=cond)
backend.generate_end(events, group)