public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: a.p.zijlstra@chello.nl, Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org, alexander.shishkin@linux.intel.com,
	Adrian Hunter <adrian.hunter@intel.com>
Subject: Re: [PATCH] perf record: adding dummy event before mapping
Date: Fri, 18 Sep 2015 17:49:55 -0300	[thread overview]
Message-ID: <20150918204955.GA11551@kernel.org> (raw)
In-Reply-To: <1442608924-28139-1-git-send-email-mathieu.poirier@linaro.org>

Em Fri, Sep 18, 2015 at 02:42:04PM -0600, Mathieu Poirier escreveu:
> The parameters of function 'perf_evsel__open()' in
> 'record_open()' have been changed to use the evsel's cpus and
> threads rather than the evlist since:
> 
> commit d988d5ee6478 ("perf evlist: Open event on evsel cpus and threads")
> 
> This works fine for as long as all the events have been added to
> the evlist before function 'perf_evlist__create_maps()' is called
> since the latter will take care of pushing the cpus and threads of
> the evlist to each of the evsel in the list.
> 
> As function 'auxtrace_record__options()' adds a "dummy:u" event to
> the evlist it is important that it runs before
> 'perf_evlist__create_maps()'.
 
What tree is this patch for? Please take a look at tip/master, there are
patches there that should address this issue, please report if not.

Namely, hey, it was already merged by Linus, see:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/tools

There is a set of very small patches by Adrian Hunter fixing the setting
of evsel->{cpus,threads}

Can you check with Linus's git repo? I bet you tried with 4.3-rc1?

- Arnaldo

> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> ---
>  tools/perf/builtin-record.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index 142eeb341b29..630a7a8e3970 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -1183,14 +1183,14 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
>  		goto out_symbol_exit;
>  	}
>  
> -	err = -ENOMEM;
> -	if (perf_evlist__create_maps(rec->evlist, &rec->opts.target) < 0)
> -		usage_with_options(record_usage, record_options);
> -
>  	err = auxtrace_record__options(rec->itr, rec->evlist, &rec->opts);
>  	if (err)
>  		goto out_symbol_exit;
>  
> +	err = -ENOMEM;
> +	if (perf_evlist__create_maps(rec->evlist, &rec->opts.target) < 0)
> +		usage_with_options(record_usage, record_options);
> +
>  	if (record_opts__config(&rec->opts)) {
>  		err = -EINVAL;
>  		goto out_symbol_exit;
> -- 
> 1.9.1

  reply	other threads:[~2015-09-18 20:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18 20:42 [PATCH] perf record: adding dummy event before mapping Mathieu Poirier
2015-09-18 20:49 ` Arnaldo Carvalho de Melo [this message]
2015-09-18 23:38   ` Mathieu Poirier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150918204955.GA11551@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mingo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox