lkml.org 
[lkml]   [2014]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 12/13] perf trace: Move call to symbol__init() after creating session
Date
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>
---
tools/perf/builtin-trace.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 36ae51d61be2..997eb4171ec4 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2215,13 +2215,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);
--
2.0.0


\
 
 \ /
  Last update: 2014-08-12 09:01    [W:0.162 / U:1.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site