lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 18 Nov 2016 14:48:59 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     "Liang, Kan" <kan.liang@...el.com>,
        Andi Kleen <andi@...stfloor.org>,
        Vince Weaver <vince@...ter.net>,
        lkml <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] perf/x86/uncore: Allow single pmu/box within events group

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@...hat.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;
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