perf script: No tracepoints? Don't call libtraceevent.
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 3 Aug 2015 19:27:40 +0000 (16:27 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 4 Aug 2015 15:28:10 +0000 (12:28 -0300)
commit9ee67421fe3b67a0796d6ea620fd5fcb037d3f89
tree379ff0e5acad160eecf49c5ac5461ae06dca46a9
parent75f80859b130a1cc84e59e71295ce2dd51fe1c81
perf script: No tracepoints? Don't call libtraceevent.

The libtraceevent handler (session->tevent) is only initialized when
there are tracepoints in a perf.data event list, so do not call
pevent_set_function_resolve() in those cases, fixing a segfault.

Reported-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-xyynkucl5p4bcs13zi4i4b1f@git.kernel.org
link: http://lkml.kernel.org/r/20150803174113.GA20282@krava.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-script.c