perf symbols: Fix issue with binaries using 16-bytes buildids (v2)
authorStephane Eranian <eranian@google.com>
Fri, 22 Oct 2010 15:25:01 +0000 (17:25 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 23 Sep 2011 17:37:41 +0000 (14:37 -0300)
commitbe96ea8ffa788dccb1ba895cced29db6687c4911
tree17b805c4d27f2b06d8a11fdc0b33845321f8765e
parent936be50306a92356367f330ef9d44f1f62478d22
perf symbols: Fix issue with binaries using 16-bytes buildids (v2)

Buildid can vary in size. According to the man page of ld, buildid can
be 160 bits (sha1) or 128 bits (md5, uuid). Perf assumes buildid size of
20 bytes (160 bits) regardless. When dealing with md5 buildids, it would
thus read more than needed and that would cause mismatches and samples
without symbols.

This patch fixes this by taking into account the actual buildid size as
encoded int he section header. The leftover bytes are also cleared.

This second version fixes a minor issue with the memset() base position.

Cc: David S. Miller <davem@davemloft.net>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Stephane Eranian <eranian@gmail.com>
Link: http://lkml.kernel.org/r/4cc1af3c.8ee7d80a.5a28.ffff868e@mx.google.com
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/symbol.c
This page took 0.026854 seconds and 5 git commands to generate.