linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf-record: no build id option fails
@ 2012-02-06 22:27 David Ahern
  2012-02-07  9:06 ` Ingo Molnar
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: David Ahern @ 2012-02-06 22:27 UTC (permalink / raw)
  To: acme, linux-kernel; +Cc: mingo, peterz, fweisbec, paulus, tglx, David Ahern

A recent refactoring of perf-record introduced the following:

perf record -a -B
Couldn't generating buildids. Use --no-buildid to profile anyway.
sleep: Terminated

I believe the triple negative was meant to be only a double
negative. :-) While I'm there, fixed the grammar on the
error message.

Signed-off-by: David Ahern <dsahern@gmail.com>
---
 tools/perf/builtin-record.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 32870ee..47a0055 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -504,9 +504,9 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
 			return err;
 	}
 
-	if (!!rec->no_buildid
+	if (!rec->no_buildid
 	    && !perf_header__has_feat(&session->header, HEADER_BUILD_ID)) {
-		pr_err("Couldn't generating buildids. "
+		pr_err("Couldn't generate buildids. "
 		       "Use --no-buildid to profile anyway.\n");
 		return -1;
 	}
-- 
1.7.7.6


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

* Re: [PATCH] perf-record: no build id option fails
  2012-02-06 22:27 [PATCH] perf-record: no build id option fails David Ahern
@ 2012-02-07  9:06 ` Ingo Molnar
  2012-02-07 14:50   ` Arnaldo Carvalho de Melo
  2012-02-17  9:43 ` [tip:perf/core] perf record: No " tip-bot for David Ahern
  2012-03-05  8:37 ` tip-bot for David Ahern
  2 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2012-02-07  9:06 UTC (permalink / raw)
  To: David Ahern; +Cc: acme, linux-kernel, peterz, fweisbec, paulus, tglx


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

> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -504,9 +504,9 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
>  			return err;
>  	}
>  
> -	if (!!rec->no_buildid
> +	if (!rec->no_buildid
>  	    && !perf_header__has_feat(&session->header, HEADER_BUILD_ID)) {
> -		pr_err("Couldn't generating buildids. "
> +		pr_err("Couldn't generate buildids. "
>  		       "Use --no-buildid to profile anyway.\n");

After this fix it might make sense to do a s/no_buildid/build_id 
across the source and negate all the conditions. Generally it's 
cleaner to have no negation in structure field names, it avoids 
such double and triple negation problems.

The feature bit did it correctly: it has HEADER_BUILD_ID which 
signals the presence of build-ids.

( Btw., in error messages it might make sense to do a 
  subsystem-wide s/buildid/build-id rename as well, to make it 
  all easier to read - when I read 'buildid' I often keep 
  wondering who that Buil guy is and what he did. )

Thanks,

	Ingo

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

* Re: [PATCH] perf-record: no build id option fails
  2012-02-07  9:06 ` Ingo Molnar
@ 2012-02-07 14:50   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-02-07 14:50 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: David Ahern, linux-kernel, peterz, fweisbec, paulus, tglx

