From: Robert Richter <robert.richter@amd.com>
To: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Tom Zanussi <tzanussi@gmail.com>, Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>,
Stephane Eranian <eranian@google.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 06/10] perf report: Setup browser if stdout is a pipe
Date: Tue, 6 Dec 2011 18:15:21 +0100 [thread overview]
Message-ID: <20111206171521.GM15738@erda.amd.com> (raw)
In-Reply-To: <20111206132910.GG7059@infradead.org>
On 06.12.11 11:29:10, Arnaldo Carvalho de Melo wrote:
> commit 46656ac7fb3252f8a3db29b18638e0e8067849ba
> Author: Tom Zanussi <tzanussi@gmail.com>
> Date: Thu Apr 1 23:59:17 2010 -0500
>
> perf report: Introduce special handling for pipe input
>
> Adds special treatment for stdin - if the user specifies '-i -'
> to perf report, the intent is that the event stream be written
> to stdin rather than from a disk file.
>
> The actual handling of the '-' filename is done by the session;
> this just adds a signal handler to stop reporting, and turns off
> interference by the pager.
>
> Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
> Acked-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: fweisbec@gmail.com
> Cc: rostedt@goodmis.org
> Cc: k-keiichi@bx.jp.nec.com
> Cc: acme@ghostprotocols.net
> LKML-Reference: <1270184365-8281-4-git-send-email-tzanussi@gmail.com>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
>
>
> I can't understand the comment either, as I think it should've read "the
> intent is that the event stream be _read from stdin_ rather than from a
> disk file."
>
> And I don't know what would be the pager interference there.
>
> Tom, could you elaborate on this?
This patch is part of a patch set introducing "live mode". I guess the
intention here is to disable the pager for continuously writing to the
terminal and stopping perf with ^C, e.g. (notice the ^C):
# perf record -e <...> -a | perf report
# perf record -a -e cpu-cycles | perf report -i -
# ========
# captured on: Tue Dec 6 18:09:07 2011
# ========
#
^C# Events: 9 cycles
#
# Overhead Command Shared Object Symbol
[ perf record: Woken up 1 times to write data ]
# ........ ....... ................. ..............................
#
[ perf record: Captured and wrote 0.106 MB (null) (~4627 samples) ]
[...]
A pager would catch the ^C, also an appended pipe. So, my version also
does not work for this case, suggest to skip this patch first in favor
of a better solution.
But will have to rework the next patch because a potential null
pointer access to input_name.
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
next prev parent reply other threads:[~2011-12-06 17:19 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-06 10:32 [PATCH 00/10] perf tools: cleanups, fixes, updates Robert Richter
2011-12-06 10:32 ` [PATCH 01/10] perf script: Fix mem leaks and NULL pointer checks around strdup()s Robert Richter
2011-12-06 10:32 ` [PATCH 02/10] perf script: Implement option for system-wide profiling Robert Richter
2011-12-06 10:32 ` [PATCH 03/10] perf tools: Continue processing header on unknown features Robert Richter
2011-12-06 13:29 ` Arnaldo Carvalho de Melo
2011-12-06 10:32 ` [PATCH 04/10] perf tools: Fix out-of-bound access to struct perf_session Robert Richter
2011-12-06 13:20 ` Arnaldo Carvalho de Melo
2011-12-06 10:32 ` [PATCH 05/10] perf tool: Moving code in some files Robert Richter
2011-12-06 10:32 ` [PATCH 06/10] perf report: Setup browser if stdout is a pipe Robert Richter
2011-12-06 13:29 ` Arnaldo Carvalho de Melo
2011-12-06 15:04 ` Tom Zanussi
2011-12-06 17:15 ` Robert Richter [this message]
2011-12-06 10:32 ` [PATCH 07/10] perf report: Accept fifos as input file Robert Richter
2011-12-06 13:22 ` Arnaldo Carvalho de Melo
2011-12-06 10:32 ` [PATCH 08/10] perf tool: Unify handling of features when writing feature section Robert Richter
2011-12-06 13:36 ` Arnaldo Carvalho de Melo
2011-12-06 16:33 ` Robert Richter
2011-12-07 14:14 ` Arnaldo Carvalho de Melo
2011-12-07 14:35 ` Robert Richter
2011-12-06 10:32 ` [PATCH 09/10] perf tools: Improve macros for struct feature_ops Robert Richter
2011-12-06 13:23 ` Arnaldo Carvalho de Melo
2011-12-06 10:32 ` [PATCH 10/10] perf tools: Use for_each_set_bit() to iterate over feature flags Robert Richter
2011-12-06 13:40 ` Arnaldo Carvalho de Melo
2011-12-07 8:30 ` Robert Richter
2011-12-06 11:04 ` [PATCH 00/10] perf tools: cleanups, fixes, updates Robert Richter
2011-12-06 13:16 ` Arnaldo Carvalho de Melo
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=20111206171521.GM15738@erda.amd.com \
--to=robert.richter@amd.com \
--cc=acme@infradead.org \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=tzanussi@gmail.com \
/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