diff options
| author | Wang Nan <[email protected]> | 2015-04-18 17:50:20 +0200 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2015-04-29 10:37:49 -0300 |
| commit | d4ae42139289cbe38d5b84fa1558161d330d6e54 (patch) | |
| tree | 514780cb33927dd0fb4facc12f125b5c69443048 /tools/perf/scripts/python/net_dropmonitor.py | |
| parent | e0a7cce5366dbd22391e09a83827ba5b4491cd2f (diff) | |
perf data: Fix signedness of value
When converting int values, perf first extractes it to a ulonglong, then
feeds it to babeltrace as a signed value.
For negative 32 bit values (for example, return values of failed
syscalls), the extracted data should be something like 0xfffffffe (-2).
It becomes a large int64 value.
Babeltrace denies to insert it with bt_ctf_field_signed_integer_set_value()
because it is larger than 0x7fffffff, the largest positive value a
32 bit int can be.
This patch introduces adjust_signedness(), which fills high bits of
ulonglong with 1 if the value is negative.
Signed-off-by: Wang Nan <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: He Kuang <[email protected]>
Cc: Jeremie Galarneau <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Sebastian Andrzej Siewior <[email protected]>
Cc: Tom Zanussi <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Jiri Olsa <[email protected]>
[ s/signess/signedness/g ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions