All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf trace: Make command line arguments consistent with perf-record
@ 2013-08-19 17:04 David Ahern
  2013-08-19 19:06 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 9+ messages in thread
From: David Ahern @ 2013-08-19 17:04 UTC (permalink / raw)
  To: acme, linux-kernel; +Cc: David Ahern

Common arguments like thread id, CPU list, mmap pages, etc should be
consistent across perf commands.

Signed-off-by: David Ahern <dsahern@gmail.com>
---
 tools/perf/builtin-trace.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index da7ae01..55f1287 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -637,17 +637,17 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused)
 	const struct option trace_options[] = {
 	OPT_STRING('p', "pid", &trace.opts.target.pid, "pid",
 		    "trace events on existing process id"),
-	OPT_STRING(0, "tid", &trace.opts.target.tid, "tid",
+	OPT_STRING('t', "tid", &trace.opts.target.tid, "tid",
 		    "trace events on existing thread id"),
-	OPT_BOOLEAN(0, "all-cpus", &trace.opts.target.system_wide,
+	OPT_BOOLEAN('a', "all-cpus", &trace.opts.target.system_wide,
 		    "system-wide collection from all CPUs"),
-	OPT_STRING(0, "cpu", &trace.opts.target.cpu_list, "cpu",
+	OPT_STRING('C', "cpu", &trace.opts.target.cpu_list, "cpu",
 		    "list of cpus to monitor"),
-	OPT_BOOLEAN(0, "no-inherit", &trace.opts.no_inherit,
+	OPT_BOOLEAN('i', "no-inherit", &trace.opts.no_inherit,
 		    "child tasks do not inherit counters"),
-	OPT_UINTEGER(0, "mmap-pages", &trace.opts.mmap_pages,
+	OPT_UINTEGER('m', "mmap-pages", &trace.opts.mmap_pages,
 		     "number of mmap data pages"),
-	OPT_STRING(0, "uid", &trace.opts.target.uid_str, "user",
+	OPT_STRING('u', "uid", &trace.opts.target.uid_str, "user",
 		   "user to profile"),
 	OPT_CALLBACK(0, "duration", &trace, "float",
 		     "show only events with duration > N.M ms",
-- 
1.7.10.1


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

* Re: [PATCH] perf trace: Make command line arguments consistent with perf-record
  2013-08-19 17:04 David Ahern
@ 2013-08-19 19:06 ` Arnaldo Carvalho de Melo
  2013-08-20 14:19   ` David Ahern
  0 siblings, 1 reply; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-08-19 19:06 UTC (permalink / raw)
  To: David Ahern; +Cc: linux-kernel

Em Mon, Aug 19, 2013 at 11:04:30AM -0600, David Ahern escreveu:
> Common arguments like thread id, CPU list, mmap pages, etc should be
> consistent across perf commands.

Ok, at some point I'll add a 'perf strace' alias that will resume trying
to map the 'strace' single letter options.

Can you check if this clashes with the -o patch I added today?

- Arnaldo
 
> Signed-off-by: David Ahern <dsahern@gmail.com>
> ---
>  tools/perf/builtin-trace.c |   12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
> index da7ae01..55f1287 100644
> --- a/tools/perf/builtin-trace.c
> +++ b/tools/perf/builtin-trace.c
> @@ -637,17 +637,17 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused)
>  	const struct option trace_options[] = {
>  	OPT_STRING('p', "pid", &trace.opts.target.pid, "pid",
>  		    "trace events on existing process id"),
> -	OPT_STRING(0, "tid", &trace.opts.target.tid, "tid",
> +	OPT_STRING('t', "tid", &trace.opts.target.tid, "tid",
>  		    "trace events on existing thread id"),
> -	OPT_BOOLEAN(0, "all-cpus", &trace.opts.target.system_wide,
> +	OPT_BOOLEAN('a', "all-cpus", &trace.opts.target.system_wide,
>  		    "system-wide collection from all CPUs"),
> -	OPT_STRING(0, "cpu", &trace.opts.target.cpu_list, "cpu",
> +	OPT_STRING('C', "cpu", &trace.opts.target.cpu_list, "cpu",
>  		    "list of cpus to monitor"),
> -	OPT_BOOLEAN(0, "no-inherit", &trace.opts.no_inherit,
> +	OPT_BOOLEAN('i', "no-inherit", &trace.opts.no_inherit,
>  		    "child tasks do not inherit counters"),
> -	OPT_UINTEGER(0, "mmap-pages", &trace.opts.mmap_pages,
> +	OPT_UINTEGER('m', "mmap-pages", &trace.opts.mmap_pages,
>  		     "number of mmap data pages"),
> -	OPT_STRING(0, "uid", &trace.opts.target.uid_str, "user",
> +	OPT_STRING('u', "uid", &trace.opts.target.uid_str, "user",
>  		   "user to profile"),
>  	OPT_CALLBACK(0, "duration", &trace, "float",
>  		     "show only events with duration > N.M ms",
> -- 
> 1.7.10.1

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

* Re: [PATCH] perf trace: Make command line arguments consistent with perf-record
  2013-08-19 19:06 ` Arnaldo Carvalho de Melo
@ 2013-08-20 14:19   ` David Ahern
  2013-08-20 14:43     ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 9+ messages in thread
From: David Ahern @ 2013-08-20 14:19 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: linux-kernel

On 8/19/13 1:06 PM, Arnaldo Carvalho de Melo wrote:
> Em Mon, Aug 19, 2013 at 11:04:30AM -0600, David Ahern escreveu:
>> Common arguments like thread id, CPU list, mmap pages, etc should be
>> consistent across perf commands.
>
> Ok, at some point I'll add a 'perf strace' alias that will resume trying
> to map the 'strace' single letter options.
>
> Can you check if this clashes with the -o patch I added today?

I just did remote update again and I do not see a -o patch in any of the 
branches.

David

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

* Re: [PATCH] perf trace: Make command line arguments consistent with perf-record
  2013-08-20 14:19   ` David Ahern
@ 2013-08-20 14:43     ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-08-20 14:43 UTC (permalink / raw)
  To: David Ahern; +Cc: linux-kernel

Em Tue, Aug 20, 2013 at 08:19:30AM -0600, David Ahern escreveu:
> On 8/19/13 1:06 PM, Arnaldo Carvalho de Melo wrote:
> >Em Mon, Aug 19, 2013 at 11:04:30AM -0600, David Ahern escreveu:
> >>Common arguments like thread id, CPU list, mmap pages, etc should be
> >>consistent across perf commands.

> >Ok, at some point I'll add a 'perf strace' alias that will resume trying
> >to map the 'strace' single letter options.

> >Can you check if this clashes with the -o patch I added today?

> I just did remote update again and I do not see a -o patch in any of
> the branches.

Sorry, I thought I pushed it, did it now.

- Arnaldo

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

* [PATCH] perf trace: Make command line arguments consistent with perf-record
@ 2013-08-20 14:47 David Ahern
  2013-08-20 14:51 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 9+ messages in thread
From: David Ahern @ 2013-08-20 14:47 UTC (permalink / raw)
  To: acme, linux-kernel; +Cc: David Ahern

Common arguments like thread id, CPU list, mmap pages, etc should be
consistent across perf commands.

Signed-off-by: David Ahern <dsahern@gmail.com>
---
 tools/perf/builtin-trace.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 4235316..9891d8c 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -693,17 +693,17 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused)
 	OPT_STRING('o', "output", &output_name, "file", "output file name"),
 	OPT_STRING('p', "pid", &trace.opts.target.pid, "pid",
 		    "trace events on existing process id"),
-	OPT_STRING(0, "tid", &trace.opts.target.tid, "tid",
+	OPT_STRING('t', "tid", &trace.opts.target.tid, "tid",
 		    "trace events on existing thread id"),
-	OPT_BOOLEAN(0, "all-cpus", &trace.opts.target.system_wide,
+	OPT_BOOLEAN('a', "all-cpus", &trace.opts.target.system_wide,
 		    "system-wide collection from all CPUs"),
-	OPT_STRING(0, "cpu", &trace.opts.target.cpu_list, "cpu",
+	OPT_STRING('C', "cpu", &trace.opts.target.cpu_list, "cpu",
 		    "list of cpus to monitor"),
-	OPT_BOOLEAN(0, "no-inherit", &trace.opts.no_inherit,
+	OPT_BOOLEAN('i', "no-inherit", &trace.opts.no_inherit,
 		    "child tasks do not inherit counters"),
-	OPT_UINTEGER(0, "mmap-pages", &trace.opts.mmap_pages,
+	OPT_UINTEGER('m', "mmap-pages", &trace.opts.mmap_pages,
 		     "number of mmap data pages"),
-	OPT_STRING(0, "uid", &trace.opts.target.uid_str, "user",
+	OPT_STRING('u', "uid", &trace.opts.target.uid_str, "user",
 		   "user to profile"),
 	OPT_CALLBACK(0, "duration", &trace, "float",
 		     "show only events with duration > N.M ms",
-- 
1.7.10.1


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

* Re: [PATCH] perf trace: Make command line arguments consistent with perf-record
  2013-08-20 14:47 [PATCH] perf trace: Make command line arguments consistent with perf-record David Ahern
@ 2013-08-20 14:51 ` Arnaldo Carvalho de Melo
  2013-08-20 16:22   ` David Ahern
  0 siblings, 1 reply; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-08-20 14:51 UTC (permalink / raw)
  To: David Ahern; +Cc: linux-kernel

Em Tue, Aug 20, 2013 at 08:47:56AM -0600, David Ahern escreveu:
> Common arguments like thread id, CPU list, mmap pages, etc should be
> consistent across perf commands.
 


> Signed-off-by: David Ahern <dsahern@gmail.com>
> ---
>  tools/perf/builtin-trace.c |   12 ++++++------

 tools/perf/Documentation/perf-trace.txt part missing :-)

>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
> index 4235316..9891d8c 100644
> --- a/tools/perf/builtin-trace.c
> +++ b/tools/perf/builtin-trace.c
> @@ -693,17 +693,17 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused)
>  	OPT_STRING('o', "output", &output_name, "file", "output file name"),
>  	OPT_STRING('p', "pid", &trace.opts.target.pid, "pid",
>  		    "trace events on existing process id"),
> -	OPT_STRING(0, "tid", &trace.opts.target.tid, "tid",
> +	OPT_STRING('t', "tid", &trace.opts.target.tid, "tid",
>  		    "trace events on existing thread id"),
> -	OPT_BOOLEAN(0, "all-cpus", &trace.opts.target.system_wide,
> +	OPT_BOOLEAN('a', "all-cpus", &trace.opts.target.system_wide,
>  		    "system-wide collection from all CPUs"),
> -	OPT_STRING(0, "cpu", &trace.opts.target.cpu_list, "cpu",
> +	OPT_STRING('C', "cpu", &trace.opts.target.cpu_list, "cpu",
>  		    "list of cpus to monitor"),
> -	OPT_BOOLEAN(0, "no-inherit", &trace.opts.no_inherit,
> +	OPT_BOOLEAN('i', "no-inherit", &trace.opts.no_inherit,
>  		    "child tasks do not inherit counters"),
> -	OPT_UINTEGER(0, "mmap-pages", &trace.opts.mmap_pages,
> +	OPT_UINTEGER('m', "mmap-pages", &trace.opts.mmap_pages,
>  		     "number of mmap data pages"),
> -	OPT_STRING(0, "uid", &trace.opts.target.uid_str, "user",
> +	OPT_STRING('u', "uid", &trace.opts.target.uid_str, "user",
>  		   "user to profile"),
>  	OPT_CALLBACK(0, "duration", &trace, "float",
>  		     "show only events with duration > N.M ms",
> -- 
> 1.7.10.1

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

* Re: [PATCH] perf trace: Make command line arguments consistent with perf-record
  2013-08-20 14:51 ` Arnaldo Carvalho de Melo
@ 2013-08-20 16:22   ` David Ahern
  2013-08-20 17:11     ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 9+ messages in thread
From: David Ahern @ 2013-08-20 16:22 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: linux-kernel

On 8/20/13 8:51 AM, Arnaldo Carvalho de Melo wrote:
> Em Tue, Aug 20, 2013 at 08:47:56AM -0600, David Ahern escreveu:
>> Common arguments like thread id, CPU list, mmap pages, etc should be
>> consistent across perf commands.
>
>
>
>> Signed-off-by: David Ahern <dsahern@gmail.com>
>> ---
>>   tools/perf/builtin-trace.c |   12 ++++++------
>
>   tools/perf/Documentation/perf-trace.txt part missing :-)


grrrr... Added a check in the git pre-commit hook to remind me:

$ git commit -a
changing command line arguments. Did you update the man page?

Will resend later today.
David

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

* Re: [PATCH] perf trace: Make command line arguments consistent with perf-record
  2013-08-20 16:22   ` David Ahern
@ 2013-08-20 17:11     ` Arnaldo Carvalho de Melo
  2013-08-20 17:19       ` David Ahern
  0 siblings, 1 reply; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-08-20 17:11 UTC (permalink / raw)
  To: David Ahern; +Cc: linux-kernel

Em Tue, Aug 20, 2013 at 10:22:54AM -0600, David Ahern escreveu:
> On 8/20/13 8:51 AM, Arnaldo Carvalho de Melo wrote:
> >Em Tue, Aug 20, 2013 at 08:47:56AM -0600, David Ahern escreveu:
> >>Common arguments like thread id, CPU list, mmap pages, etc should be
> >>consistent across perf commands.

> >>Signed-off-by: David Ahern <dsahern@gmail.com>
> >>  tools/perf/builtin-trace.c |   12 ++++++------

> >  tools/perf/Documentation/perf-trace.txt part missing :-)

> grrrr... Added a check in the git pre-commit hook to remind me:
> 
> $ git commit -a
> changing command line arguments. Did you update the man page?

Hey, post it somewhere, please! I'd like to use it too. :-)
 
> Will resend later today.
> David

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

* Re: [PATCH] perf trace: Make command line arguments consistent with perf-record
  2013-08-20 17:11     ` Arnaldo Carvalho de Melo
@ 2013-08-20 17:19       ` David Ahern
  0 siblings, 0 replies; 9+ messages in thread
From: David Ahern @ 2013-08-20 17:19 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: linux-kernel

On 8/20/13 11:11 AM, Arnaldo Carvalho de Melo wrote:
>> grrrr... Added a check in the git pre-commit hook to remind me:
>>
>> $ git commit -a
>> changing command line arguments. Did you update the man page?
>
> Hey, post it somewhere, please! I'd like to use it too. :-)

$ cat .git/hooks/pre-commit
#!/bin/bash

git diff --cached | egrep -q 'OPT_'
if [ $? -eq 0 ]
then
	git diff --cached | egrep -q '^diff.*tools/perf/Documentation'
	if [ $? -ne 0 ]
	then
		echo "changing command line arguments. Did you update the man page?"
		exit 1
	fi
fi
exec git diff --cached | scripts/checkpatch.pl --no-signoff -q -

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

end of thread, other threads:[~2013-08-20 17:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-20 14:47 [PATCH] perf trace: Make command line arguments consistent with perf-record David Ahern
2013-08-20 14:51 ` Arnaldo Carvalho de Melo
2013-08-20 16:22   ` David Ahern
2013-08-20 17:11     ` Arnaldo Carvalho de Melo
2013-08-20 17:19       ` David Ahern
  -- strict thread matches above, loose matches on Subject: below --
2013-08-19 17:04 David Ahern
2013-08-19 19:06 ` Arnaldo Carvalho de Melo
2013-08-20 14:19   ` David Ahern
2013-08-20 14:43     ` 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.