linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf tools: Fixup for removing -f option in perf record
@ 2013-06-27  4:25 Namhyung Kim
  2013-06-27  9:36 ` Peter Zijlstra
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Namhyung Kim @ 2013-06-27  4:25 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, Namhyung Kim, LKML,
	Jiri Olsa

From: Namhyung Kim <namhyung.kim@lge.com>

The commit bf3da4014a0c ("perf record: Remove -f/--force option") got
rid of -f option from perf record.  But this option was used
internally by various sub-commands so they wouldn't work anymore.
Also update the example document not to use -f option.

Cc: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/Documentation/examples.txt | 4 ++--
 tools/perf/builtin-kmem.c             | 2 +-
 tools/perf/builtin-lock.c             | 2 +-
 tools/perf/builtin-sched.c            | 1 -
 tools/perf/builtin-timechart.c        | 4 ++--
 5 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/tools/perf/Documentation/examples.txt b/tools/perf/Documentation/examples.txt
index 77f952762426..a4e392156488 100644
--- a/tools/perf/Documentation/examples.txt
+++ b/tools/perf/Documentation/examples.txt
@@ -66,7 +66,7 @@ Furthermore, these tracepoints can be used to sample the workload as
 well. For example the page allocations done by a 'git gc' can be
 captured the following way:
 
- titan:~/git> perf record -f -e kmem:mm_page_alloc -c 1 ./git gc
+ titan:~/git> perf record -e kmem:mm_page_alloc -c 1 ./git gc
  Counting objects: 1148, done.
  Delta compression using up to 2 threads.
  Compressing objects: 100% (450/450), done.
@@ -120,7 +120,7 @@ Furthermore, call-graph sampling can be done too, of page
 allocations - to see precisely what kind of page allocations there
 are:
 
- titan:~/git> perf record -f -g -e kmem:mm_page_alloc -c 1 ./git gc
+ titan:~/git> perf record -g -e kmem:mm_page_alloc -c 1 ./git gc
  Counting objects: 1148, done.
  Delta compression using up to 2 threads.
  Compressing objects: 100% (450/450), done.
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 46878daca5cc..0259502638b4 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -708,7 +708,7 @@ static int parse_line_opt(const struct option *opt __maybe_unused,
 static int __cmd_record(int argc, const char **argv)
 {
 	const char * const record_args[] = {
-	"record", "-a", "-R", "-f", "-c", "1",
+	"record", "-a", "-R", "-c", "1",
 	"-e", "kmem:kmalloc",
 	"-e", "kmem:kmalloc_node",
 	"-e", "kmem:kfree",
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
index 425830069749..76543a4a7a30 100644
--- a/tools/perf/builtin-lock.c
+++ b/tools/perf/builtin-lock.c
@@ -878,7 +878,7 @@ static int __cmd_report(void)
 static int __cmd_record(int argc, const char **argv)
 {
 	const char *record_args[] = {
-		"record", "-R", "-f", "-m", "1024", "-c", "1",
+		"record", "-R", "-m", "1024", "-c", "1",
 	};
 	unsigned int rec_argc, i, j;
 	const char **rec_argv;
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 2da2a6ca22bf..fed9ae432c16 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1632,7 +1632,6 @@ static int __cmd_record(int argc, const char **argv)
 		"record",
 		"-a",
 		"-R",
-		"-f",
 		"-m", "1024",
 		"-c", "1",
 		"-e", "sched:sched_switch",
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index ab4cf232b852..4536a92b18f3 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -1005,7 +1005,7 @@ static int __cmd_record(int argc, const char **argv)
 {
 #ifdef SUPPORT_OLD_POWER_EVENTS
 	const char * const record_old_args[] = {
-		"record", "-a", "-R", "-f", "-c", "1",
+		"record", "-a", "-R", "-c", "1",
 		"-e", "power:power_start",
 		"-e", "power:power_end",
 		"-e", "power:power_frequency",
@@ -1014,7 +1014,7 @@ static int __cmd_record(int argc, const char **argv)
 	};
 #endif
 	const char * const record_new_args[] = {
-		"record", "-a", "-R", "-f", "-c", "1",
+		"record", "-a", "-R", "-c", "1",
 		"-e", "power:cpu_frequency",
 		"-e", "power:cpu_idle",
 		"-e", "sched:sched_wakeup",
-- 
1.7.11.7


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

* Re: [PATCH] perf tools: Fixup for removing -f option in perf record
  2013-06-27  4:25 [PATCH] perf tools: Fixup for removing -f option in perf record Namhyung Kim
@ 2013-06-27  9:36 ` Peter Zijlstra
  2013-06-27 10:39   ` Ingo Molnar
  2013-07-09  7:41 ` Namhyung Kim
  2013-07-12  8:50 ` [tip:perf/urgent] perf record: Remove -f/--force option tip-bot for Jiri Olsa
  2 siblings, 1 reply; 13+ messages in thread
From: Peter Zijlstra @ 2013-06-27  9:36 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Arnaldo Carvalho de Melo, Paul Mackerras, Ingo Molnar,
	Namhyung Kim, LKML, Jiri Olsa

On Thu, Jun 27, 2013 at 01:25:20PM +0900, Namhyung Kim wrote:
> From: Namhyung Kim <namhyung.kim@lge.com>
> 
> The commit bf3da4014a0c ("perf record: Remove -f/--force option") got
> rid of -f option from perf record.  But this option was used
> internally by various sub-commands so they wouldn't work anymore.
> Also update the example document not to use -f option.

Oh man.. we got rid of -f? Do we now default to over-write existing data
file?

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

* Re: [PATCH] perf tools: Fixup for removing -f option in perf record
  2013-06-27  9:36 ` Peter Zijlstra
