All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 001/001] perf: let trace write to stderr by default
@ 2015-08-04 16:39 Milian Wolff
       [not found] ` <CA+JHD92yJxikRUQ57Hb+C4pZ12gcFAn6paWenbAY5FbwtgQFDg@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Milian Wolff @ 2015-08-04 16:39 UTC (permalink / raw)
  To: linux-perf-users

[-- Attachment #1: Type: text/plain, Size: 262 bytes --]

See attached trivial patch which brings trace a bit closer to strace.

I've never published a patch to the Kernel yet, I hope it's OK as-is. I can 
amend it at will if you have any requests to the style.

Cheers
-- 
Milian Wolff
mail@milianw.de
http://milianw.de

[-- Attachment #2: 0001-Write-trace-output-to-stderr-by-default-just-like-st.patch --]
[-- Type: text/x-patch, Size: 1101 bytes --]

From 188476d65bab17ad99f5bdf65294160ef2d5f49b Mon Sep 17 00:00:00 2001
From: Milian Wolff <milian.wolff@kdab.com>
Date: Tue, 4 Aug 2015 18:30:52 +0200
Subject: [PATCH] perf: let trace write to stderr by default

Without this patch, it is cumbersome to read the trace output
but ignoring the normal, potentially verbose, output of the debuggee.
One common example is doing something like the following:

perf trace -s find /tmp > /dev/null

Without this patch, the trace summary will be lost. Now, it will
still be printed at the end. This behavior is also applied by strace.
---
 tools/perf/builtin-trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 39ad4d0..d183d88 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2778,7 +2778,7 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused)
 			.mmap_pages    = UINT_MAX,
 			.proc_map_timeout  = 500,
 		},
-		.output = stdout,
+		.output = stderr,
 		.show_comm = true,
 		.trace_syscalls = true,
 	};
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 001/001] perf: let trace write to stderr by default
       [not found] ` <CA+JHD92yJxikRUQ57Hb+C4pZ12gcFAn6paWenbAY5FbwtgQFDg@mail.gmail.com>
@ 2015-08-04 17:14   ` Milian Wolff
  2015-08-05 19:50     ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 4+ messages in thread
From: Milian Wolff @ 2015-08-04 17:14 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: linux-perf-users

On Tuesday 04 August 2015 13:50:14 Arnaldo Carvalho de Melo wrote:
> Le 4 août 2015 1:46 PM, "Milian Wolff" <mail@milianw.de> a écrit :
> > See attached trivial patch which brings trace a bit closer to strace.
> > 
> > I've never published a patch to the Kernel yet, I hope it's OK as-is. I
> 
> can
> 
> > amend it at will if you have any requests to the style
> 
> Start by not using attachments :-)

:)

From 188476d65bab17ad99f5bdf65294160ef2d5f49b Mon Sep 17 00:00:00 2001
From: Milian Wolff <milian.wolff@kdab.com>
Date: Tue, 4 Aug 2015 18:30:52 +0200
Subject: [PATCH] perf: let trace write to stderr by default

Without this patch, it is cumbersome to read the trace output
but ignoring the normal, potentially verbose, output of the debuggee.
One common example is doing something like the following:

perf trace -s find /tmp > /dev/null

Without this patch, the trace summary will be lost. Now, it will
still be printed at the end. This behavior is also applied by strace.
---
 tools/perf/builtin-trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 39ad4d0..d183d88 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2778,7 +2778,7 @@ int cmd_trace(int argc, const char **argv, const char 
*prefix __maybe_unused)
 			.mmap_pages    = UINT_MAX,
 			.proc_map_timeout  = 500,
 		},
-		.output = stdout,
+		.output = stderr,
 		.show_comm = true,
 		.trace_syscalls = true,
 	};
-- 
2.5.0

-- 
Milian Wolff
mail@milianw.de
http://milianw.de

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 001/001] perf: let trace write to stderr by default
  2015-08-04 17:14   ` Milian Wolff
