From: Jiri Olsa <jolsa@redhat.com>
To: Stephane Eranian <eranian@google.com>
Cc: linux-kernel@vger.kernel.org, acme@redhat.com, mingo@elte.hu,
peterz@infradead.org, namhyung.kim@lge.com
Subject: Re: [PATCH] perf tools: fix set event list leader
Date: Thu, 31 Jan 2013 14:12:43 +0100 [thread overview]
Message-ID: <20130131131243.GB1091@krava.brq.redhat.com> (raw)
In-Reply-To: <20130131125437.GA3656@quad>
On Thu, Jan 31, 2013 at 01:54:37PM +0100, Stephane Eranian wrote:
>
> The __perf_evlist__set_leader() was setting the leader for all events
> in the list except the first. Which means it assumed the first event
> already had event->leader = event. Seems like this should be the role
> of the function to also do this. This is a requirement for an upcoming
> patch set.
agreed,
Acked/Tested-by Jiri Olsa <jolsa@redhat.com>
>
> Signed-off-by: Stephane Eranian <eranian@google.com>
> ---
>
> diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
> index dc8aee9..050d5bc 100644
> --- a/tools/perf/util/evlist.c
> +++ b/tools/perf/util/evlist.c
> @@ -119,8 +119,7 @@ void __perf_evlist__set_leader(struct list_head *list)
> leader = list_entry(list->next, struct perf_evsel, node);
>
> list_for_each_entry(evsel, list, node) {
> - if (evsel != leader)
> - evsel->leader = leader;
> + evsel->leader = leader;
> }
that's leftover from the times when leader has 'leader' set to NULL
we made the change here:
perf evsel: Set leader evsel's ->leader to itself
commit 2cfda562da7b0b1e0575507ef3efe782d4e218e4
Author: Namhyung Kim <namhyung.kim@lge.com>
Date: Thu Nov 29 15:38:29 2012 +0900
the leader is set properly in perf_evsel__init and when
reading perf.data, so there was no harm in current code
thanks,
jirka
next prev parent reply other threads:[~2013-01-31 13:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-31 12:54 Stephane Eranian
2013-01-31 13:12 ` Jiri Olsa [this message]
2013-02-01 1:50 ` Namhyung Kim
2013-02-06 22:01 ` [tip:perf/core] perf evlist: Fix " tip-bot for Stephane Eranian
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=20130131131243.GB1091@krava.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=acme@redhat.com \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=namhyung.kim@lge.com \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®