From: Namhyung Kim <namhyung@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung.kim@lge.com>,
LKML <linux-kernel@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
David Ahern <dsahern@gmail.com>,
Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 12/14] perf ftrace: Use pager for displaying result
Date: Wed, 08 May 2013 14:49:10 +0900 [thread overview]
Message-ID: <871u9i81ih.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <20130506113819.GB1093@krava.brq.redhat.com> (Jiri Olsa's message of "Mon, 6 May 2013 13:38:19 +0200")
On Mon, 6 May 2013 13:38:19 +0200, Jiri Olsa wrote:
> On Mon, May 06, 2013 at 10:52:46AM +0900, Namhyung Kim wrote:
>> On Fri, 26 Apr 2013 10:40:23 +0200, Jiri Olsa wrote:
>> > On Thu, Apr 25, 2013 at 03:50:45PM +0900, Namhyung Kim wrote:
>> >> On Wed, 24 Apr 2013 16:17:24 +0200, Jiri Olsa wrote:
>> >> > On Tue, Apr 23, 2013 at 05:31:10PM +0900, Namhyung Kim wrote:
>> >> >> From: Namhyung Kim <namhyung.kim@lge.com>
>> >> >>
>> >> >> It's convenient to use pager when seeing many lines of result.
>> >> >>
>> >> > for some reason I'm able to get any output for 'live' command only
>> >> > when using --no-pager option. I dont get any data for:
>> >> >
>> >> > # ./perf ftrace live ls
>> >> >
>> >> > not even ls output
>> >
>> > ok, now with your patch I get allways ls output correctly in pager
>>
>> "ls output" only? What about the ftrace outputs?
>>
>> >
>> >> >
>> >> > But sometime I dont even get ftrace output for:
>> >> >
>> >> > # ./perf --no-pager ftrace live ls
>> >> >
>> >> > just ls output
>> >
>> > this one still persists
>>
>> Hmm.. still hard to reproduce.. :(
>>
>> As it's --no-pager mode, so that it can be reproduced for you without
>> this patch, right?
>
> right, I still see the second issue (not getting ftrace output)
> regardless of the patch being applied or not
Did you get the same result always? What's the value of tracing_cpumask?
Could you please apply this debug patch below and run it again?
Thank you very much for your help!
Namhyung
diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
index f1ecfa207822..6b7aeae2dfa5 100644
--- a/tools/perf/builtin-ftrace.c
+++ b/tools/perf/builtin-ftrace.c
@@ -40,9 +40,11 @@ struct perf_ftrace {
};
static bool done;
+static int _signal;
static void sig_handler(int sig __maybe_unused)
{
+ _signal = sig;
done = true;
}
@@ -218,6 +220,20 @@ static int do_ftrace_live(struct perf_ftrace *ftrace)
perf_evlist__start_workload(ftrace->evlist);
+ BUG_ON(ftrace->evlist->threads->map[0] != ftrace->evlist->workload.pid);
+
+ trace_file = get_tracing_file("tracing_on");
+ if (trace_file) {
+ int fd = open(trace_file, O_RDONLY);
+
+ BUG_ON(fd < 0);
+ BUG_ON(read(fd, buf, sizeof(buf)) < 0);
+ BUG_ON(buf[0] != '1');
+
+ close(fd);
+ put_tracing_file(trace_file);
+ }
+
while (!done) {
if (poll(&pollfd, 1, -1) < 0)
break;
@@ -231,6 +247,7 @@ static int do_ftrace_live(struct perf_ftrace *ftrace)
}
}
+ psignal(_signal, "perf");
write_tracing_file("tracing_on", "0");
/* read remaining buffer contents */
next prev parent reply other threads:[~2013-05-08 5:49 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-23 8:30 [RFC 00/14] perf tools: Introduce new 'ftrace' command Namhyung Kim
2013-04-23 8:30 ` [PATCH 01/14] perf util: Move debugfs/tracing helper functions to util.c Namhyung Kim
2013-04-24 12:32 ` Jiri Olsa
2013-04-23 8:31 ` [PATCH 02/14] perf util: Use evsel->name to get tracepoint_paths Namhyung Kim
2013-04-23 13:07 ` Steven Rostedt
2013-04-24 10:36 ` Namhyung Kim
2013-04-24 12:42 ` Jiri Olsa
2013-04-25 5:58 ` Namhyung Kim
2013-04-23 8:31 ` [PATCH 03/14] perf util: Save pid-cmdline mapping into tracing header Namhyung Kim
2013-04-23 8:31 ` [PATCH 04/14] perf util: Add more debug message on failure path Namhyung Kim
2013-04-23 8:31 ` [PATCH 05/14] perf tools: Introduce new 'ftrace' tool Namhyung Kim
2013-04-24 14:09 ` Jiri Olsa
2013-04-25 6:06 ` Namhyung Kim
2013-04-25 9:09 ` Jiri Olsa
2013-04-25 9:51 ` Namhyung Kim
2013-04-25 13:05 ` Steven Rostedt
2013-04-25 14:49 ` Jiri Olsa
2013-04-26 13:34 ` David Ahern
2013-04-26 13:50 ` Steven Rostedt
2013-04-23 8:31 ` [PATCH 06/14] perf ftrace: Add support for --pid option Namhyung Kim
2013-04-23 8:31 ` [PATCH 07/14] perf ftrace: Add support for -a and -C option Namhyung Kim
2013-04-23 8:31 ` [PATCH 08/14] perf ftrace: Split "live" sub-command Namhyung Kim
2013-04-23 8:31 ` [PATCH 09/14] perf ftrace: Add 'record' sub-command Namhyung Kim
2013-04-24 14:12 ` Jiri Olsa
2013-04-25 6:24 ` Namhyung Kim
2013-04-26 8:35 ` Jiri Olsa
2013-04-26 13:44 ` David Ahern
2013-05-06 1:57 ` Namhyung Kim
2013-05-06 3:22 ` David Ahern
2013-05-06 1:44 ` Namhyung Kim
2013-05-06 12:04 ` Jiri Olsa
2013-05-08 5:27 ` Namhyung Kim
2013-04-23 8:31 ` [PATCH 10/14] perf ftrace: Add 'show' sub-command Namhyung Kim
2013-04-23 8:31 ` [PATCH 11/14] perf ftrace: Add 'report' sub-command Namhyung Kim
2013-04-23 8:31 ` [PATCH 12/14] perf ftrace: Use pager for displaying result Namhyung Kim
2013-04-24 14:17 ` Jiri Olsa
2013-04-25 6:50 ` Namhyung Kim
2013-04-26 8:40 ` Jiri Olsa
2013-05-06 1:52 ` Namhyung Kim
2013-05-06 11:38 ` Jiri Olsa
2013-05-08 5:49 ` Namhyung Kim [this message]
2013-05-10 9:04 ` Jiri Olsa
2013-05-13 8:53 ` Namhyung Kim
2013-05-13 13:42 ` Jiri Olsa
2013-05-14 0:58 ` Namhyung Kim
2013-04-23 8:31 ` [PATCH 13/14] perf ftrace: Cleanup using ftrace_setup/teardown() Namhyung Kim
2013-04-23 8:31 ` [PATCH 14/14] perf tools: Add document for perf-ftrace command Namhyung Kim
2013-04-23 15:53 ` Steven Rostedt
2013-04-24 10:39 ` Namhyung Kim
2013-04-23 15:58 ` [RFC 00/14] perf tools: Introduce new 'ftrace' command Steven Rostedt
2013-04-23 17:19 ` Pekka Enberg
2013-04-24 6:50 ` Ingo Molnar
2013-04-24 9:52 ` Namhyung Kim
2013-04-24 11:15 ` zhangwei(Jovi)
2013-04-25 5:53 ` Namhyung Kim
2013-04-24 9:29 ` Namhyung Kim
2013-04-24 9:27 ` Namhyung Kim
2013-04-24 11:14 ` zhangwei(Jovi)
2013-04-25 5:45 ` 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=871u9i81ih.fsf@sejong.aot.lge.com \
--to=namhyung@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=paulus@samba.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
Powered by JetHome