linux-sg2042/tools/lib
Kapileshwar Singh c2e4b24ff8 tools lib traceevent: Fix string handling in heterogeneous arch environments
When a trace recorded on a 32-bit device is processed with a 64-bit
binary, the higher 32-bits of the address need to ignored.

The lack of this results in the output of the 64-bit pointer
value to the trace as the 32-bit address lookup fails in find_printk().

Before:

  burn-1778  [003]   548.600305: bputs:   0xc0046db2s: 2cec5c058d98c

After:

  burn-1778  [003]   548.600305: bputs:   0xc0046db2s: RT throttling activated

The problem occurs in PRINT_FIELD when the field is recognized as a
pointer to a string (of the type const char *)

Heterogeneous architectures cases below can arise and should be handled:

* Traces recorded using 32-bit addresses processed on a 64-bit machine
* Traces recorded using 64-bit addresses processed on a 32-bit machine

Reported-by: Juri Lelli <juri.lelli@arm.com>
Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Javi Merino <javi.merino@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1442928123-13824-1-git-send-email-kapileshwar.singh@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-09-22 11:57:04 -03:00
..
api Merge branch 'linus' into perf/core, to refresh the branch 2015-07-21 07:57:44 +02:00
bpf bpf tools: New API to get name from a BPF object 2015-08-31 16:53:15 -03:00
lockdep tools/liblockdep: Use the rbtree header provided by common tools headers 2015-08-25 09:44:23 +02:00
symbol tools lib symbol: Start carving out symbol parsing routines from perf 2013-12-13 10:30:20 -03:00
traceevent tools lib traceevent: Fix string handling in heterogeneous arch environments 2015-09-22 11:57:04 -03:00
util tools lib: Move asm-generic/bitops/find.h code to tools/include and tools/lib 2014-12-17 11:14:48 -03:00
hweight.c tools: Copy lib/hweight.c from the kernel sources 2015-07-09 16:29:56 -03:00
rbtree.c tools: Copy lib/rbtree.c to tools/lib/ 2015-07-05 22:48:21 -03:00