diff options
author | Namhyung Kim <namhyung@kernel.org> | 2014-08-12 15:40:44 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-08-13 16:41:38 -0300 |
commit | cb2ffae241cfdd6d90acb7ec5f52ad8401885dd2 (patch) | |
tree | 57bb060c902670e4f08216aa04db95ca58705470 /tools/perf/builtin-trace.c | |
parent | dc5c8190b800dc59eff6bb2aa47ea749712197df (diff) | |
download | lwn-cb2ffae241cfdd6d90acb7ec5f52ad8401885dd2.tar.gz lwn-cb2ffae241cfdd6d90acb7ec5f52ad8401885dd2.zip |
perf trace: Move call to symbol__init() after creating session
This is a preparation of fixing dso__load_kernel_sym(). It needs a
session info before calling symbol__init().
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1407825645-24586-13-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r-- | tools/perf/builtin-trace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 20fac5083771..8a83bd835327 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -2241,13 +2241,13 @@ static int trace__replay(struct trace *trace) /* add tid to output */ trace->multiple_threads = true; - if (symbol__init() < 0) - return -1; - session = perf_session__new(&file, false, &trace->tool); if (session == NULL) return -ENOMEM; + if (symbol__init() < 0) + goto out; + trace->host = &session->machines.host; err = perf_session__set_tracepoints_handlers(session, handlers); |