From: Jiri Olsa <jolsa@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "Liang, Kan" <kan.liang@intel.com>,
Andi Kleen <andi@firstfloor.org>, Vince Weaver <vince@deater.net>,
lkml <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] perf/x86/uncore: Allow single pmu/box within events group
Date: Fri, 18 Nov 2016 14:48:59 +0100 [thread overview]
Message-ID: <20161118134859.GB15416@krava> (raw)
In-Reply-To: <20161118125354.GQ3117@twins.programming.kicks-ass.net>
On Fri, Nov 18, 2016 at 01:53:54PM +0100, Peter Zijlstra wrote:
SNIP
> ---
> arch/x86/events/intel/uncore.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
> index efca2685d876..7b1b34576886 100644
> --- a/arch/x86/events/intel/uncore.c
> +++ b/arch/x86/events/intel/uncore.c
> @@ -319,9 +319,9 @@ static struct intel_uncore_box *uncore_alloc_box(struct intel_uncore_type *type,
> */
> static int uncore_pmu_event_init(struct perf_event *event);
>
> -static bool is_uncore_event(struct perf_event *event)
> +static bool is_box_event(struct intel_uncore_box *box, struct perf_event *event)
> {
> - return event->pmu->event_init == uncore_pmu_event_init;
> + return box->pmu == event->pmu;
this one needs to be:
+ return box->pmu == uncore_event_to_pmu(event);
and it works.. ;-)
Tested-by: Jiri Olsa <jolsa@redhat.com>
thanks,
jirka
> }
>
> static int
> @@ -340,7 +340,7 @@ uncore_collect_events(struct intel_uncore_box *box, struct perf_event *leader,
>
> n = box->n_events;
>
> - if (is_uncore_event(leader)) {
> + if (is_box_event(box, leader)) {
> box->event_list[n] = leader;
> n++;
> }
> @@ -349,7 +349,7 @@ uncore_collect_events(struct intel_uncore_box *box, struct perf_event *leader,
> return n;
>
> list_for_each_entry(event, &leader->sibling_list, group_entry) {
> - if (!is_uncore_event(event) ||
> + if (!is_box_event(box, event) ||
> event->state <= PERF_EVENT_STATE_OFF)
> continue;
>
next prev parent reply other threads:[~2016-11-18 13:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-18 0:15 [PATCH] perf/x86/uncore: Allow single pmu/box within events group Jiri Olsa
2016-11-18 11:28 ` Peter Zijlstra
2016-11-18 12:33 ` Jiri Olsa
2016-11-18 12:53 ` Peter Zijlstra
2016-11-18 13:23 ` Jiri Olsa
2016-11-18 13:48 ` Jiri Olsa [this message]
2016-11-18 14:06 ` Peter Zijlstra
2016-11-18 14:30 ` Jiri Olsa
2016-11-18 14:45 ` Peter Zijlstra
2016-11-22 12:30 ` [tip:perf/urgent] perf/x86/intel/uncore: Allow only a single PMU/box within an " tip-bot for Peter Zijlstra
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=20161118134859.GB15416@krava \
--to=jolsa@redhat.com \
--cc=andi@firstfloor.org \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=vince@deater.net \
/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