lkml.org 
[lkml]   [2015]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v0 3/5] perf: Introduce instruction trace filtering
Date
Peter Zijlstra <peterz@infradead.org> writes:

> On Fri, Dec 11, 2015 at 03:36:36PM +0200, Alexander Shishkin wrote:
>
>> The pmu driver interface basically adds an extra callback to the
>> pmu driver structure, which validates the filter configuration proposed
>> by the user against what the hardware is actually capable of doing
>> and translates it into something that pmu::start can program into
>> hardware.
>
>> @@ -388,12 +393,38 @@ struct pmu {
>> void (*free_aux) (void *aux); /* optional */
>>
>> /*
>> + * Validate instruction tracing filters: make sure hw supports the
>> + * requested configuration and number of filters.
>> + *
>> + * Configure instruction tracing filters: translate hw-agnostic filter
>> + * into hardware configuration in event::hw::itrace_filters
>> + */
>> + int (*itrace_filter_setup) (struct perf_event *event); /* optional */
>> +
>> + /*
>> * Filter events for PMU-specific reasons.
>> */
>> int (*filter_match) (struct perf_event *event); /* optional */
>> };
>
> Any reason you cannot use pmu::filter_match ?

It's for filtering out events that we want to skip over while iterating
various event lists, it's also used in quite a few places (which are
also relevant to our pmus), so I couldn't see how to re-use it.

Thanks,
--
Alex


\
 
 \ /
  Last update: 2015-12-11 15:41    [W:0.164 / U:2.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site