[PATCH 3/3] coresight: perf: Suppress ITRACE start records

Leo Yan leo.yan at arm.com
Tue Sep 1 09:36:17 PDT 2026


PERF_RECORD_ITRACE_START establishes the initial thread context at the
beginning of a trace. Afterwards, decoders track the thread context using
context packets.

Call perf_event_itrace_started() after successfully starting the event
to prevent perf core from emitting redundant PERF_RECORD_ITRACE_START
records when the event is scheduled in again.

When per-thread mode traces multiple child threads, tooling should
enable context ID tracing instead to identify each thread.

Signed-off-by: Leo Yan <leo.yan at arm.com>
---
 drivers/hwtracing/coresight/coresight-etm-perf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c
index 09b21a711a8764ea429d712890265c84648e889e..80502e8b084074980000a039e73e1a164940011d 100644
--- a/drivers/hwtracing/coresight/coresight-etm-perf.c
+++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
@@ -613,6 +613,8 @@ static void etm_event_start(struct perf_event *event, int flags)
 		perf_report_aux_output_id(event, hw_id);
 	}
 
+	perf_event_itrace_started(event);
+
 out:
 	/* Tell the perf core the event is alive */
 	event->hw.state = 0;

-- 
2.34.1




More information about the linux-arm-kernel mailing list