linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/19] coresight: trbe: Support trigger and circle buffer modes
@ 2025-12-01 11:21 Leo Yan
  2025-12-01 11:21 ` [PATCH 01/19] coresight: trbe: Use helpers for checking errata Leo Yan
                   ` (19 more replies)
  0 siblings, 20 replies; 52+ messages in thread
From: Leo Yan @ 2025-12-01 11:21 UTC (permalink / raw)
  To: Suzuki K Poulose, Mike Leach, James Clark, Anshuman Khandual,
	Yeoreum Yun, Will Deacon, Mark Rutland, Tamas Petz, Tamas Zsoldos,
	Arnaldo Carvalho de Melo, Namhyung Kim, Jiri Olsa, Ian Rogers,
	Adrian Hunter
  Cc: coresight, linux-arm-kernel, linux-kernel, linux-perf-users,
	Leo Yan

The current TRBE driver operates only in fill mode, where tracing stops
at the top of buffer and a maintenance interrupt is raised.  Due to
interrupt latency, tracing is halted while the program continues to run,
resulting in trace data lose.

This series enhances the driver for the trigger mode to mitigate trace
discontinuity.  The circle buffer mode is introduced to avoid any
maintenance interrupts during the snapshot session.

It can be divided into three parts for easier review:

  Patches 01~05: Minor refactoring for disabling operations and
                 clearing status.
  Patches 06~12: Refactor fault action and trace size calculation.
  Patches 13~19: Support trigger and circle modes. To better utilize the
                 new buffer modes, perf sets the watermark to
		 one-quarter of the buffer size.

This series is applied on coresight-next branch and has been validated
on Orion O6 board:

  1) The trigger count and wrap mode are verified using Ftrace logs.
  2) A new kunit test module verifies limit and count calculations.
  3) Basic perf record / script commands and module load/unload have
     been tested successfully.

Signed-off-by: Leo Yan <leo.yan@arm.com>
---
Leo Yan (19):
      coresight: trbe: Use helpers for checking errata
      coresight: trbe: Remove redundant disable operation
      coresight: trbe: Remove buffer disabling in trbe_handle_overflow()
      coresight: trbe: Remove set_trbe_disabled() from the enable flow
      coresight: trbe: Refactor status clearing
      coresight: trbe: Refactor syndrome decoding
      coresight: trbe: Refactor AUX flag setting
      coresight: trbe: Use PERF_AUX_FLAG_PARTIAL instead of PERF_AUX_FLAG_COLLISION
      coresight: trbe: Add fault action argument to trbe_handle_overflow()
      coresight: trbe: Always check fault action when updating buffer
      coresight: trbe: Apply overwrite erratum for only wrap event
      coresight: trbe: Calculate size for buffer wrapping
      coresight: trbe: Remove misleading comment
      coresight: trbe: Refactor compute_trbe_buffer_limit()
      coresight: trbe: Add static key for bypassing trigger mode
      coresight: trbe: Support trigger mode
      coresight: trbe: Enable circle mode for snapshot
      coresight: trbe: Add kunit tests
      perf: cs-etm: Set watermark for AUX trace

 drivers/hwtracing/coresight/Kconfig                |   9 +
 drivers/hwtracing/coresight/Makefile               |   1 +
 .../coresight/coresight-trbe-kunit-tests.c         | 536 +++++++++++++++++++++
 drivers/hwtracing/coresight/coresight-trbe.c       | 440 +++++++++--------
 drivers/hwtracing/coresight/coresight-trbe.h       | 111 ++++-
 tools/perf/arch/arm/util/cs-etm.c                  |   7 +
 6 files changed, 896 insertions(+), 208 deletions(-)
---
base-commit: 9e9182cab5ebc3ee7544e60ef08ba19fdf216920
change-id: 20251120-trbe_buffer_refactor_v1-1-8f8023105469

Best regards,
-- 
Leo Yan <leo.yan@arm.com>


^ permalink raw reply	[flat|nested] 52+ messages in thread

