[PATCH v7 00/13] coresight: Update timestamp attribute to be an interval instead of bool

Leo Yan leo.yan at arm.com
Wed Nov 26 06:00:38 PST 2025


On Wed, Nov 26, 2025 at 10:54:29AM +0000, James Clark wrote:
> Do some cleanups then expand the timestamp format attribute from 1 bit
> to 4 bits for ETMv4 in Perf mode. The current interval is too high for
> most use cases, and particularly on the FVP the number of timestamps
> generated is excessive. This change not only still allows disabling or
> enabling timestamps, but also allows the interval to be configured.
> 
> The old bit is kept deprecated and undocumented for now. There are known
> broken versions of Perf that don't read the format attribute positions
> from sysfs and instead hard code the timestamp bit. We can leave the old
> bit in the driver until we need the bit for another feature or enough
> time has passed that these old Perfs are unlikely to be used.
> 
> The interval option is added as an event format attribute, rather than a
> Coresight config because it's something that the driver is already
> configuring automatically in Perf mode using any unused counter, so it's
> not possible to modify this with a config.
> 
> Applies to coresight/next
> 
> Signed-off-by: James Clark <james.clark at linaro.org>

Tested on Juno-r2 board (though all timestamps are zeros but it still
can record timestamp packets):

# perf record -e cs_etm/timestamp=15/ -- ls
# perf script -D | grep I_TIMESTAMP | wc
   1324   11916   84561

# perf record -e cs_etm/timestamp=14/ -- ls
# perf script -D | grep I_TIMESTAMP | wc
   2415   21735  154205

# perf record -e cs_etm/timestamp=1/ -- ls
# perf script -D | grep I_TIMESTAMP | wc
   130743 1176687 8359898

# perf record -e cs_etm/timestamp=0/ -- ls
# perf script -D | grep I_TIMESTAMP | wc
      0       0       0

Tested-by: Leo Yan <leo.yan at arm.com>



More information about the linux-arm-kernel mailing list