mirror of
https://github.com/torvalds/linux.git
synced 2026-11-09 13:44:03 +01:00
rtla: Make struct trace_events double linked
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> Link: https://lore.kernel.org/r/20260902123942.695822-6-vschneid@redhat.com [ capital letter in commit message ] Signed-off-by: Tomas Glozar <tglozar@redhat.com>
This commit is contained in:
parent
edbb1d2671
commit
2f13964b43
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
struct trace_events {
|
||||
struct trace_events *next;
|
||||
struct trace_events *prev;
|
||||
char *system;
|
||||
char *event;
|
||||
char *filter;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user