Skip to contentSkip to conversation

perf, record: Ammend option summaries

PATCH In review Peter Zijlstra 3 participants 5 messages Jun 10, 2015 – Jun 12, 2015 perf events

lore
Share & tools
lore

Peter Zijlstra

author maintainer
#0 lore raw

PATCH 1/1 perf, record: Ammend 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.

---
 tools/perf/builtin-record.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
tools/perf/builtin-record.c +3 -4
index d3731cc..4d6cdeb 100644
@@ -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,
#1 lore raw

Em Wed, Jun 10, 2015 at 04:48:50PM +0200, Peter Zijlstra escreveu:

Quoted 8 lines

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

Quoted 23 lines
---
 tools/perf/builtin-record.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
tools/perf/builtin-record.c +3 -4
index d3731cc..4d6cdeb 100644
@@ -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,
author maintainer
#2 lore raw
Quoted 5 lines · Arnaldo Carvalho de Melo

Em Wed, Jun 10, 2015 at 04:48:50PM +0200, Peter Zijlstra escreveu:

Quoted 4 lines

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

Quoted 7 lines
Quoted 4 lines

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?

#3 lore raw

Em Thu, Jun 11, 2015 at 10:46:19AM +0200, Peter Zijlstra escreveu:

Quoted 10 lines · Arnaldo Carvalho de Melo
Quoted 8 lines

Em Wed, Jun 10, 2015 at 04:48:50PM +0200, Peter Zijlstra escreveu:

Quoted 7 lines

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.

Quoted 7 lines
Quoted 2 lines

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

#4 lore raw

[tip:perf/core] perf record: Amend option summaries

In reply to Peter Zijlstra
perf record: Amend option summaries
Commit-ID:  5610032135c05e7bf9cba231826577a01719d010
Gitweb:     http://git.kernel.org/tip/5610032135c05e7bf9cba231826577a01719d010
Author:     Peter Zijlstra <[email protected]>
AuthorDate: Wed, 10 Jun 2015 16:48:50 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
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.

---
 tools/perf/Documentation/perf-record.txt | 10 +++++++---
 tools/perf/builtin-record.c              |  7 +++----
 2 files changed, 10 insertions(+), 7 deletions(-)
tools/perf/Documentation/perf-record.txt +7 -3
index 280533e..6fdf786 100644
@@ -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::
tools/perf/builtin-record.c +3 -4
index d3731cc..4d6cdeb 100644
@@ -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,