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

From: Alexander Shishkin
Date: Thu Feb 02 2017 - 05:45:09 EST


Mathieu Poirier <mathieu.poirier@xxxxxxxxxx> writes:

> Do we have two different syntax to specify the same behaviour?
>
> For example we have:
>
> --filter 'start 0x80082570/0x644'
>
> and
>
> --filter 'filter 0x80082570/0x644'
>
> Both will end up with filter->filter == 1 and filter->range == 1.

This is another reason why enum action is needed. The difference between
'start' and 'filter' is that the former means "start tracing when you
enter this region until something else stops it"; the latter means
"trace only inside this region" (that is, start tracing when you branch
inside this region and stop when you branch outside). They cannot be
treated interchangeably as I originally though. PT supports 'filter', CS
supports 'start', if I remember right. So we should make sure to
-EOPNOTSUPP things that we don't actually support.

Regards,
--
Alex