Skip to content

Commit 7b70ac4

Browse files
glemcorostedt
authored andcommitted
rv: Remove trailing whitespace from tracepoint string
RV event tracepoints print a line with the format: "event_xyz: S0 x event -> S1 " "event_xyz: S1 x event -> S0 (final)" While printing an event leading to a non-final state, the line has a trailing white space (visible above before the closing "). Adapt the format string not to print the trailing whitespace if we are not printing "(final)". Cc: Masami Hiramatsu <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Tomas Glozar <[email protected]> Cc: Juri Lelli <[email protected]> Cc: Clark Williams <[email protected]> Cc: John Kacur <[email protected]> Link: https://lore.kernel.org/[email protected] Reviewed-by: Nam Cao <[email protected]> Signed-off-by: Gabriele Monaco <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 28a78af commit 7b70ac4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

kernel/trace/rv/rv_trace.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ DECLARE_EVENT_CLASS(event_da_monitor,
2929
__entry->final_state = final_state;
3030
),
3131

32-
TP_printk("%s x %s -> %s %s",
32+
TP_printk("%s x %s -> %s%s",
3333
__entry->state,
3434
__entry->event,
3535
__entry->next_state,
36-
__entry->final_state ? "(final)" : "")
36+
__entry->final_state ? " (final)" : "")
3737
);
3838

3939
DECLARE_EVENT_CLASS(error_da_monitor,
@@ -90,12 +90,12 @@ DECLARE_EVENT_CLASS(event_da_monitor_id,
9090
__entry->final_state = final_state;
9191
),
9292

93-
TP_printk("%d: %s x %s -> %s %s",
93+
TP_printk("%d: %s x %s -> %s%s",
9494
__entry->id,
9595
__entry->state,
9696
__entry->event,
9797
__entry->next_state,
98-
__entry->final_state ? "(final)" : "")
98+
__entry->final_state ? " (final)" : "")
9999
);
100100

101101
DECLARE_EVENT_CLASS(error_da_monitor_id,

0 commit comments

Comments
 (0)