Skip to content

Commit

Permalink
perf trace: Move call to symbol__init() after creating session
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Namhyung Kim authored and Arnaldo Carvalho de Melo committed Aug 13, 2014
1 parent dc5c819 commit cb2ffae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/perf/builtin-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cb2ffae

Please sign in to comment.