Skip to content

Commit

Permalink
tools lib traceevent: Fix output of %llu for 64 bit values read on 32…
Browse files Browse the repository at this point in the history
… bit machines

When a long value is read on 32 bit machines for 64 bit output, the
parsing needs to change "%lu" into "%llu", as the value is read
natively.

Unfortunately, if "%llu" is already there, the code will add another "l"
to it and fail to parse it properly.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/20160209204237.337024613@goodmis.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Steven Rostedt (Red Hat) authored and Arnaldo Carvalho de Melo committed Mar 3, 2016
1 parent 9ec72ea commit a66673a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/lib/traceevent/event-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -4978,7 +4978,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event
break;
}
}
if (pevent->long_size == 8 && ls &&
if (pevent->long_size == 8 && ls == 1 &&
sizeof(long) != 8) {
char *p;

Expand Down

0 comments on commit a66673a

Please sign in to comment.