Skip to content

Commit e70bb54

Browse files
sunlimingrostedt
authored andcommitted
tracing: Modify print_fields() for fields output order
Now the print_fields() print trace event fields in reverse order. Modify it to the positive sequence. Example outputs for a user event: test0 u32 count1; u32 count2 Output before: example-2547 [000] ..... 325.666387: test0: count2=0x2 (2) count1=0x1 (1) Output after: example-2742 [002] ..... 429.769370: test0: count1=0x1 (1) count2=0x2 (2) Link: https://lore.kernel.org/linux-trace-kernel/[email protected] Fixes: 80a7699 ("tracing: Add "fields" option to show raw trace event fields") Signed-off-by: sunliming <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent cfac4ed commit e70bb54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/trace/trace_output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ static void print_fields(struct trace_iterator *iter, struct trace_event_call *c
847847
int ret;
848848
void *pos;
849849

850-
list_for_each_entry(field, head, link) {
850+
list_for_each_entry_reverse(field, head, link) {
851851
trace_seq_printf(&iter->seq, " %s=", field->name);
852852
if (field->offset + field->size > iter->ent_size) {
853853
trace_seq_puts(&iter->seq, "<OVERFLOW>");

0 commit comments

Comments
 (0)