Em Tue, Feb 07, 2012 at 10:06:23AM +0100, Ingo Molnar escreveu:
> 
> * David Ahern <dsahern@gmail.com> wrote:
> 
> > --- a/tools/perf/builtin-record.c
> > +++ b/tools/perf/builtin-record.c
> > @@ -504,9 +504,9 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
> >  			return err;
> >  	}
> >  
> > -	if (!!rec->no_buildid
> > +	if (!rec->no_buildid
> >  	    && !perf_header__has_feat(&session->header, HEADER_BUILD_ID)) {
> > -		pr_err("Couldn't generating buildids. "
> > +		pr_err("Couldn't generate buildids. "
> >  		       "Use --no-buildid to profile anyway.\n");
> 
> After this fix it might make sense to do a s/no_buildid/build_id 
> across the source and negate all the conditions. Generally it's 
> cleaner to have no negation in structure field names, it avoids 
> such double and triple negation problems.
> 
> The feature bit did it correctly: it has HEADER_BUILD_ID which 
> signals the presence of build-ids.
> 
> ( Btw., in error messages it might make sense to do a 
>   subsystem-wide s/buildid/build-id rename as well, to make it 
>   all easier to read - when I read 'buildid' I often keep 
>   wondering who that Buil guy is and what he did. )

Yeah, making it consistently build_id (and build-id in command line
options) is better than disturbing Buil, as he did nothing to deserve
that level of disturbance from these pesky linux guys ;-)

- Arnaldo

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

* [tip:perf/core] perf record: No build id option fails
  2012-02-06 22:27 [PATCH] perf-record: no build id option fails David Ahern
  2012-02-07  9:06 ` Ingo Molnar
@ 2012-02-17  9:43 ` tip-bot for David Ahern
  2012-03-05  8:37 ` tip-bot for David Ahern
  2 siblings, 0 replies; 5+ messages in thread
From: tip-bot for David Ahern @ 2012-02-17  9:43 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, linux-kernel, paulus, hpa, mingo, peterz, fweisbec,
	robert.richter, dsahern, tglx, mingo

Commit-ID:  d3665498955779e56453501a16f4ad084f798802
Gitweb:     http://git.kernel.org/tip/d3665498955779e56453501a16f4ad084f798802
Author:     David Ahern <dsahern@gmail.com>
AuthorDate: Mon, 6 Feb 2012 15:27:52 -0700
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 9 Feb 2012 12:28:10 -0200

perf record: No build id option fails

A recent refactoring of perf-record introduced the following:

perf record -a -B
Couldn't generating buildids. Use --no-buildid to profile anyway.
sleep: Terminated

I believe the triple negative was meant to be only a double negative.
:-) While I'm there, fixed the grammar on the error message.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1328567272-13190-1-git-send-email-dsahern@gmail.com
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-record.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index f8d9a54..d6d1c6c 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -494,9 +494,9 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
 			return err;
 	}
 
-	if (!!rec->no_buildid
+	if (!rec->no_buildid
 	    && !perf_header__has_feat(&session->header, HEADER_BUILD_ID)) {
-		pr_err("Couldn't generating buildids. "
+		pr_err("Couldn't generate buildids. "
 		       "Use --no-buildid to profile anyway.\n");
 		return -1;
 	}

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

* [tip:perf/core] perf record: No build id option fails
  2012-02-06 22:27 [PATCH] perf-record: no build id option fails David Ahern
  2012-02-07  9:06 ` Ingo Molnar
  2012-02-17  9:43 ` [tip:perf/core] perf record: No " tip-bot for David Ahern
@ 2012-03-05  8:37 ` tip-bot for David Ahern
  2 siblings, 0 replies; 5+ messages in thread
From: tip-bot for David Ahern @ 2012-03-05  8:37 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, linux-kernel, paulus, hpa, mingo, peterz, fweisbec,
	robert.richter, dsahern, tglx, mingo

Commit-ID:  6e557a6adfdbb511dbfa7a0a4aa2148f76a01c6d
Gitweb:     http://git.kernel.org/tip/6e557a6adfdbb511dbfa7a0a4aa2148f76a01c6d
Author:     David Ahern <dsahern@gmail.com>
AuthorDate: Mon, 6 Feb 2012 15:27:52 -0700
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Sat, 3 Mar 2012 11:02:16 -0300

perf record: No build id option fails

A recent refactoring of perf-record introduced the following:

perf record -a -B
Couldn't generating buildids. Use --no-buildid to profile anyway.
sleep: Terminated

I believe the triple negative was meant to be only a double negative.
:-) While I'm there, fixed the grammar on the error message.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1328567272-13190-1-git-send-email-dsahern@gmail.com
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-record.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 0abfb18..39b6a40 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -503,9 +503,9 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
 			return err;
 	}
 
-	if (!!rec->no_buildid
+	if (!rec->no_buildid
 	    && !perf_header__has_feat(&session->header, HEADER_BUILD_ID)) {
-		pr_err("Couldn't generating buildids. "
+		pr_err("Couldn't generate buildids. "
 		       "Use --no-buildid to profile anyway.\n");
 		return -1;
 	}

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

end of thread, other threads:[~2012-03-05  8:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-06 22:27 [PATCH] perf-record: no build id option fails David Ahern
2012-02-07  9:06 ` Ingo Molnar
2012-02-07 14:50   ` Arnaldo Carvalho de Melo
2012-02-17  9:43 ` [tip:perf/core] perf record: No " tip-bot for David Ahern
2012-03-05  8:37 ` tip-bot for David Ahern

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).