end of thread, other threads:[~2025-12-12 15:52 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-01 11:21 [PATCH 00/19] coresight: trbe: Support trigger and circle buffer modes Leo Yan
2025-12-01 11:21 ` [PATCH 01/19] coresight: trbe: Use helpers for checking errata Leo Yan
2025-12-04 12:08   ` Anshuman Khandual
2025-12-01 11:21 ` [PATCH 02/19] coresight: trbe: Remove redundant disable operation Leo Yan
2025-12-04 12:25   ` Anshuman Khandual
2025-12-01 11:21 ` [PATCH 03/19] coresight: trbe: Remove buffer disabling in trbe_handle_overflow() Leo Yan
2025-12-04 12:31   ` Anshuman Khandual
2025-12-01 11:21 ` [PATCH 04/19] coresight: trbe: Remove set_trbe_disabled() from the enable flow Leo Yan
2025-12-04 12:43   ` Anshuman Khandual
2025-12-04 13:25     ` Leo Yan
2025-12-01 11:21 ` [PATCH 05/19] coresight: trbe: Refactor status clearing Leo Yan
2025-12-04 12:57   ` Anshuman Khandual
2025-12-09 15:29     ` Leo Yan
2025-12-01 11:21 ` [PATCH 06/19] coresight: trbe: Refactor syndrome decoding Leo Yan
2025-12-02 11:06   ` Suzuki K Poulose
2025-12-02 14:24     ` Leo Yan
2025-12-09 13:17     ` James Clark
2025-12-09 16:06       ` Leo Yan
2025-12-05  4:10   ` Anshuman Khandual
2025-12-09 15:57     ` Leo Yan
2025-12-01 11:21 ` [PATCH 07/19] coresight: trbe: Refactor AUX flag setting Leo Yan
2025-12-02 11:15   ` Suzuki K Poulose
2025-12-02 14:21     ` Leo Yan
2025-12-09 13:37   ` James Clark
2025-12-10 15:43     ` Leo Yan
2025-12-12 14:50       ` James Clark
2025-12-12 15:27         ` Leo Yan
2025-12-12 15:52           ` James Clark
2025-12-01 11:21 ` [PATCH 08/19] coresight: trbe: Use PERF_AUX_FLAG_PARTIAL instead of PERF_AUX_FLAG_COLLISION Leo Yan
2025-12-05  4:28   ` Anshuman Khandual
2025-12-09 13:40     ` James Clark
2025-12-10 16:19       ` Leo Yan
2025-12-01 11:21 ` [PATCH 09/19] coresight: trbe: Add fault action argument to trbe_handle_overflow() Leo Yan
2025-12-01 11:22 ` [PATCH 10/19] coresight: trbe: Always check fault action when updating buffer Leo Yan
2025-12-02 12:00   ` Suzuki K Poulose
2025-12-01 11:22 ` [PATCH 11/19] coresight: trbe: Apply overwrite erratum for only wrap event Leo Yan
2025-12-02 12:05   ` Suzuki K Poulose
2025-12-02 16:56     ` Leo Yan
2025-12-02 17:12       ` Leo Yan
2025-12-01 11:22 ` [PATCH 12/19] coresight: trbe: Calculate size for buffer wrapping Leo Yan
2025-12-01 11:22 ` [PATCH 13/19] coresight: trbe: Remove misleading comment Leo Yan
2025-12-01 11:22 ` [PATCH 14/19] coresight: trbe: Refactor compute_trbe_buffer_limit() Leo Yan
2025-12-01 11:22 ` [PATCH 15/19] coresight: trbe: Add static key for bypassing trigger mode Leo Yan
2025-12-02 12:10   ` Suzuki K Poulose
2025-12-01 11:22 ` [PATCH 16/19] coresight: trbe: Support " Leo Yan
2025-12-01 11:22 ` [PATCH 17/19] coresight: trbe: Enable circle mode for snapshot Leo Yan
2025-12-01 11:22 ` [PATCH 18/19] coresight: trbe: Add kunit tests Leo Yan
2025-12-01 11:22 ` [PATCH 19/19] perf: cs-etm: Set watermark for AUX trace Leo Yan
2025-12-05  4:48   ` Anshuman Khandual
2025-12-09 14:54     ` James Clark
2025-12-10  2:22       ` Anshuman Khandual
2025-12-05  4:53 ` [PATCH 00/19] coresight: trbe: Support trigger and circle buffer modes Anshuman Khandual

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).