[lkml]   [2017]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/3] perf, pt, coresight: Clean up address filter structure
Mathieu Poirier <> writes:

> On 27 January 2017 at 05:12, Alexander Shishkin
> <> wrote:
>> But "range" is not an action, it's a type of a filter. It determines the
>> condition that triggers an action. An action, however, is what we do
>> when the condition comes true.
> Then filter->action could be renamed 'type'.

No. Again, *action* is what we *do*. *Type* is *how* we detect that
something needs to be done.

> In the end filters on PT
> are range filters, the same way they are on CS. But changing the

No. The CS driver supports both single address and address range
filters at least acconding to my reading of the code. Now that I look
more at it, I see that it also gets the range filters wrong: it
disregards filter->filter for range filters, assuming that since it's a
range, it means that the user wants to trace what's in the range
(filter->filter == 1), but it may also mean "stop if you end up in this
range" (filter->filter == 0). The fact that the CS driver gets it wrong
just proves the point that "filter->filter" is confusing and misleading
and needs to be replaced.

In the case of CS, I think that a -EOPNOTSUPP is also appropriate for
the type==range&&action==stop combination.


 \ /
  Last update: 2017-02-01 13:48    [W:0.072 / U:3.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site