From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Cc: Metin Kaya <metin.kaya@arm.com>
Subject: [PATCH] libtracefs: Fix mistaken update to TRACEFS_STACKTRACE macro
Date: Mon, 7 Apr 2025 17:20:13 -0400 [thread overview]
Message-ID: <20250407172013.6aa58191@gandalf.local.home> (raw)
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
The change that converted generic names to variables to start with "tfs_"
was a bit too aggressive and ended up changing the string name of
"common_stacktrace" which broke trace_sql():
When running sqlhist, it would get the following error:
# ./bin/sqlhist -n wake_lat 'select start.pid, start.common_stacktrace, TIMESTAMP_DELTA_USECS as delta from sched_waking as start join sched_switch as end on start.pid = end.next_pid'
Failed creating synthetic event!: Success
select start.pid, start.common_stacktrace, TIMESTAMP_DELTA_USECS as delta from sched_waking as start join sched_switch as end on start.pid = end.next_pid
^
ERROR: 'start.common_stacktrace'
Field 'common_stacktrace' not part of event sched_waking
When it should have produced:
# ./bin/sqlhist -n wake_lat 'select start.pid, start.common_stacktrace, TIMESTAMP_DELTA_USECS as delta from sched_waking as start join sched_switch as end on start.pid = end.next_pid'
echo 's:wake_lat pid_t pid; unsigned long common_stacktrace[]; u64 delta;' >> /sys/kernel/tracing/dynamic_events
echo 'hist:keys=pid:__arg_15169_2=pid,__arg_15169_4=common_stacktrace,__arg_15169_5=common_timestamp.usecs' >> /sys/kernel/tracing/events/sched/sched_waking/trigger
echo 'hist:keys=next_pid:__pid_15169_1=$__arg_15169_2,__common_stacktrace_15169_3=$__arg_15169_4,__delta_15169_6=common_timestamp.usecs-$__arg_15169_5:onmatch(sched.sched_waking).trace(wake_lat,$__pid_15169_1,$__common_stacktrace_15169_3,$__delta_15169_6)' >> /sys/kernel/tracing/events/sched/sched_switch/trigger
Fixes: a2bfb49f ("libtracefs: utest: Rename private functions to fix static building")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
include/tracefs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/tracefs.h b/include/tracefs.h
index b4e2e30..b6e0f6b 100644
--- a/include/tracefs.h
+++ b/include/tracefs.h
@@ -593,7 +593,7 @@ int tracefs_event_verify_filter(struct tep_event *event, const char *filter,
#define TRACEFS_TIMESTAMP "common_timestamp"
#define TRACEFS_TIMESTAMP_USECS "common_timestamp.usecs"
-#define TRACEFS_STACKTRACE "tfs_common_stacktrace"
+#define TRACEFS_STACKTRACE "common_stacktrace"
enum tracefs_synth_handler {
TRACEFS_SYNTH_HANDLE_NONE = 0,
--
2.47.2
next reply other threads:[~2025-04-07 21:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 21:20 Steven Rostedt [this message]
2025-04-08 7:44 ` [PATCH] libtracefs: Fix mistaken update to TRACEFS_STACKTRACE macro Metin Kaya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250407172013.6aa58191@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=metin.kaya@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).