summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/auxtrace.c
diff options
context:
space:
mode:
authorWang Nan <wangnan0@huawei.com>2015-04-18 17:50:20 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-04-29 15:37:49 +0200
commitd4ae42139289cbe38d5b84fa1558161d330d6e54 (patch)
tree514780cb33927dd0fb4facc12f125b5c69443048 /tools/perf/util/auxtrace.c
parentperf data: Fix duplicate field names and avoid reserved keywords (diff)
downloadlinux-d4ae42139289cbe38d5b84fa1558161d330d6e54.tar.xz
linux-d4ae42139289cbe38d5b84fa1558161d330d6e54.zip
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 <wangnan0@huawei.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: He Kuang <hekuang@huawei.com> Cc: Jeremie Galarneau <jgalar@efficios.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Tom Zanussi <tzanussi@gmail.com> Link: http://lkml.kernel.org/r/1429372220-6406-8-git-send-email-jolsa@kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> [ s/signess/signedness/g ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/auxtrace.c')
0 files changed, 0 insertions, 0 deletions