public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	linux-kernel@vger.kernel.org,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Jiri Olsa <jolsa@redhat.com>, Mike Galbraith <efault@gmx.de>,
	Namhyung Kim <namhyung@gmail.com>,
	Paul Mackerras <paulus@samba.org>,
	Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH V2 1/2] perf tools: fix id pos in perf_evlist__open()
Date: Sat, 07 Sep 2013 08:20:10 -0600	[thread overview]
Message-ID: <522B361A.6030209@gmail.com> (raw)
In-Reply-To: <1378496412-2424-2-git-send-email-adrian.hunter@intel.com>

On 9/6/13 1:40 PM, Adrian Hunter wrote:
> Ensure the id_pos is correct when perf_evlist__open()
> is used.

The commit log should reference 7556257 and breakage of 'kvm stat live'; 
helps identify patches when backporting.

Other than that this patch fixes the problem.

Tested-by and Acked-by David Ahern <dsahern@gmail.com>

>
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
>   tools/perf/util/evlist.c | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
>
> diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
> index b8727ae..005c0eb 100644
> --- a/tools/perf/util/evlist.c
> +++ b/tools/perf/util/evlist.c
> @@ -64,6 +64,16 @@ void perf_evlist__set_id_pos(struct perf_evlist *evlist)
>   	evlist->is_pos = first->is_pos;
>   }
>
> +static void perf_evlist__update_id_pos(struct perf_evlist *evlist)
> +{
> +	struct perf_evsel *evsel;
> +
> +	list_for_each_entry(evsel, &evlist->entries, node)
> +		perf_evsel__calc_id_pos(evsel);
> +
> +	perf_evlist__set_id_pos(evlist);
> +}
> +
>   static void perf_evlist__purge(struct perf_evlist *evlist)
>   {
>   	struct perf_evsel *pos, *n;
> @@ -915,6 +925,8 @@ int perf_evlist__open(struct perf_evlist *evlist)
>   	struct perf_evsel *evsel;
>   	int err;
>
> +	perf_evlist__update_id_pos(evlist);
> +
>   	list_for_each_entry(evsel, &evlist->entries, node) {
>   		err = perf_evsel__open(evsel, evlist->cpus, evlist->threads);
>   		if (err < 0)
>


  reply	other threads:[~2013-09-07 14:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-06 19:40 [PATCH V2 0/2] perf kvm: fix sample_type manipulation Adrian Hunter
2013-09-06 19:40 ` [PATCH V2 1/2] perf tools: fix id pos in perf_evlist__open() Adrian Hunter
2013-09-07 14:20   ` David Ahern [this message]
2013-09-09 18:54     ` Arnaldo Carvalho de Melo
2013-09-12 11:10   ` [tip:perf/urgent] perf evlist: Fix " tip-bot for Adrian Hunter
2013-09-06 19:40 ` [PATCH V2 2/2] perf kvm: fix sample_type manipulation Adrian Hunter
2013-09-07 14:20   ` David Ahern
2013-09-12 11:10   ` [tip:perf/urgent] perf kvm: Fix " tip-bot for Adrian Hunter

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=522B361A.6030209@gmail.com \
    --to=dsahern@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=adrian.hunter@intel.com \
    --cc=efault@gmx.de \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@gmail.com \
    --cc=paulus@samba.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