From: Valentin Schneider <vschneid@redhat.com>
To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Cc: Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Tomas Glozar <tglozar@redhat.com>,
Costa Shulyupin <costa.shul@redhat.com>,
Crystal Wood <crwood@redhat.com>, John Kacur <jkacur@redhat.com>,
Ivan Pravdin <ipravdin.official@gmail.com>,
Jonathan Corbet <corbet@lwn.net>
Subject: [PATCH v5 5/8] rtla: make struct trace_events double linked
Date: Wed, 2 Sep 2026 14:39:34 +0200 [thread overview]
Message-ID: <20260902123942.695822-6-vschneid@redhat.com> (raw)
In-Reply-To: <20260902123942.695822-1-vschneid@redhat.com>
The events list is currently a single linked list. New events are prepended
to the list, making them the new head.
This makes it easy to fetch the last-defined event when handling trigger
and filter options on the cmdline, as they apply to the last-defined event,
but means the events are then processed in LIFO order with regards to the
command line order.
To prepare for processing the events in the user-defined order, make the
events list double linked.
Signed-off-by: Valentin Schneider <vschneid@redhat.com>
---
tools/tracing/rtla/src/cli_p.h | 4 +++-
tools/tracing/rtla/src/trace.h | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/tracing/rtla/src/cli_p.h b/tools/tracing/rtla/src/cli_p.h
index f2dd7c610093d..7e3a713f97c62 100644
--- a/tools/tracing/rtla/src/cli_p.h
+++ b/tools/tracing/rtla/src/cli_p.h
@@ -394,8 +394,10 @@ static int opt_event_cb(const struct option *opt, const char *arg, int unset)
if (!tevent)
fatal("Error alloc trace event");
- if (*events)
+ if (*events) {
tevent->next = *events;
+ (*events)->prev = tevent;
+ }
*events = tevent;
return 0;
diff --git a/tools/tracing/rtla/src/trace.h b/tools/tracing/rtla/src/trace.h
index 95b911a2228b2..eacafc0c96b31 100644
--- a/tools/tracing/rtla/src/trace.h
+++ b/tools/tracing/rtla/src/trace.h
@@ -4,6 +4,7 @@
struct trace_events {
struct trace_events *next;
+ struct trace_events *prev;
char *system;
char *event;
char *filter;
--
2.55.0
next prev parent reply other threads:[~2026-09-02 12:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 12:39 [PATCH v5 0/8] tracing/osnoise: Track IPIs Valentin Schneider
2026-09-02 12:39 ` [PATCH v5 1/8] rtla/osnoise: Add IPI tracking cmdline option Valentin Schneider
2026-09-02 12:39 ` [PATCH v5 2/8] rtla/osnoise: Record IPI count in osnoise top Valentin Schneider
2026-09-02 12:39 ` [PATCH v5 3/8] rtla/osnoise: Leverage IPI event filters when tracing a subset of CPUs Valentin Schneider
2026-09-02 12:39 ` [PATCH v5 4/8] rtla/osnoise: Allow IPI filters to gracefully fail Valentin Schneider
2026-09-02 12:39 ` Valentin Schneider [this message]
2026-09-02 12:39 ` [PATCH v5 6/8] rtla: Enable and disable events in the user-defined order Valentin Schneider
2026-09-02 12:39 ` [PATCH v5 7/8] rtla: Unconditionally clean any pre-existing filters for user-provided events Valentin Schneider
2026-09-02 12:39 ` [PATCH v5 8/8] rtla/osnoise: Trace IPI events when recording a trace file Valentin Schneider
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=20260902123942.695822-6-vschneid@redhat.com \
--to=vschneid@redhat.com \
--cc=corbet@lwn.net \
--cc=costa.shul@redhat.com \
--cc=crwood@redhat.com \
--cc=ipravdin.official@gmail.com \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglozar@redhat.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
all inboxes | Powered by JetHome®