Skip to content

Commit

Permalink
perf probe: Use hexadecimal type by default if possible
Browse files Browse the repository at this point in the history
Use hexadecimal type by default if it is available on current running
kernel.

This keeps the default behavior of perf probe after changing the output
format of 'u8/16/32/64' to unsigned decimal number.

Signed-off-by: Masami Hiramatsu <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Hemant Kumar <[email protected]>
Cc: Naohiro Aota <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Wang Nan <[email protected]>
Link: http://lkml.kernel.org/r/147151074685.12957.16415861010796255514.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
mhiramat authored and acmel committed Aug 23, 2016
1 parent 9254378 commit 9880ce4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/perf/util/probe-finder.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@ static int convert_variable_type(Dwarf_Die *vr_die,
probe_type_is_available(PROBE_TYPE_X))
prefix = 'x';
else
prefix = die_is_signed_type(&type) ? 's' : 'u';
prefix = die_is_signed_type(&type) ? 's' :
probe_type_is_available(PROBE_TYPE_X) ? 'x' : 'u';

ret = dwarf_bytesize(&type);
if (ret <= 0)
Expand Down

0 comments on commit 9880ce4

Please sign in to comment.