@ 2013-06-27 10:39   ` Ingo Molnar
  2013-06-27 10:47     ` Peter Zijlstra
  0 siblings, 1 reply; 13+ messages in thread
From: Ingo Molnar @ 2013-06-27 10:39 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Namhyung Kim, Arnaldo Carvalho de Melo, Paul Mackerras,
	Namhyung Kim, LKML, Jiri Olsa


* Peter Zijlstra <peterz@infradead.org> wrote:

> On Thu, Jun 27, 2013 at 01:25:20PM +0900, Namhyung Kim wrote:
> > From: Namhyung Kim <namhyung.kim@lge.com>
> > 
> > The commit bf3da4014a0c ("perf record: Remove -f/--force option") got
> > rid of -f option from perf record.  But this option was used
> > internally by various sub-commands so they wouldn't work anymore.
> > Also update the example document not to use -f option.
> 
> Oh man.. we got rid of -f? Do we now default to over-write existing data
> file?

I thought -f was the implied default for ages?

Thanks,

	Ingo

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

* Re: [PATCH] perf tools: Fixup for removing -f option in perf record
  2013-06-27 10:39   ` Ingo Molnar
@ 2013-06-27 10:47     ` Peter Zijlstra
  2013-06-28  9:47       ` Jiri Olsa
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Zijlstra @ 2013-06-27 10:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Namhyung Kim, Arnaldo Carvalho de Melo, Paul Mackerras,
	Namhyung Kim, LKML, Jiri Olsa

On Thu, Jun 27, 2013 at 12:39:31PM +0200, Ingo Molnar wrote:
> 
> * Peter Zijlstra <peterz@infradead.org> wrote:
> 
> > On Thu, Jun 27, 2013 at 01:25:20PM +0900, Namhyung Kim wrote:
> > > From: Namhyung Kim <namhyung.kim@lge.com>
> > > 
> > > The commit bf3da4014a0c ("perf record: Remove -f/--force option") got
> > > rid of -f option from perf record.  But this option was used
> > > internally by various sub-commands so they wouldn't work anymore.
> > > Also update the example document not to use -f option.
> > 
> > Oh man.. we got rid of -f? Do we now default to over-write existing data
> > file?
> 
> I thought -f was the implied default for ages?

OK.. I've been dutifully typing it all this while :-)

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

* Re: [PATCH] perf tools: Fixup for removing -f option in perf record
  2013-06-27 10:47     ` Peter Zijlstra
@ 2013-06-28  9:47       ` Jiri Olsa
  2013-06-28 14:17         ` David Ahern
  0 siblings, 1 reply; 13+ messages in thread
From: Jiri Olsa @ 2013-06-28  9:47 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Ingo Molnar, Namhyung Kim, Arnaldo Carvalho de Melo,
	Paul Mackerras, Namhyung Kim, LKML

