Skip to content

Commit cb2ffae

Browse files
namhyungacmel
authored andcommitted
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>
1 parent dc5c819 commit cb2ffae

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎tools/perf/builtin-trace.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2241,13 +2241,13 @@ static int trace__replay(struct trace *trace)
22412241
/* add tid to output */
22422242
trace->multiple_threads = true;
22432243

2244-
if (symbol__init() < 0)
2245-
return -1;
2246-
22472244
session = perf_session__new(&file, false, &trace->tool);
22482245
if (session == NULL)
22492246
return -ENOMEM;
22502247

2248+
if (symbol__init() < 0)
2249+
goto out;
2250+
22512251
trace->host = &session->machines.host;
22522252

22532253
err = perf_session__set_tracepoints_handlers(session, handlers);

0 commit comments

Comments
 (0)