[PATCH v6 1/8] perf cs-etm: Decode ETE exception packets

James Clark james.clark at linaro.org
Thu Jun 4 07:10:53 PDT 2026



On 26/05/2026 5:59 pm, Leo Yan wrote:
> ETE shares the same packet format as ETMv4, but exception decoding
> handled ETMv4 packets only. As a result, ETE exception packets were
> not classified.
> 
> Recognize the ETE magic for exception number decoding.
> 
> Signed-off-by: Leo Yan <leo.yan at arm.com>
> ---
>   tools/perf/util/cs-etm.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
> index 6ec48de29441012f3d827d50616349c6c0d1f037..ab79d08f5a6095448470e2c3ec85ff3db2fb5634 100644
> --- a/tools/perf/util/cs-etm.c
> +++ b/tools/perf/util/cs-etm.c
> @@ -2138,7 +2138,7 @@ static bool cs_etm__is_syscall(struct cs_etm_queue *etmq,
>   	 * HVC cases; need to check if it's SVC instruction based on
>   	 * packet address.
>   	 */
> -	if (magic == __perf_cs_etmv4_magic) {
> +	if (magic == __perf_cs_etmv4_magic || magic == __perf_cs_ete_magic) {
>   		if (packet->exception_number == CS_ETMV4_EXC_CALL &&
>   		    cs_etm__is_svc_instr(etmq, trace_chan_id, prev_packet,
>   					 prev_packet->end_addr))
> @@ -2161,7 +2161,7 @@ static bool cs_etm__is_async_exception(struct cs_etm_traceid_queue *tidq,
>   		    packet->exception_number == CS_ETMV3_EXC_FIQ)
>   			return true;
>   
> -	if (magic == __perf_cs_etmv4_magic)
> +	if (magic == __perf_cs_etmv4_magic || magic == __perf_cs_ete_magic)
>   		if (packet->exception_number == CS_ETMV4_EXC_RESET ||
>   		    packet->exception_number == CS_ETMV4_EXC_DEBUG_HALT ||
>   		    packet->exception_number == CS_ETMV4_EXC_SYSTEM_ERROR ||
> @@ -2192,7 +2192,7 @@ static bool cs_etm__is_sync_exception(struct cs_etm_queue *etmq,
>   		    packet->exception_number == CS_ETMV3_EXC_GENERIC)
>   			return true;
>   
> -	if (magic == __perf_cs_etmv4_magic) {
> +	if (magic == __perf_cs_etmv4_magic || magic == __perf_cs_ete_magic) {
>   		if (packet->exception_number == CS_ETMV4_EXC_TRAP ||
>   		    packet->exception_number == CS_ETMV4_EXC_ALIGNMENT ||
>   		    packet->exception_number == CS_ETMV4_EXC_INST_FAULT ||
> 

Reviewed-by: James Clark <james.clark at linaro.org>




More information about the linux-arm-kernel mailing list