On Thu, Jun 27, 2013 at 12:47:50PM +0200, Peter Zijlstra wrote:
> On Thu, Jun 27, 2013 at 12:39:31PM +0200, Ingo Molnar wrote:
> > 
> > * Peter Zijlstra <peterz@infradead.org> wrote:
> > 
> > > On Thu, Jun 27, 2013 at 01:25:20PM +0900, Namhyung Kim wrote:
> > > > From: Namhyung Kim <namhyung.kim@lge.com>
> > > > 
> > > > The commit bf3da4014a0c ("perf record: Remove -f/--force option") got
> > > > rid of -f option from perf record.  But this option was used
> > > > internally by various sub-commands so they wouldn't work anymore.
> > > > Also update the example document not to use -f option.
> > > 
> > > Oh man.. we got rid of -f? Do we now default to over-write existing data
> > > file?
> > 
> > I thought -f was the implied default for ages?
> 
> OK.. I've been dutifully typing it all this while :-)

The '-f' option in record command had no affect.. myabe it got
depreceated when we started to backup perf.data to perf.data.old..?

The report command bails out on following condition:

        if (!force && input_stat.st_uid && (input_stat.st_uid != geteuid())) {

jirka

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

* Re: [PATCH] perf tools: Fixup for removing -f option in perf record
  2013-06-28  9:47       ` Jiri Olsa
@ 2013-06-28 14:17         ` David Ahern
  2013-06-28 15:37           ` Ingo Molnar
  0 siblings, 1 reply; 13+ messages in thread
From: David Ahern @ 2013-06-28 14:17 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Peter Zijlstra, Ingo Molnar, Namhyung Kim,
	Arnaldo Carvalho de Melo, Paul Mackerras, Namhyung Kim, LKML

On 6/28/13 3:47 AM, Jiri Olsa wrote:
>>> I thought -f was the implied default for ages?
>>
>> OK.. I've been dutifully typing it all this while :-)
>
> The '-f' option in record command had no affect.. myabe it got
> depreceated when we started to backup perf.data to perf.data.old..?

Way back in 2010, 2.6.34 kernel - 7865e817 commit. I've been typing the 
-f for while too. Now about the need for the pesky -f on the analysis 
side....

David

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

* Re: [PATCH] perf tools: Fixup for removing -f option in perf record
  2013-06-28 14:17         ` David Ahern
@ 2013-06-28 15:37           ` Ingo Molnar
  2013-06-28 16:03             ` David Ahern
  0 siblings, 1 reply; 13+ messages in thread
From: Ingo Molnar @ 2013-06-28 15:37 UTC (permalink / raw)
  To: David Ahern
  Cc: Jiri Olsa, Peter Zijlstra, Namhyung Kim, Arnaldo Carvalho de Melo,
	Paul Mackerras, Namhyung Kim, LKML


* David Ahern <dsahern@gmail.com> wrote:

> On 6/28/13 3:47 AM, Jiri Olsa wrote:
> >>>I thought -f was the implied default for ages?
> >>
> >>OK.. I've been dutifully typing it all this while :-)
> >
> >The '-f' option in record command had no affect.. myabe it got
> >depreceated when we started to backup perf.data to perf.data.old..?
> 
> Way back in 2010, 2.6.34 kernel - 7865e817 commit. I've been typing
> the -f for while too. Now about the need for the pesky -f on the
> analysis side....

That's only needed when perf.data is owned by a different user, right?

Thanks,

	Ingo

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

* Re: [PATCH] perf tools: Fixup for removing -f option in perf record
  2013-06-28 15:37           ` Ingo Molnar
@ 2013-06-28 16:03             ` David Ahern
  2013-06-28 16:07               ` Ingo Molnar
  0 siblings, 1 reply; 13+ messages in thread
From: David Ahern @ 2013-06-28 16:03 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jiri Olsa, Peter Zijlstra, Namhyung Kim, Arnaldo Carvalho de Melo,
	Paul Mackerras, Namhyung Kim, LKML

On 6/28/13 9:37 AM, Ingo Molnar wrote:
>
> * David Ahern <dsahern@gmail.com> wrote:
>
>> On 6/28/13 3:47 AM, Jiri Olsa wrote:
>>>>> I thought -f was the implied default for ages?
>>>>
>>>> OK.. I've been dutifully typing it all this while :-)
>>>
>>> The '-f' option in record command had no affect.. myabe it got
>>> depreceated when we started to backup perf.data to perf.data.old..?
>>
>> Way back in 2010, 2.6.34 kernel - 7865e817 commit. I've been typing
>> the -f for while too. Now about the need for the pesky -f on the
>> analysis side....
>
> That's only needed when perf.data is owned by a different user, right?
>

Yes, why not let file permissions dictate of uid x can read uid y files? 
Why does perf need to have that restriction? For example, QA collects 
the data files, developers analyze them.

David


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

* Re: [PATCH] perf tools: Fixup for removing -f option in perf record
  2013-06-28 16:03             ` David Ahern
@ 2013-06-28 16:07               ` Ingo Molnar
  0 siblings, 0 replies; 13+ messages in thread
From: Ingo Molnar @ 2013-06-28 16:07 UTC (permalink / raw)
  To: David Ahern
  Cc: Jiri Olsa, Peter Zijlstra, Namhyung Kim, Arnaldo Carvalho de Melo,
	Paul Mackerras, Namhyung Kim, LKML


* David Ahern <dsahern@gmail.com> wrote:

> On 6/28/13 9:37 AM, Ingo Molnar wrote:
> >
> >* David Ahern <dsahern@gmail.com> wrote:
> >
> >>On 6/28/13 3:47 AM, Jiri Olsa wrote:
> >>>>>I thought -f was the implied default for ages?
> >>>>
> >>>>OK.. I've been dutifully typing it all this while :-)
> >>>
> >>>The '-f' option in record command had no affect.. myabe it got
> >>>depreceated when we started to backup perf.data to perf.data.old..?
> >>
> >>Way back in 2010, 2.6.34 kernel - 7865e817 commit. I've been typing
> >>the -f for while too. Now about the need for the pesky -f on the
> >>analysis side....
> >
> >That's only needed when perf.data is owned by a different user, right?
> >
> 
> Yes, why not let file permissions dictate of uid x can read uid y files? 
> Why does perf need to have that restriction? For example, QA collects 
> the data files, developers analyze them.

So, the thinking behind that is that user should not be able to
generate a malicious perf.data file and let root (or another user)
run it accidentally.

( That presumes some sort of exploitable parsing bug or other buffer 
  overflow in perf. )

I don't feel terribly strongly about it though.

Thanks,

	Ingo

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

* Re: [PATCH] perf tools: Fixup for removing -f option in perf record
  2013-06-27  4:25 [PATCH] perf tools: Fixup for removing -f option in perf record Namhyung Kim
  2013-06-27  9:36 ` Peter Zijlstra
@ 2013-07-09  7:41 ` Namhyung Kim
  2013-07-09 14:21   ` David Ahern
  2013-07-12  8:50 ` [tip:perf/urgent] perf record: Remove -f/--force option tip-bot for Jiri Olsa
  2 siblings, 1 reply; 13+ messages in thread
From: Namhyung Kim @ 2013-07-09  7:41 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Arnaldo Carvalho de Melo, Peter Zijlstra, Paul Mackerras,
	Ingo Molnar, LKML, Jiri Olsa

Hi Arnaldo,

You may want to merge this patch too. :)

Thanks,
Namhyung


2013-06-27 오후 1:25, Namhyung Kim 쓴 글:
> From: Namhyung Kim <namhyung.kim@lge.com>
>
> The commit bf3da4014a0c ("perf record: Remove -f/--force option") got
> rid of -f option from perf record.  But this option was used
> internally by various sub-commands so they wouldn't work anymore.
> Also update the example document not to use -f option.
>
> Cc: Jiri Olsa <jolsa@redhat.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
>   tools/perf/Documentation/examples.txt | 4 ++--
>   tools/perf/builtin-kmem.c             | 2 +-
>   tools/perf/builtin-lock.c             | 2 +-
>   tools/perf/builtin-sched.c            | 1 -
>   tools/perf/builtin-timechart.c        | 4 ++--
>   5 files changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/tools/perf/Documentation/examples.txt b/tools/perf/Documentation/examples.txt
> index 77f952762426..a4e392156488 100644
> --- a/tools/perf/Documentation/examples.txt
> +++ b/tools/perf/Documentation/examples.txt
> @@ -66,7 +66,7 @@ Furthermore, these tracepoints can be used to sample the workload as
>   well. For example the page allocations done by a 'git gc' can be
>   captured the following way:
>
> - titan:~/git> perf record -f -e kmem:mm_page_alloc -c 1 ./git gc
> + titan:~/git> perf record -e kmem:mm_page_alloc -c 1 ./git gc
>    Counting objects: 1148, done.
>    Delta compression using up to 2 threads.
>    Compressing objects: 100% (450/450), done.
> @@ -120,7 +120,7 @@ Furthermore, call-graph sampling can be done too, of page
>   allocations - to see precisely what kind of page allocations there
>   are:
>
> - titan:~/git> perf record -f -g -e kmem:mm_page_alloc -c 1 ./git gc
> + titan:~/git> perf record -g -e kmem:mm_page_alloc -c 1 ./git gc
>    Counting objects: 1148, done.
>    Delta compression using up to 2 threads.
>    Compressing objects: 100% (450/450), done.
> diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
> index 46878daca5cc..0259502638b4 100644
> --- a/tools/perf/builtin-kmem.c
> +++ b/tools/perf/builtin-kmem.c
> @@ -708,7 +708,7 @@ static int parse_line_opt(const struct option *opt __maybe_unused,
>   static int __cmd_record(int argc, const char **argv)
>   {
>   	const char * const record_args[] = {
> -	"record", "-a", "-R", "-f", "-c", "1",
> +	"record", "-a", "-R", "-c", "1",
>   	"-e", "kmem:kmalloc",
>   	"-e", "kmem:kmalloc_node",
>   	"-e", "kmem:kfree",
> diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
> index 425830069749..76543a4a7a30 100644
> --- a/tools/perf/builtin-lock.c
> +++ b/tools/perf/builtin-lock.c
> @@ -878,7 +878,7 @@ static int __cmd_report(void)
>   static int __cmd_record(int argc, const char **argv)
>   {
>   	const char *record_args[] = {
> -		"record", "-R", "-f", "-m", "1024", "-c", "1",
> +		"record", "-R", "-m", "1024", "-c", "1",
>   	};
>   	unsigned int rec_argc, i, j;
>   	const char **rec_argv;
> diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
> index 2da2a6ca22bf..fed9ae432c16 100644
> --- a/tools/perf/builtin-sched.c
> +++ b/tools/perf/builtin-sched.c
> @@ -1632,7 +1632,6 @@ static int __cmd_record(int argc, const char **argv)
>   		"record",
>   		"-a",
>   		"-R",
> -		"-f",
>   		"-m", "1024",
>   		"-c", "1",
>   		"-e", "sched:sched_switch",
> diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
> index ab4cf232b852..4536a92b18f3 100644
> --- a/tools/perf/builtin-timechart.c
> +++ b/tools/perf/builtin-timechart.c
> @@ -1005,7 +1005,7 @@ static int __cmd_record(int argc, const char **argv)
>   {
>   #ifdef SUPPORT_OLD_POWER_EVENTS
>   	const char * const record_old_args[] = {
> -		"record", "-a", "-R", "-f", "-c", "1",
> +		"record", "-a", "-R", "-c", "1",
>   		"-e", "power:power_start",
>   		"-e", "power:power_end",
>   		"-e", "power:power_frequency",
> @@ -1014,7 +1014,7 @@ static int __cmd_record(int argc, const char **argv)
>   	};
>   #endif
>   	const char * const record_new_args[] = {
> -		"record", "-a", "-R", "-f", "-c", "1",
> +		"record", "-a", "-R", "-c", "1",
>   		"-e", "power:cpu_frequency",
>   		"-e", "power:cpu_idle",
>   		"-e", "sched:sched_wakeup",
>

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

* Re: [PATCH] perf tools: Fixup for removing -f option in perf record
  2013-07-09  7:41 ` Namhyung Kim
@ 2013-07-09 14:21   ` David Ahern
  2013-07-10  0:07     ` Namhyung Kim
  0 siblings, 1 reply; 13+ messages in thread
From: David Ahern @ 2013-07-09 14:21 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Namhyung Kim, Arnaldo Carvalho de Melo, Peter Zijlstra,
	Paul Mackerras, Ingo Molnar, LKML, Jiri Olsa

On 7/9/13 1:41 AM, Namhyung Kim wrote:
> Hi Arnaldo,
>
> You may want to merge this patch too. :)
>

