perf session: Don't rely on evlist in pipe mode
authorDavid Carrillo-Cisneros <davidcc@google.com>
Mon, 10 Apr 2017 20:14:30 +0000 (13:14 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 11 Apr 2017 19:22:20 +0000 (16:22 -0300)
commit0973ad97c187e06aece61f685b9c3b2d93290a73
treeadc229385c50dd4c50964d25c672c862930d462e
parent6ab11f3a35aa07be2ff167b9de37e6c1eb58396b
perf session: Don't rely on evlist in pipe mode

Session sets a number parameters that rely on evlist. These parameters
are not used in pipe-mode and should not be set, since evlist is
unavailable. Fix that.

Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Paul Turner <pjt@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Simon Que <sque@chromium.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/20170410201432.24807-6-davidcc@google.com
[ Check if file != NULL in perf_session__new(), like when used by builtin-top.c ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/session.c