aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-07-30 20:02:26 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-07-30 20:02:26 +0100
commit1448629751871c4924c234c2faaa968fc26890e1 (patch)
tree4f2c9e89946396111e1fb17fb8822625c1893c21
parent5772f2b1fc5d00e7e04e01fa28e9081d6550440a (diff)
parent000822441e34916991f7c03217dc24f38be49e50 (diff)
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
Pull request A build fix and a 'simple' trace backend regression fix. # gpg: Signature made Thu 30 Jul 2020 19:13:10 BST # gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full] # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full] # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/tracing-pull-request: tracetool: carefully define SDT_USE_VARIADIC trace/simple: Allow enabling simple traces from command line Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--scripts/tracetool/backend/dtrace.py4
-rw-r--r--trace/control.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/scripts/tracetool/backend/dtrace.py b/scripts/tracetool/backend/dtrace.py
index b7fe4c1b50..fc0c8fc52f 100644
--- a/scripts/tracetool/backend/dtrace.py
+++ b/scripts/tracetool/backend/dtrace.py
@@ -44,11 +44,15 @@ def generate_h_begin(events, group):
# require SDT_USE_VARIADIC to be defined. If dtrace includes <sys/sdt.h>
# first without defining SDT_USE_VARIADIC then ust breaks because the
# STAP_PROBEV() macro is not defined.
+ out('#ifndef SDT_USE_VARIADIC')
out('#define SDT_USE_VARIADIC 1')
+ out('#endif')
out('#include "%s"' % header,
'')
+ out('#undef SDT_USE_VARIADIC')
+
# SystemTap defines <provider>_<name>_ENABLED() but other DTrace
# implementations might not.
for e in events:
diff --git a/trace/control.c b/trace/control.c
index 2ffe000818..6558b5c906 100644
--- a/trace/control.c
+++ b/trace/control.c
@@ -225,6 +225,7 @@ void trace_init_file(const char *file)
{
#ifdef CONFIG_TRACE_SIMPLE
st_set_trace_file(file);
+ st_set_trace_file_enabled(true);
#elif defined CONFIG_TRACE_LOG
/*
* If both the simple and the log backends are enabled, "--trace file"