lkml.org 
[lkml]   [2012]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf-record: no build id option fails

* 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


\
 
 \ /
  Last update: 2012-02-07 10:09    [W:0.214 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site