He did. See 77d03596 and the note:

    [ combined patch removing the -f usage in various sub-commands, such 
as 'perf sched', etc, by Namhyung Kim ]

David


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

* Re: [PATCH] perf tools: Fixup for removing -f option in perf record
  2013-07-09 14:21   ` David Ahern
@ 2013-07-10  0:07     ` Namhyung Kim
  0 siblings, 0 replies; 13+ messages in thread
From: Namhyung Kim @ 2013-07-10  0:07 UTC (permalink / raw)
  To: David Ahern
  Cc: Namhyung Kim, Arnaldo Carvalho de Melo, Peter Zijlstra,
	Paul Mackerras, Ingo Molnar, LKML, Jiri Olsa

Hi David,

2013-07-09 오후 11:21, David Ahern 쓴 글:
> On 7/9/13 1:41 AM, Namhyung Kim wrote:
>> Hi Arnaldo,
>>
>> You may want to merge this patch too. :)
>>
>
> He did. See 77d03596 and the note:
>
>     [ combined patch removing the -f usage in various sub-commands, such
> as 'perf sched', etc, by Namhyung Kim ]

Oops, I didn't notice this.

Thanks,
Namhyung


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

* [tip:perf/urgent] perf record: Remove -f/--force option
  2013-06-27  4:25 [PATCH] perf tools: Fixup for removing -f option in perf record Namhyung Kim
  2013-06-27  9:36 ` Peter Zijlstra
  2013-07-09  7:41 ` Namhyung Kim
