LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf, record: Ammend option summaries
@ 2015-06-10 14:48 Peter Zijlstra
  2015-06-10 17:27 ` Arnaldo Carvalho de Melo
  2015-06-12  8:49 ` [tip:perf/core] perf record: Amend " tip-bot for Peter Zijlstra
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Zijlstra @ 2015-06-10 14:48 UTC (permalink / raw
  To: Arnaldo Carvalho de Melo; +Cc: linux-kernel, Ingo Molnar


Because there's too many options and I cannot read, I frequently get
confused between -c and -P, and try to do things like:

  perf record -P 50000 -- foo

Which does not work; try and make the option description slightly longer
and hopefully less confusing.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
 tools/perf/builtin-record.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index d3731cc..4d6cdeb 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1027,10 +1027,9 @@ struct option __record_options[] = {
 	OPT_BOOLEAN('q', "quiet", &quiet, "don't print any message"),
 	OPT_BOOLEAN('s', "stat", &record.opts.inherit_stat,
 		    "per thread counts"),
-	OPT_BOOLEAN('d', "data", &record.opts.sample_address,
-		    "Sample addresses"),
-	OPT_BOOLEAN('T', "timestamp", &record.opts.sample_time, "Sample timestamps"),
-	OPT_BOOLEAN('P', "period", &record.opts.period, "Sample period"),
+	OPT_BOOLEAN('d', "data", &record.opts.sample_address, "Record the sample addresses"),
+	OPT_BOOLEAN('T', "timestamp", &record.opts.sample_time, "Record the sample timestamps"),
+	OPT_BOOLEAN('P', "period", &record.opts.period, "Record the sample period"),
 	OPT_BOOLEAN('n', "no-samples", &record.opts.no_samples,
 		    "don't sample"),
 	OPT_BOOLEAN('N', "no-buildid-cache", &record.no_buildid_cache,

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

* Re: [PATCH] perf, record: Ammend option summaries
  2015-06-10 14:48 [PATCH] perf, record: Ammend option summaries Peter Zijlstra
@ 2015-06-10 17:27 ` Arnaldo Carvalho de Melo
  2015-06-11  8:46   ` Peter Zijlstra
  2015-06-12  8:49 ` [tip:perf/core] perf record: Amend " tip-bot for Peter Zijlstra
  1 sibling, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-06-10 17:27 UTC (permalink / raw
  To: Peter Zijlstra; +Cc: linux-kernel, Ingo Molnar

Em Wed, Jun 10, 2015 at 04:48:50PM +0200, Peter Zijlstra escreveu:
> 
> Because there's too many options and I cannot read, I frequently get
> confused between -c and -P, and try to do things like:
> 
>   perf record -P 50000 -- foo
> 
> Which does not work; try and make the option description slightly longer
> and hopefully less confusing.

Thanks, I'll check and update tools/perf/Documentation/perf-record.txt,
i.e. the man page.

- Arnaldo
 
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
>  tools/perf/builtin-record.c |    7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index d3731cc..4d6cdeb 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -1027,10 +1027,9 @@ struct option __record_options[] = {
>  	OPT_BOOLEAN('q', "quiet", &quiet, "don't print any message"),
>  	OPT_BOOLEAN('s', "stat", &record.opts.inherit_stat,
>  		    "per thread counts"),
> -	OPT_BOOLEAN('d', "data", &record.opts.sample_address,
> -		    "Sample addresses"),
> -	OPT_BOOLEAN('T', "timestamp", &record.opts.sample_time, "Sample timestamps"),
> -	OPT_BOOLEAN('P', "period", &record.opts.period, "Sample period"),
> +	OPT_BOOLEAN('d', "data", &record.opts.sample_address, "Record the sample addresses"),
> +	OPT_BOOLEAN('T', "timestamp", &record.opts.sample_time, "Record the sample timestamps"),
> +	OPT_BOOLEAN('P', "period", &record.opts.period, "Record the sample period"),
>  	OPT_BOOLEAN('n', "no-samples", &record.opts.no_samples,
>  		    "don't sample"),
>  	OPT_BOOLEAN('N', "no-buildid-cache", &record.no_buildid_cache,

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

* Re: [PATCH] perf, record: Ammend option summaries
  2015-06-10 17:27 ` Arnaldo Carvalho de Melo
@ 2015-06-11  8:46   ` Peter Zijlstra
  2015-06-11 13:58     ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Zijlstra @ 2015-06-11  8:46 UTC (permalink / raw
  To: Arnaldo Carvalho de Melo; +Cc: linux-kernel, Ingo Molnar

On Wed, Jun 10, 2015 at 02:27:43PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Wed, Jun 10, 2015 at 04:48:50PM +0200, Peter Zijlstra escreveu:
> > 
> > Because there's too many options and I cannot read, I frequently get
> > confused between -c and -P, and try to do things like:
> > 
> >   perf record -P 50000 -- foo
> > 
> > Which does not work; try and make the option description slightly longer
> > and hopefully less confusing.
> 
> Thanks, I'll check and update tools/perf/Documentation/perf-record.txt,
> i.e. the man page.

Thanks, I always forget that stuff even exists. I further get totally
annoyed every time I do: perf record --help and it vomits on me.

Could we please make -h and --help do the exact same thing?

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

* Re: [PATCH] perf, record: Ammend option summaries
  2015-06-11  8:46   ` Peter Zijlstra
@ 2015-06-11 13:58     ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-06-11 13:58 UTC (permalink / raw
  To: Peter Zijlstra; +Cc: linux-kernel, Ingo Molnar

Em Thu, Jun 11, 2015 at 10:46:19AM +0200, Peter Zijlstra escreveu:
> On Wed, Jun 10, 2015 at 02:27:43PM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Wed, Jun 10, 2015 at 04:48:50PM +0200, Peter Zijlstra escreveu:
> > > Because there's too many options and I cannot read, I frequently get
> > > confused between -c and -P, and try to do things like:

> > >   perf record -P 50000 -- foo

> > > Which does not work; try and make the option description slightly longer
> > > and hopefully less confusing.

> > Thanks, I'll check and update tools/perf/Documentation/perf-record.txt,
> > i.e. the man page.

> Thanks, I always forget that stuff even exists. I further get totally
> annoyed every time I do: perf record --help and it vomits on me.

> Could we please make -h and --help do the exact same thing?

Well, right now it tries to read the man-page, that if not installed,
will bail out straight away, I guess this is something we inherited from
the git code base, long ago.

Ok, I think I'll try to use both, i.e. make 'perf foo --help' fall back
to '-h' when the man page is not found, with an extra warning, at the
top, when doing that.

- Arnaldo

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

* [tip:perf/core] perf record: Amend option summaries
  2015-06-10 14:48 [PATCH] perf, record: Ammend option summaries Peter Zijlstra
  2015-06-10 17:27 ` Arnaldo Carvalho de Melo
@ 2015-06-12  8:49 ` tip-bot for Peter Zijlstra
  1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for Peter Zijlstra @ 2015-06-12  8:49 UTC (permalink / raw
  To: linux-tip-commits; +Cc: acme, tglx, peterz, hpa, linux-kernel, mingo

Commit-ID:  5610032135c05e7bf9cba231826577a01719d010
Gitweb:     http://git.kernel.org/tip/5610032135c05e7bf9cba231826577a01719d010
Author:     Peter Zijlstra <peterz@infradead.org>
AuthorDate: Wed, 10 Jun 2015 16:48:50 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 10 Jun 2015 12:00:27 -0300

perf record: Amend option summaries

Because there's too many options and I cannot read, I frequently get
confused between -c and -P, and try to do things like:

  perf record -P 50000 -- foo

Which does not work; try and make the option description slightly longer
and hopefully less confusing.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20150610144850.GP19282@twins.programming.kicks-ass.net
[ Do those changes on the man page as well ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-record.txt | 10 +++++++---
 tools/perf/builtin-record.c              |  7 +++----
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index 280533e..6fdf786 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -152,12 +152,16 @@ OPTIONS
 
 -d::
 --data::
-	Sample addresses.
+	Record the sample addresses.
 
 -T::
 --timestamp::
-	Sample timestamps. Use it with 'perf report -D' to see the timestamps,
-	for instance.
+	Record the sample timestamps. Use it with 'perf report -D' to see the
+	timestamps, for instance.
+
+-P::
+--period::
+	Record the sample period.
 
 -n::
 --no-samples::
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index d3731cc..4d6cdeb 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1027,10 +1027,9 @@ struct option __record_options[] = {
 	OPT_BOOLEAN('q', "quiet", &quiet, "don't print any message"),
 	OPT_BOOLEAN('s', "stat", &record.opts.inherit_stat,
 		    "per thread counts"),
-	OPT_BOOLEAN('d', "data", &record.opts.sample_address,
-		    "Sample addresses"),
-	OPT_BOOLEAN('T', "timestamp", &record.opts.sample_time, "Sample timestamps"),
-	OPT_BOOLEAN('P', "period", &record.opts.period, "Sample period"),
+	OPT_BOOLEAN('d', "data", &record.opts.sample_address, "Record the sample addresses"),
+	OPT_BOOLEAN('T', "timestamp", &record.opts.sample_time, "Record the sample timestamps"),
+	OPT_BOOLEAN('P', "period", &record.opts.period, "Record the sample period"),
 	OPT_BOOLEAN('n', "no-samples", &record.opts.no_samples,
 		    "don't sample"),
 	OPT_BOOLEAN('N', "no-buildid-cache", &record.no_buildid_cache,

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

end of thread, other threads:[~2015-06-12  8:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-10 14:48 [PATCH] perf, record: Ammend option summaries Peter Zijlstra
2015-06-10 17:27 ` Arnaldo Carvalho de Melo
2015-06-11  8:46   ` Peter Zijlstra
2015-06-11 13:58     ` Arnaldo Carvalho de Melo
2015-06-12  8:49 ` [tip:perf/core] perf record: Amend " tip-bot for Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).