lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ9a7VgcAiw_h=OTxOK0Vcv=9WFCbdb-+RzDKYhigZZhepM7xg@mail.gmail.com>
Date: Wed, 26 Nov 2025 14:20:14 +0000
From: Mike Leach <mike.leach@...aro.org>
To: Leo Yan <leo.yan@....com>
Cc: James Clark <james.clark@...aro.org>, Suzuki K Poulose <suzuki.poulose@....com>, 
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jonathan Corbet <corbet@....net>, 
	Randy Dunlap <rdunlap@...radead.org>, coresight@...ts.linaro.org, 
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org, 
	linux-doc@...r.kernel.org
Subject: Re: [PATCH v7 13/13] coresight: docs: Document etm4x timestamp
 interval option

Hi,

On Wed, 26 Nov 2025 at 14:01, Leo Yan <leo.yan@....com> wrote:
>
> On Wed, Nov 26, 2025 at 10:54:42AM +0000, James Clark wrote:
> > Document how the new field is used, maximum value and the interaction
> > with SYNC timestamps.
> >
> > Signed-off-by: James Clark <james.clark@...aro.org>
>
> Reviewed-by: Leo Yan <leo.yan@....com>
>
> > ---
> >  Documentation/trace/coresight/coresight.rst | 16 ++++++++++++++--
> >  1 file changed, 14 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/trace/coresight/coresight.rst b/Documentation/trace/coresight/coresight.rst
> > index 806699871b80..d461de4e067e 100644
> > --- a/Documentation/trace/coresight/coresight.rst
> > +++ b/Documentation/trace/coresight/coresight.rst
> > @@ -613,8 +613,20 @@ They are also listed in the folder /sys/bus/event_source/devices/cs_etm/format/
> >       - Session local version of the system wide setting: :ref:`ETM_MODE_RETURNSTACK
> >         <coresight-return-stack>`
> >     * - timestamp
> > -     - Session local version of the system wide setting: :ref:`ETMv4_MODE_TIMESTAMP
> > -       <coresight-timestamp>`
> > +     - Controls generation and interval of timestamps.
> > +
> > +       0 = off, 1 = minimum interval .. 15 = maximum interval.
> > +
> > +       Values 1 - 14 use a counter that decrements every cycle to generate a
> > +       timestamp on underflow. The reload value for the counter is 2 ^ (interval
> > +       - 1). If the value is 1 then the reload value is 1, if the value is 11
> > +       then the reload value is 1024 etc.
> > +
> > +       Setting the maximum interval (15) will disable the counter generated
> > +       timestamps, freeing the counter resource, leaving only ones emitted when
> > +       a SYNC packet is generated. The sync interval is controlled with
> > +       TRCSYNCPR.PERIOD which is every 4096 bytes of trace by default.
> > +

What is the default value?

As far as I recall when this command line parameter was a bool then:
perf -e cs_etm/timestamp/ <program>
is sufficient to turn on timestamping.

This is worth mentioning so users can correctly assess what happens
for any existing scripts they might have.

Based on this then the same command must set the timestamp to 1 -
which will have the same effect as before as we do not want to break
existing behaviour.

Mike


> >     * - cc_threshold
> >       - Cycle count threshold value. If nothing is provided here or the provided value is 0, then the
> >         default value i.e 0x100 will be used. If provided value is less than minimum cycles threshold
> >
> > --
> > 2.34.1
> >



-- 
Mike Leach
Principal Engineer, ARM Ltd.
Manchester Design Centre. UK

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