[PATCH 10/34] perf cs-etm: Remove old pipe mode support
From: James Clark
Date: Wed Nov 18 2026 - 11:31:02 EST
Pipe mode hasn't been supported since we added several peeks to
cs_etm__process_auxtrace_info_full() that require random access. Even if
it was supported, we would have to buffer the whole file anyway to make
fully ordered decoding work. You don't know if one core stopped tracing
for good or whether to wait till very end of the file for the next one.
IntelPT has the same issue, see 'perf-intel-pt.txt#Pipe mode'.
Signed-off-by: James Clark <james.clark@xxxxxxxxxx>
---
tools/perf/util/cs-etm.c | 38 +++-----------------------------------
1 file changed, 3 insertions(+), 35 deletions(-)
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index fb4582dc378e..11ebfdf1e933 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -66,7 +66,6 @@ struct cs_etm_auxtrace {
*/
bool per_thread_decoding;
bool snapshot_mode;
- bool data_queued;
bool has_virtual_ts; /* Virtual/Kernel timestamps in the trace. */
bool use_thread_stack;
bool use_callchain;
@@ -3126,33 +3125,7 @@ static int cs_etm__process_auxtrace_event(struct perf_session *session,
struct cs_etm_auxtrace *etm = container_of(session->auxtrace,
struct cs_etm_auxtrace,
auxtrace);
- if (!etm->data_queued) {
- struct auxtrace_buffer *buffer;
- off_t data_offset;
- int fd = perf_data__fd(session->data);
- bool is_pipe = perf_data__is_pipe(session->data);
- int err;
- int idx = event->auxtrace.idx;
-
- if (is_pipe)
- data_offset = 0;
- else {
- data_offset = lseek(fd, 0, SEEK_CUR);
- if (data_offset == -1)
- return -errno;
- }
-
- err = auxtrace_queues__add_event(&etm->queues, session,
- event, data_offset, &buffer);
- if (err)
- return err;
-
- if (dump_trace)
- if (auxtrace_buffer__get_data(buffer, fd)) {
- cs_etm__dump_event(etm->queues.queue_array[idx].priv, buffer);
- auxtrace_buffer__put_data(buffer);
- }
- } else if (dump_trace)
+ if (dump_trace)
dump_queued_data(etm, &event->auxtrace);
return 0;
@@ -3454,12 +3427,8 @@ static int cs_etm__queue_aux_records(struct perf_session *session)
cs_etm__queue_aux_records_cb, NULL);
/*
- * We would get here if there are no entries in the index (either no auxtrace
- * buffers or no index at all). Fail silently as there is the possibility of
- * queueing them in cs_etm__process_auxtrace_event() if etm->data_queued is still
- * false.
- *
- * In that scenario, buffers will not be split by AUX records.
+ * No entries in the index (either no auxtrace buffers or no index at
+ * all).
*/
return 0;
}
@@ -3867,7 +3836,6 @@ int cs_etm__process_auxtrace_info_full(union perf_event *event,
if (err)
goto err_free_queues;
- etm->data_queued = etm->queues.populated;
return 0;
err_free_queues:
--
2.43.0