@ 2015-08-05 19:50     ` Arnaldo Carvalho de Melo
  2015-08-05 19:52       ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-08-05 19:50 UTC (permalink / raw)
  To: Milian Wolff; +Cc: linux-perf-users

Em Tue, Aug 04, 2015 at 07:14:22PM +0200, Milian Wolff escreveu:
> On Tuesday 04 August 2015 13:50:14 Arnaldo Carvalho de Melo wrote:
> > Le 4 août 2015 1:46 PM, "Milian Wolff" <mail@milianw.de> a écrit :
> > > See attached trivial patch which brings trace a bit closer to strace.
> > > 
> > > I've never published a patch to the Kernel yet, I hope it's OK as-is. I
> > 
> > can
> > 
> > > amend it at will if you have any requests to the style
> > 
> > Start by not using attachments :-)
> 
> :)

Second step, read Documentation/email-clients.txt, you are using Kmail
and it is mangling the patches, I'll apply the patch by hand this time.

- Arnaldo
 
> >From 188476d65bab17ad99f5bdf65294160ef2d5f49b Mon Sep 17 00:00:00 2001
> From: Milian Wolff <milian.wolff@kdab.com>
> Date: Tue, 4 Aug 2015 18:30:52 +0200
> Subject: [PATCH] perf: let trace write to stderr by default
> 
> Without this patch, it is cumbersome to read the trace output
> but ignoring the normal, potentially verbose, output of the debuggee.
> One common example is doing something like the following:
> 
> perf trace -s find /tmp > /dev/null
> 
> Without this patch, the trace summary will be lost. Now, it will
> still be printed at the end. This behavior is also applied by strace.
> ---
>  tools/perf/builtin-trace.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
> index 39ad4d0..d183d88 100644
> --- a/tools/perf/builtin-trace.c
> +++ b/tools/perf/builtin-trace.c
> @@ -2778,7 +2778,7 @@ int cmd_trace(int argc, const char **argv, const char 
> *prefix __maybe_unused)
>  			.mmap_pages    = UINT_MAX,
>  			.proc_map_timeout  = 500,
>  		},
> -		.output = stdout,
> +		.output = stderr,
>  		.show_comm = true,
>  		.trace_syscalls = true,
>  	};
> -- 
> 2.5.0
> 
> -- 
> Milian Wolff
> mail@milianw.de
> http://milianw.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 001/001] perf: let trace write to stderr by default
  2015-08-05 19:50     ` Arnaldo Carvalho de Melo
@ 2015-08-05 19:52       ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-08-05 19:52 UTC (permalink / raw)
  To: Milian Wolff; +Cc: linux-perf-users

Em Wed, Aug 05, 2015 at 04:50:06PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Tue, Aug 04, 2015 at 07:14:22PM +0200, Milian Wolff escreveu:
> > On Tuesday 04 August 2015 13:50:14 Arnaldo Carvalho de Melo wrote:
> > > Le 4 août 2015 1:46 PM, "Milian Wolff" <mail@milianw.de> a écrit :
> > > > See attached trivial patch which brings trace a bit closer to strace.
> > > > 
> > > > I've never published a patch to the Kernel yet, I hope it's OK as-is. I
> > > 
> > > can
> > > 
> > > > amend it at will if you have any requests to the style
> > > 
> > > Start by not using attachments :-)
> > 
> > :)
> 
> Second step, read Documentation/email-clients.txt, you are using Kmail
> and it is mangling the patches, I'll apply the patch by hand this time.

And don't forget to read Documentation/SubmittingPatches, you forgot the
Signed-off-by part as well. It is simple stuff, so I'll not add it, keep
your authorship and sign it off myself.
 
> - Arnaldo
>  
> > >From 188476d65bab17ad99f5bdf65294160ef2d5f49b Mon Sep 17 00:00:00 2001
> > From: Milian Wolff <milian.wolff@kdab.com>
> > Date: Tue, 4 Aug 2015 18:30:52 +0200
> > Subject: [PATCH] perf: let trace write to stderr by default
> > 
> > Without this patch, it is cumbersome to read the trace output
> > but ignoring the normal, potentially verbose, output of the debuggee.
> > One common example is doing something like the following:
> > 
> > perf trace -s find /tmp > /dev/null
> > 
> > Without this patch, the trace summary will be lost. Now, it will
> > still be printed at the end. This behavior is also applied by strace.
> > ---
> >  tools/perf/builtin-trace.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
> > index 39ad4d0..d183d88 100644
> > --- a/tools/perf/builtin-trace.c
> > +++ b/tools/perf/builtin-trace.c
> > @@ -2778,7 +2778,7 @@ int cmd_trace(int argc, const char **argv, const char 
> > *prefix __maybe_unused)
> >  			.mmap_pages    = UINT_MAX,
> >  			.proc_map_timeout  = 500,
> >  		},
> > -		.output = stdout,
> > +		.output = stderr,
> >  		.show_comm = true,
> >  		.trace_syscalls = true,
> >  	};
> > -- 
> > 2.5.0
> > 
> > -- 
> > Milian Wolff
> > mail@milianw.de
> > http://milianw.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-05 19:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-04 16:39 [PATCH 001/001] perf: let trace write to stderr by default Milian Wolff
     [not found] ` <CA+JHD92yJxikRUQ57Hb+C4pZ12gcFAn6paWenbAY5FbwtgQFDg@mail.gmail.com>
2015-08-04 17:14   ` Milian Wolff
2015-08-05 19:50     ` Arnaldo Carvalho de Melo
2015-08-05 19:52       ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.