Em Mon, Aug 03, 2015 at 04:00:09PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Mon, Aug 03, 2015 at 07:41:13PM +0200, Jiri Olsa escreveu: > > Missing separate debuginfos, use: dnf debuginfo-install > > glibc-2.21-7.fc22.x86_64 > > [Thread debugging using libthread_db enabled] > > Using host libthread_db library "/lib64/libthread_db.so.1". > > Detaching after fork from child process 11230. > > > > Program received signal SIGSEGV, Segmentation fault. > > 0x00000000004eeace in pevent_set_function_resolver (pevent=0x0, > > func=0x4a3197 <machine__resolve_kernel_addr>, priv=0x18e1f48) at > > event-parse.c:464 > > 464 free(pevent->func_resolver); > > Missing separate debuginfos, use: dnf debuginfo-install > > audit-libs-2.4.3-1.fc22.x86_64 bzip2-libs-1.0.6-14.fc22.x86_64 > > elfutils-libelf-0.163-1.fc22.x86_64 elfutils-libs-0.163-1.fc22.x86_64 > > libunwind-1.1-10.fc22.x86_64 nss-softokn-freebl-3.19.2-1.0.fc22.x86_64 > > numactl-libs-2.0.10-2.fc22.x86_64 perl-libs-5.20.2-326.fc22.x86_64 > > python-libs-2.7.10-4.fc22.x86_64 slang-2.3.0-2.fc22.x86_64 > > xz-libs-5.2.0-2.fc22.x86_64 zlib-1.2.8-7.fc22.x86_64 > > (gdb) > > > I think 'session->tevent.pevent' gets initialized only for tracepoint, > > right? > > Reproduced, checking.
Yeah, I think we only need to set libtraceevent's function resolver if there are tracepoints, i.e. if libtraceevent is being used. Following patch should be enough, right? - Arnaldo diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index bd31380122f9..7912feb9a024 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -1861,7 +1861,8 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) else symbol_conf.use_callchain = false; - if (pevent_set_function_resolver(session->tevent.pevent, + if (session->tevent.pevent && + pevent_set_function_resolver(session->tevent.pevent, machine__resolve_kernel_addr, &session->machines.host) < 0) { pr_err("%s: failed to set libtraceevent function resolver\n", __func__); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/