[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <562E2919.5000601@intel.com>
Date: Mon, 26 Oct 2015 15:22:33 +0200
From: Adrian Hunter <adrian.hunter@...el.com>
To: Jiri Olsa <jolsa@...hat.com>
Cc: acme@...nel.org, Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Kan Liang <kan.liang@...el.com>,
Andi Kleen <ak@...ux.intel.com>, linux-kernel@...r.kernel.org
Subject: Re: [BUG] reporting stuck on s390 in dso__split_kallsyms_for_kcore
On 26/10/15 15:01, Jiri Olsa wrote:
> hi,
> I'm getting stuck buildid-list command on s390
>
> seems like the kcore code gets stuck with inseting
> into rbtree while iterating it..
>
> I was able to fix it with patch below, bu I'm not sure it's the
> correct fix because the kcore maps magic is beyond me so far ;-)
>
> please check attached backtrace and patch
Your fix looks correct to me.
>
>
> (gdb) r buildid-list -i perf.data --with-hits
By the way, there are problems with buildid-list, I have the patches
attached but haven't had a chance to send them. If you find are missing
buildids you might want to try them.
> Starting program: /root/linux/tools/perf/./perf buildid-list -i perf.data --with-hits
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib64/libthread_db.so.1".
> Detaching after fork from child process 56723.
> ^C
> Program received signal SIGINT, Interrupt.
> rb_next (node=0x81573930, node@...ry=0x81551840) at ../lib/rbtree.c:451
> 451 node=node->rb_left;
> Missing separate debuginfos, use: debuginfo-install audit-libs-2.4.1-5.el7.s390x bzip2-libs-1.0.6-13.el7.s390x elfutils-libelf-0.163-3.el7.s390x elfutils-libs-0.163-3.el7.s390x glibc-2.17-105.el7.s390x nss-softokn-freebl-3.16.2.3-13.el7_1.s390x perl-libs-5.16.3-286.el7.s390x python-libs-2.7.5-34.el7.s390x slang-2.2.4-11.el7.s390x xz-libs-5.1.2-12alpha.el7.s390x zlib-1.2.7-15.el7.s390x
> (gdb) bt
> #0 rb_next (node=0x81573930, node@...ry=0x81551840) at ../lib/rbtree.c:451
> #1 0x00000000800a7da0 in dso__split_kallsyms_for_kcore (dso=dso@...ry=0x812e69c0, map=map@...ry=0x812e6fb0, filter=filter@...ry=0x0)
> at util/symbol.c:668
> #2 0x00000000800a9ac6 in dso__load_kallsyms (dso=dso@...ry=0x812e69c0, filename=filename@...ry=0x81353030 "/proc/kallsyms",
> map=map@...ry=0x812e6fb0, filter=filter@...ry=0x0) at util/symbol.c:1289
> #3 0x00000000800aa0c4 in dso__load_kernel_sym (dso=dso@...ry=0x812e69c0, map=map@...ry=0x812e6fb0, filter=filter@...ry=0x0)
> at util/symbol.c:1783
> #4 0x00000000800aa208 in dso__load (dso=0x812e69c0, map=map@...ry=0x812e6fb0, filter=filter@...ry=0x0) at util/symbol.c:1420
> #5 0x00000000800bb2aa in map__load (map=0x812e6fb0, filter=0x0) at util/map.c:289
> #6 0x0000000080087c9e in thread__find_addr_map (thread=<optimized out>, cpumode=cpumode@...ry=1 '\001', type=type@...ry=MAP__FUNCTION,
> addr=<optimized out>, al=al@...ry=0x3ffffffe118) at util/event.c:969
> #7 0x0000000080081908 in build_id__mark_dso_hit (tool=<optimized out>, event=0x3fffd5aa568, sample=0x3ffffffe410, evsel=<optimized out>,
> machine=<optimized out>) at util/build-id.c:41
> #8 0x00000000800bdfec in perf_evlist__deliver_sample (evlist=evlist@...ry=0x812e5d60,
> tool=tool@...ry=0x8024b240 <build_id__mark_dso_hit_ops>, event=event@...ry=0x3fffd5aa568, sample=sample@...ry=0x3ffffffe410,
> evsel=evsel@...ry=0x812e6770, machine=0x812e5ab8) at util/session.c:1039
> #9 0x00000000800be156 in machines__deliver_event (machines=machines@...ry=0x812e5ab8, evlist=0x812e5d60,
> event=event@...ry=0x3fffd5aa568, sample=sample@...ry=0x3ffffffe410, tool=tool@...ry=0x8024b240 <build_id__mark_dso_hit_ops>,
> file_offset=136552) at util/session.c:1076
> #10 0x00000000800be3f2 in perf_session__deliver_event (session=session@...ry=0x812e59e0, event=event@...ry=0x3fffd5aa568,
> sample=sample@...ry=0x3ffffffe410, tool=tool@...ry=0x8024b240 <build_id__mark_dso_hit_ops>, file_offset=<optimized out>)
> at util/session.c:1133
> #11 0x00000000800c0146 in perf_session__process_event (session=session@...ry=0x812e59e0, event=event@...ry=0x3fffd5aa568,
> file_offset=file_offset@...ry=136552) at util/session.c:1298
> #12 0x00000000800c0746 in __perf_session__process_events (session=session@...ry=0x812e59e0, data_offset=<optimized out>,
> data_size=<optimized out>, file_size=1164232, file_size@...ry=1166128) at util/session.c:1633
> #13 0x00000000800c0c2c in perf_session__process_events (session=session@...ry=0x812e59e0) at util/session.c:1683
> #14 0x000000008002ae5e in perf_session__list_build_ids (force=<optimized out>, with_hits=true) at builtin-buildid-list.c:82
> #15 0x000000008002b078 in cmd_buildid_list (argc=<optimized out>, argv=<optimized out>, prefix=<optimized out>)
> at builtin-buildid-list.c:115
> #16 0x000000008007c71a in run_builtin (p=p@...ry=0x8024aab8 <commands+24>, argc=argc@...ry=4, argv=0x3fffffff090) at perf.c:385
> #17 0x000000008007c95e in handle_internal_command (argc=<optimized out>, argv=<optimized out>) at perf.c:445
> #18 0x000000008007c9e4 in run_argv (argcp=argcp@...ry=0x3ffffffedd4, argv=argv@...ry=0x3ffffffedc8) at perf.c:489
> #19 0x000000008007cca2 in main (argc=4, argv=0x3fffffff090) at perf.c:606
>
>
> thanks,
> jirka
>
>
> ---
> diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
> index e7bf0c4..b0d2fb2 100644
> --- a/tools/perf/util/symbol.c
> +++ b/tools/perf/util/symbol.c
> @@ -680,7 +680,7 @@ static int dso__split_kallsyms_for_kcore(struct dso *dso, struct map *map,
> pos->start -= curr_map->start - curr_map->pgoff;
> if (pos->end)
> pos->end -= curr_map->start - curr_map->pgoff;
> - if (curr_map != map) {
> + if (curr_map->dso != map->dso) {
> rb_erase_init(&pos->rb_node, root);
> symbols__insert(
> &curr_map->dso->symbols[curr_map->type],
>
View attachment "0010-perf-tools-Fix-dso-lookup-by-long-name-and-missing-b.patch" of type "text/x-patch" (4404 bytes)
View attachment "0011-perf-buildid-list-Requires-ordered-events.patch" of type "text/x-patch" (1096 bytes)
Powered by blists - more mailing lists