@ 2013-07-12  8:50 ` tip-bot for Jiri Olsa
  2 siblings, 0 replies; 13+ messages in thread
From: tip-bot for Jiri Olsa @ 2013-07-12  8:50 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, linux-kernel, paulus, hpa, mingo, a.p.zijlstra, namhyung,
	jolsa, fweisbec, ak, dsahern, tglx, cjashfor, mingo

Commit-ID:  4a4d371a4dfbd3b84a7eab8d535d4c7c3647b09e
Gitweb:     http://git.kernel.org/tip/4a4d371a4dfbd3b84a7eab8d535d4c7c3647b09e
Author:     Jiri Olsa <jolsa@redhat.com>
AuthorDate: Wed, 5 Jun 2013 13:37:21 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 8 Jul 2013 17:37:25 -0300

perf record: Remove -f/--force option

It no longer have any affect on the processing and is marked as obsolete
anyway.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-tvwyspiqr4getzfib2lw06ty@git.kernel.org
Link: http://lkml.kernel.org/r/1372307120-737-1-git-send-email-namhyung@kernel.org
[ combined patch removing the -f usage in various sub-commands, such as 'perf sched', etc, by Namhyung Kim ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/examples.txt    | 4 ++--
 tools/perf/Documentation/perf-record.txt | 4 ----
 tools/perf/builtin-kmem.c                | 2 +-
 tools/perf/builtin-lock.c                | 2 +-
 tools/perf/builtin-record.c              | 3 ---
 tools/perf/builtin-sched.c               | 1 -
 tools/perf/builtin-timechart.c           | 4 ++--
 7 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/tools/perf/Documentation/examples.txt b/tools/perf/Documentation/examples.txt
index 77f9527..a4e3921 100644
--- a/tools/perf/Documentation/examples.txt
+++ b/tools/perf/Documentation/examples.txt
@@ -66,7 +66,7 @@ Furthermore, these tracepoints can be used to sample the workload as
 well. For example the page allocations done by a 'git gc' can be
 captured the following way:
 
- titan:~/git> perf record -f -e kmem:mm_page_alloc -c 1 ./git gc
+ titan:~/git> perf record -e kmem:mm_page_alloc -c 1 ./git gc
  Counting objects: 1148, done.
  Delta compression using up to 2 threads.
  Compressing objects: 100% (450/450), done.
@@ -120,7 +120,7 @@ Furthermore, call-graph sampling can be done too, of page
 allocations - to see precisely what kind of page allocations there
 are:
 
- titan:~/git> perf record -f -g -e kmem:mm_page_alloc -c 1 ./git gc
+ titan:~/git> perf record -g -e kmem:mm_page_alloc -c 1 ./git gc
  Counting objects: 1148, done.
  Delta compression using up to 2 threads.
  Compressing objects: 100% (450/450), done.
diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index 7e32580..e297b74 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -70,10 +70,6 @@ OPTIONS
 --no-delay::
 	Collect data without buffering.
 
--f::
---force::
-	Overwrite existing data file. (deprecated)
-
 -c::
 --count=::
 	Event period to sample.
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 46878da..0259502 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -708,7 +708,7 @@ static int parse_line_opt(const struct option *opt __maybe_unused,
 static int __cmd_record(int argc, const char **argv)
 {
 	const char * const record_args[] = {
-	"record", "-a", "-R", "-f", "-c", "1",
+	"record", "-a", "-R", "-c", "1",
 	"-e", "kmem:kmalloc",
 	"-e", "kmem:kmalloc_node",
 	"-e", "kmem:kfree",
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
index 4258300..76543a4 100644
--- a/tools/perf/builtin-lock.c
+++ b/tools/perf/builtin-lock.c
@@ -878,7 +878,7 @@ static int __cmd_report(void)
 static int __cmd_record(int argc, const char **argv)
 {
 	const char *record_args[] = {
-		"record", "-R", "-f", "-m", "1024", "-c", "1",
+		"record", "-R", "-m", "1024", "-c", "1",
 	};
 	unsigned int rec_argc, i, j;
 	const char **rec_argv;
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 2990570..ecca62e 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -74,7 +74,6 @@ struct perf_record {
 	int			realtime_prio;
 	bool			no_buildid;
 	bool			no_buildid_cache;
-	bool			force;
 	long			samples;
 	off_t			post_processing_offset;
 };
@@ -856,8 +855,6 @@ const struct option record_options[] = {
 			    "system-wide collection from all CPUs"),
 	OPT_STRING('C', "cpu", &record.opts.target.cpu_list, "cpu",
 		    "list of cpus to monitor"),
-	OPT_BOOLEAN('f', "force", &record.force,
-			"overwrite existing data file (deprecated)"),
 	OPT_U64('c', "count", &record.opts.user_interval, "event period to sample"),
 	OPT_STRING('o', "output", &record.output_name, "file",
 		    "output file name"),
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 2da2a6c..fed9ae4 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1632,7 +1632,6 @@ static int __cmd_record(int argc, const char **argv)
 		"record",
 		"-a",
 		"-R",
-		"-f",
 		"-m", "1024",
 		"-c", "1",
 		"-e", "sched:sched_switch",
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index ab4cf232..4536a92 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -1005,7 +1005,7 @@ static int __cmd_record(int argc, const char **argv)
 {
 #ifdef SUPPORT_OLD_POWER_EVENTS
 	const char * const record_old_args[] = {
-		"record", "-a", "-R", "-f", "-c", "1",
+		"record", "-a", "-R", "-c", "1",
 		"-e", "power:power_start",
 		"-e", "power:power_end",
 		"-e", "power:power_frequency",
@@ -1014,7 +1014,7 @@ static int __cmd_record(int argc, const char **argv)
 	};
 #endif
 	const char * const record_new_args[] = {
-		"record", "-a", "-R", "-f", "-c", "1",
+		"record", "-a", "-R", "-c", "1",
 		"-e", "power:cpu_frequency",
 		"-e", "power:cpu_idle",
 		"-e", "sched:sched_wakeup",

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

end of thread, other threads:[~2013-07-12  8:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-27  4:25 [PATCH] perf tools: Fixup for removing -f option in perf record Namhyung Kim
2013-06-27  9:36 ` Peter Zijlstra
2013-06-27 10:39   ` Ingo Molnar
2013-06-27 10:47     ` Peter Zijlstra
2013-06-28  9:47       ` Jiri Olsa
2013-06-28 14:17         ` David Ahern
2013-06-28 15:37           ` Ingo Molnar
2013-06-28 16:03             ` David Ahern
2013-06-28 16:07               ` Ingo Molnar
2013-07-09  7:41 ` Namhyung Kim
2013-07-09 14:21   ` David Ahern
2013-07-10  0:07     ` Namhyung Kim
2013-07-12  8:50 ` [tip:perf/urgent] perf record: Remove -f/--force option tip-bot for Jiri Olsa

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 NNTP newsgroup(s).