perf tools: Compare dso's also when comparing symbols
authorNamhyung Kim <[email protected]>
Tue, 15 Oct 2013 02:01:56 +0000 (11:01 +0900)
committerArnaldo Carvalho de Melo <[email protected]>
Mon, 21 Oct 2013 20:33:23 +0000 (17:33 -0300)
commit09600e0f9ebb06235b852a646a3644b7d4a71aca
treeb2114a8553bc1b48bc3c1ce314711f150c396d7b
parente369517ce5f796945c6af047b4e8b1d650e03458
perf tools: Compare dso's also when comparing symbols

Linus reported that sometimes 'perf report -s symbol' exits without any
message on TUI.  David and Jiri found that it's because it failed to add
a hist entry due to an invalid symbol length.

It turns out that sorting by symbol (address) was broken since it only
compares symbol addresses.  The symbol address is a relative address
within a dso thus just checking its address can result in merging
unrelated symbols together.  Fix it by checking dso before comparing
symbol address.

Reported-by: Linus Torvalds <[email protected]>
Signed-off-by: Namhyung Kim <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/sort.c