Skip to content

Commit c7bfa2f

Browse files
mathieupoirieracmel
authored andcommitted
perf cs-etm: Introduce the concept of trace ID queues
In an ideal world there is one CPU per cs_etm_queue and as such, one trace ID per cs_etm_queue. In the real world CoreSight topologies allow multiple CPUs to use the same sink, which translates to multiple trace IDs per cs_etm_queue. To deal with this a new cs_etm_traceid_queue structure is introduced to enclose all the information related to a single trace ID, allowing a cs_etm_queue to handle traces generated by any number of CPUs. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Tested-by: Leo Yan <leo.yan@linaro.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Suzuki Poulouse <suzuki.poulose@arm.com> Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190524173508.29044-10-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 882f487 commit c7bfa2f

3 files changed

Lines changed: 234 additions & 145 deletions

File tree

‎tools/perf/util/cs-etm-decoder/cs-etm-decoder.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,8 @@ static ocsd_datapath_resp_t cs_etm_decoder__gen_trace_elem_printer(
413413
struct cs_etm_queue *etmq = decoder->data;
414414
struct cs_etm_packet_queue *packet_queue;
415415

416-
/* First get the packet queue */
417-
packet_queue = cs_etm__etmq_get_packet_queue(etmq);
416+
/* First get the packet queue for this traceID */
417+
packet_queue = cs_etm__etmq_get_packet_queue(etmq, trace_chan_id);
418418
if (!packet_queue)
419419
return OCSD_RESP_FATAL_SYS_ERR;
420420

0 commit comments

Comments
 (0)