]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6a3203921ee813a4c9ecbdc5c9626e3438b5a92b
tree17b805c4d27f2b06d8a11fdc0b33845321f8765e
parentf073666f3ec631cff55a231b6df52f32e13bc7a2
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