[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-e8c5fe101e55e4c45a2859cea2b4c374595f8867@git.kernel.org>
Date: Wed, 23 Nov 2016 20:16:01 -0800
From: tip-bot for Jiri Olsa <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, dzickus@...hat.com,
a.p.zijlstra@...llo.nl, hpa@...or.com, namhyung@...nel.org,
tglx@...utronix.de, jolsa@...hat.com, dsahern@...il.com,
jmario@...hat.com, andi@...stfloor.org, acme@...hat.com,
jolsa@...nel.org, mingo@...nel.org
Subject: [tip:perf/core] perf c2c report: Setup browser after opening
perf.data
Commit-ID: e8c5fe101e55e4c45a2859cea2b4c374595f8867
Gitweb: http://git.kernel.org/tip/e8c5fe101e55e4c45a2859cea2b4c374595f8867
Author: Jiri Olsa <jolsa@...nel.org>
AuthorDate: Mon, 21 Nov 2016 22:33:27 +0100
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 23 Nov 2016 10:44:04 -0300
perf c2c report: Setup browser after opening perf.data
Because of the early browser switch we won't get possible error
messages, as it will clear the screen right after showing the message,
e.g.:
Before:
$ sudo perf c2c report -d lcl
$
After:
$ sudo perf c2c report -d lcl
File perf.data not owned by current user or root (use -f to override)
$
$ ls -la perf.data
-rw-------. 1 acme acme 26648 Nov 22 15:11 perf.data
$
Signed-off-by: Jiri Olsa <jolsa@...hat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Andi Kleen <andi@...stfloor.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Don Zickus <dzickus@...hat.com>
Cc: Joe Mario <jmario@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1479764011-10732-3-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/builtin-c2c.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index c6d0dda..15addb0 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -2535,13 +2535,6 @@ static int perf_c2c__report(int argc, const char **argv)
if (c2c.stats_only)
c2c.use_stdio = true;
- if (c2c.use_stdio)
- use_browser = 0;
- else
- use_browser = 1;
-
- setup_browser(false);
-
if (!input_name || !strlen(input_name))
input_name = "perf.data";
@@ -2568,6 +2561,7 @@ static int perf_c2c__report(int argc, const char **argv)
pr_debug("No memory for session\n");
goto out;
}
+
err = setup_nodes(session);
if (err) {
pr_err("Failed setup nodes\n");
@@ -2587,6 +2581,13 @@ static int perf_c2c__report(int argc, const char **argv)
goto out_session;
}
+ if (c2c.use_stdio)
+ use_browser = 0;
+ else
+ use_browser = 1;
+
+ setup_browser(false);
+
err = perf_session__process_events(session);
if (err) {
pr_err("failed to process sample\n");
Powered by blists - more mailing lists