Re: [PATCH] Documentation: coresight: Update the generic device names

From: Leo Yan
Date: Thu Jun 06 2019 - 22:26:22 EST


Hi Suzuki,

On Thu, Jun 06, 2019 at 05:21:19PM +0100, Suzuki K Poulose wrote:
> Hi Mathieu,
>
> On 03/06/2019 20:01, Mathieu Poirier wrote:
> > Hi Suzuki,
> >
> > On Thu, May 30, 2019 at 04:11:17PM +0100, Suzuki K Poulose wrote:
> > > Update the documentation to reflect the new naming scheme with
> > > latest changes.
> > >
> > > Reported-by: Leo Yan <leo.yan@xxxxxxxxxx>
> > > Cc: Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>
> > > Cc: Jonathan Corbet <corbet@xxxxxxx>
> > > Signed-off-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
> > > ---
> > > Documentation/trace/coresight.txt | 34 +++++++++++++++++++---------------
> > > 1 file changed, 19 insertions(+), 15 deletions(-)
> > >
> > > diff --git a/Documentation/trace/coresight.txt b/Documentation/trace/coresight.txt
> > > index efbc832..7b427cf 100644
> > > --- a/Documentation/trace/coresight.txt
> > > +++ b/Documentation/trace/coresight.txt
> > > @@ -326,16 +326,20 @@ amount of processor cores), the "cs_etm" PMU will be listed only once.
> > > A Coresight PMU works the same way as any other PMU, i.e the name of the PMU is
> > > listed along with configuration options within forward slashes '/'. Since a
> > > Coresight system will typically have more than one sink, the name of the sink to
> > > -work with needs to be specified as an event option. Names for sink to choose
> > > -from are listed in sysFS under ($SYSFS)/bus/coresight/devices:
> > > +work with needs to be specified as an event option.
> > > +On newer kernels the available sinks are listed in sysFS under:
> > > +($SYSFS)/bus/event_source/devices/cs_etm/sinks/
> > > - root@linaro-nano:~# ls /sys/bus/coresight/devices/
> > > - 20010000.etf 20040000.funnel 20100000.stm 22040000.etm
> > > - 22140000.etm 230c0000.funnel 23240000.etm 20030000.tpiu
> > > - 20070000.etr 20120000.replicator 220c0000.funnel
> > > - 23040000.etm 23140000.etm 23340000.etm
> > > + root@localhost:/sys/bus/event_source/devices/cs_etm/sinks# ls
> > > + tmc_etf0 tmc_etr0 tpiu0
> > > - root@linaro-nano:~# perf record -e cs_etm/@20070000.etr/u --per-thread program
> > > +On older kernels, this may need to be found from the list of coresight devices,
> > > +available under ($SYSFS)/bus/coresight/devices/:
> > > +
> > > + root@localhost:/sys/bus/coresight/devices# ls
> > > + etm0 etm1 etm2 etm3 etm4 etm5 funnel0 funnel1 funnel2 replicator0 stm0 tmc_etf0 tmc_etr0 tpiu0
> > > +
> > > + root@linaro-nano:~# perf record -e cs_etm/@tmc_etr0/u --per-thread program
> >
> > On the "older" kernels you are referring to one would find the original naming
> > convention. Everything else looks good to me.
>
> True, but do we care what we see there ? All we care about is the location,
> where to find them. I could fix it, if you think thats needed.

IIUC, either the old kernel or newer kernel, both we can find the event
from ($SYSFS)/bus/event_source/devices/cs_etm/sinks/; the only
difference between them is the naming convention.

So the doc can use the same location to find event for both new and
old kernel, and explain the naming convention difference?

Thanks,
Leo Yan