Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1571538

Re: [PATCH 1/3] perf, pt, coresight: Clean up address filter structure

From Alexander Shishkin <alexander.shishkin@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/3] perf, pt, coresight: Clean up address filter structure
Date 2017-02-01 13:50 +0100
Message-ID <t62wh-62p-13@gated-at.bofh.it> (permalink)
References <t3OQN-5FW-15@gated-at.bofh.it> <t3OQO-5FW-35@gated-at.bofh.it> <t3WY2-2hB-9@gated-at.bofh.it> <t4dFw-42B-29@gated-at.bofh.it> <t4ilQ-6Xe-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Mathieu Poirier <mathieu.poirier@linaro.org> writes:

> On 27 January 2017 at 05:12, Alexander Shishkin
> <alexander.shishkin@linux.intel.com> 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.

Regards,
--
Alex

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 1/3] perf, pt, coresight: Clean up address filter structure Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-02-01 13:50 +0100
  Re: [PATCH 1/3] perf, pt, coresight: Clean up address filter structure Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-02-01 22:40 +0100
    Re: [PATCH 1/3] perf, pt, coresight: Clean up address filter structure Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-02-01 23:20 +0100
      Re: [PATCH 1/3] perf, pt, coresight: Clean up address filter structure Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-02-02 11:50 +0100
        Re: [PATCH 1/3] perf, pt, coresight: Clean up address filter structure Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-02-02 18:40 +0100
    Re: [PATCH 1/3] perf, pt, coresight: Clean up address filter structure Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-02-02 17:30 +0100
      Re: [PATCH 1/3] perf, pt, coresight: Clean up address filter structure Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-02-07 19:00 +0100

csiph-web