lkml.org 
[lkml]   [2014]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/11] perf/x86/intel: Add Intel Cache QoS Monitoring support
On Wed, Sep 24, 2014 at 03:04:12PM +0100, Matt Fleming wrote:
> +/*
> + * Determine if @a and @b measure the same set of tasks.
> + */
> +static bool __match_event(struct perf_event *a, struct perf_event *b)
> +{
> + if ((a->attach_state & PERF_ATTACH_TASK) !=
> + (b->attach_state & PERF_ATTACH_TASK))
> + return false;
> +
> + /* not task */
> +
> + return true; /* if not task, we're machine wide */
> +}

You cut too much out there. That first test checks weather the two
events are of the same type; ie. both tasks or both cpu. After that you
still need to verify that they are indeed the same target.




\
 
 \ /
  Last update: 2014-10-07 22:21    [W:0.264 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site