From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Jiri Olsa <jolsa@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
kernel-team@lge.com, Masami Hiramatsu <mhiramat@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: [PATCH 2/4] perf ftrace: Move setup_pager before opening trace_pipe
Date: Sun, 18 Jun 2017 23:23:00 +0900 [thread overview]
Message-ID: <20170618142302.25390-2-namhyung@kernel.org> (raw)
In-Reply-To: <20170618142302.25390-1-namhyung@kernel.org>
The perf ftrace fails to reset tracer after finish the recording like
below:
$ sudo perf ftrace -v hello
write 'nop' to tracing/current_tracer failed: Device or resource busy
...
This is because the trace_pipe file is open in pager process. Move the
pager setup before opening the file.
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Fixes: 583359646fde ("perf ftrace: Use pager for displaying result")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/builtin-ftrace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
index 966a94fa8200..982b98ee639e 100644
--- a/tools/perf/builtin-ftrace.c
+++ b/tools/perf/builtin-ftrace.c
@@ -231,6 +231,8 @@ static int __cmd_ftrace(struct perf_ftrace *ftrace, int argc, const char **argv)
goto out_reset;
}
+ setup_pager();
+
trace_file = get_tracing_file("trace_pipe");
if (!trace_file) {
pr_err("failed to open trace_pipe\n");
@@ -254,8 +256,6 @@ static int __cmd_ftrace(struct perf_ftrace *ftrace, int argc, const char **argv)
goto out_close_fd;
}
- setup_pager();
-
perf_evlist__start_workload(ftrace->evlist);
while (!done) {
--
2.13.0
next prev parent reply other threads:[~2017-06-18 14:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-18 14:22 [PATCH 1/4] perf ftrace: Show error message when fails to set ftrace files Namhyung Kim
2017-06-18 14:23 ` Namhyung Kim [this message]
2017-06-20 9:05 ` [tip:perf/core] perf ftrace: Move setup_pager before opening trace_pipe tip-bot for Namhyung Kim
2017-06-18 14:23 ` [PATCH 3/4] perf ftrace: Add option for function filtering Namhyung Kim
2017-06-20 9:06 ` [tip:perf/core] " tip-bot for Namhyung Kim
2017-06-18 14:23 ` [PATCH 4/4] perf ftrace: Add -D option for depth filter Namhyung Kim
2017-06-20 9:07 ` [tip:perf/core] " tip-bot for Namhyung Kim
2017-06-19 18:24 ` [PATCH 1/4] perf ftrace: Show error message when fails to set ftrace files Arnaldo Carvalho de Melo
2017-06-20 9:05 ` [tip:perf/core] " tip-bot for Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170618142302.25390-2-namhyung@kernel.org \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=fweisbec@gmail.com \
--cc=jolsa@kernel.org \
--cc=kernel-team@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox