diff options
author | Steven Rostedt (Google) <rostedt@goodmis.org> | 2022-01-31 11:36:40 -0500 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2022-02-02 21:58:41 -0500 |
commit | 29a06f7619b419146920ed38e4dce880eb769077 (patch) | |
tree | cffd2c657760b6fd472dc94c91e4c44a8aa6f718 | |
parent | adaf1ccce791f8e7ad0bcf93626c11b6c4899065 (diff) | |
download | libtracefs-29a06f7619b419146920ed38e4dce880eb769077.tar.gz |
libtracefs: Fix tracefs_synth_echo_cmd()
The update to use dynamic_events instead of synthetic_events for echoing
the synthetic event missed out on adding the colon, and made the output
incorrect for the new format.
Link: https://lore.kernel.org/linux-trace-devel/20220131163642.2754485-3-rostedt@goodmis.org
Fixes: d7c5dbb7a231e ("libtracefs: Use the internal dynamic events API when creating synthetic events")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-rw-r--r-- | src/tracefs-hist.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tracefs-hist.c b/src/tracefs-hist.c index 8d99492..622fe5c 100644 --- a/src/tracefs-hist.c +++ b/src/tracefs-hist.c @@ -2155,8 +2155,10 @@ int tracefs_synth_echo_cmd(struct trace_seq *seq, if (!path) goto out_free; - trace_seq_printf(seq, "echo '%s%s %s' > %s/%s\n", - synth->dyn_event->prefix, synth->dyn_event->event, + trace_seq_printf(seq, "echo '%s%s%s %s' > %s/%s\n", + synth->dyn_event->prefix, + strlen(synth->dyn_event->prefix) ? ":" : "", + synth->dyn_event->event, synth->dyn_event->format, path, synth->dyn_event->trace_file); tracefs_put_tracing_file(path); |