perf symbols: Fix endless loop in dso__split_kallsyms_for_kcore
perf symbols: Fix endless loop in dso__split_kallsyms_for_kcore

Currently we split symbols based on the map comparison, but symbols are stored
within dso objects and maps could point into same dso objects (kernel maps).

Hence we could end up changing rbtree we are currently iterating and mess it
up. It's easily reproduced on s390x by running:

  $ perf record -a -- sleep 3
  $ perf buildid-list -i perf.data --with-hits

The fix is to compare dso objects instead.

Reported-by: Michael Petlan <7c8c65ce300766eb0281695a77ac16e6d2fb7727@redhat.com>
Signed-off-by: Jiri Olsa <2c6594f608aa3d41e98d48846a6328831f7084ad@kernel.org>
Acked-by: Adrian Hunter <41bb5944f244750b7cf0394140496972a3f1bee3@intel.com>
Cc: Andi Kleen <0474aee45985f5ae829f53849df476200e876990@linux.intel.com>
Cc: Kan Liang <6e4ed0645dbf05e706dc43d69b381839dca8944b@intel.com>
Cc: Namhyung Kim <5c915a589b3ddf58cebf14bec41bcc143b37ac3c@kernel.org>
Cc: Peter Zijlstra <645ca7d3a8d3d4f60557176cd361ea8351edc32b@chello.nl>
Link: 265cf106078de827585e8a6791a39e85314a7c5b@krava.brq.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <293abb6b76d7791c0732cc517d38c4b5c734b87f@redhat.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs