From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E13ECCA5FD2 for ; Thu, 1 Oct 2026 12:55:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/uF5zNxkaQ4jQ0BkeRTJjWKsCM/+7wEmC5bJ3Bsgmzk=; b=VLmY8FNw1YFHeclAApT6RYizYq MmwpSS5pbXja+nodOGQGvf/ryF6biMgv2w5JOyH2vHg3S6d71GbzQ6lwu5iuDbaNGgDxGBEcwFh/J bXr30ENGn68FxKxgm2/LKNzY07wIW4m+03Z78bf2g7Lp9IRZUqG5Zx9eDzjGJdeP4MP/RSxxy7av4 vBpNe8GoxlX7/SWHYKUIgBRqQuIwpcxyv1qH5UMjDwqKNIrGXvw8yDaRa1n/Iq9F3NjIPltC5wN2x xAT89zELeudbzefAim9HFebx8Z7sMKSc/6aUyT/V1NloDiHn2qHigk+qMdMz0pLPs2CQDVzs1wiYe j6Vp2lrQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xCGJu-000000099MW-3ilS; Thu, 01 Oct 2026 12:55:30 +0000 Received: from mail-ej2-x0d.google.com ([2a00:1450:4864:34::d]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xCGJr-000000099M7-2E25 for linux-arm-kernel@lists.infradead.org; Thu, 01 Oct 2026 12:55:28 +0000 Received: by mail-ej2-x0d.google.com with SMTP id a640c23a62f3a-c2e028ed54dso393493766b.1 for ; Thu, 01 Oct 2026 05:55:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1790859325; x=1791464125; darn=lists.infradead.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=/uF5zNxkaQ4jQ0BkeRTJjWKsCM/+7wEmC5bJ3Bsgmzk=; b=Gmhn4thh35rFTQawRK9N7nw8rgM5hSiIBaRkHZEFY37c+Ugb5yUpsMmQoi0EUuXopP heXlTPoDseG1+6uAV+h900HtuqzHtsjWEhH8SunC8VXPJB7pZdQJK0hSPJJZ4hEKEWIS lrUaQ1CIrVDXvgr/v8F+Il7GTBCmyAD754YzQh15czjZK3W6H0uutNbY1w3vHxpU0EuF NXMJ7cVOznfW3dmIrilQNNzbrVnUiV/UFuzCQFC0WTvTFkRM4zg+HBulKsy0e0O6o7sk uEtEXpCWVb8J/pYXbFi9y8uGyW66ct8W/2AevyJMtDCGS0l1yiUhSzRLE18WYQ2Tn0Ut CbOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790859325; x=1791464125; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=/uF5zNxkaQ4jQ0BkeRTJjWKsCM/+7wEmC5bJ3Bsgmzk=; b=rLh5DyxWjZJKloaPvuSO6TmnmH6F/+Kj6OsIfSKrDoRKEQHLIp1ZI0v032kFcfveD+ nq62ESbjQVxE1NAdBSwB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:a17:907:7b82:b0:c29:f5d8:9c7d with SMTP id a640c23a62f3a-c2e23d403f1mr389127766b.44.1790859325594; Thu, 01 Oct 2026 05:55:25 -0700 (PDT) Received: from [192.168.1.3] ([37.18.141.193]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c2e31ce362esm150229566b.30.2026.10.01.05.55.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Oct 2026 05:55:25 -0700 (PDT) Message-ID: <28c735f7-5d1c-4127-b748-99cdb3b48645@linaro.org> Date: Thu, 1 Oct 2026 13:55:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/6] perf cs-etm: Synthesize missing HW_ID mappings for raw trace To: Leo Yan Cc: John Garry , Will Deacon , Mike Leach , Leo Yan , Suzuki K Poulose , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Suyash Mahar , Amir Ayupov , Arnaldo Carvalho de Melo , linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260821-james-cs-hw_id-output-failure-v1-0-9d532ddabcc3@linaro.org> <20260821-james-cs-hw_id-output-failure-v1-3-9d532ddabcc3@linaro.org> <20260904172924.GB8904@e132581.arm.com> Content-Language: en-US From: James Clark In-Reply-To: <20260904172924.GB8904@e132581.arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261001_055527_663663_D5E010A0 X-CRM114-Status: GOOD ( 20.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 04/09/2026 18:29, Leo Yan wrote: > On Fri, Aug 21, 2026 at 10:50:31AM +0100, James Clark wrote: > > [...] > >> +static int cs_etm__synth_unformatted_trace_ids(struct cs_etm_auxtrace *etm) >> +{ >> + struct auxtrace_queues *queues = &etm->queues; >> + >> + for (unsigned int i = 0; i < queues->nr_queues; i++) { >> + struct auxtrace_queue *queue = &queues->queue_array[i]; >> + struct cs_etm_queue *etmq = queue->priv; >> + u64 *cpu_data; >> + u8 trace_id; >> + int ret; >> + >> + if (list_empty(&queue->head) || !etmq || etmq->format != UNFORMATTED) >> + continue; >> + >> + if (!intlist__empty(etmq->traceid_list)) >> + continue; >> + >> + cpu_data = get_cpu_data(etm, queue->cpu); >> + if (!cpu_data) >> + return -EINVAL; >> + >> + ret = cs_etm__metadata_get_trace_id(&trace_id, cpu_data); >> + if (ret) >> + return ret; > > Since this is an unformatted queue, can we simply ignore the trace ID? > Instead of fetching it from the metadata, we could insert 0 to create > the trace ID list. > It's printed in the raw output though and it's useful for eyeballing which CPU any bit of trace ran on because the AUXTRACE header might be off the page, and it makes output consistent with ETM: . ... CoreSight ETE Trace data: size 0x10000 bytes Idx:0; ID:22; I_ASYNC : Alignment Synchronisation. I don't think it costs anything or is complex to do this, but if you really want to set them all to 0 we could do it. > This would also align with future refactoring to remove trace ID > handling for unformatted queues. At that point if they're all going to be 0 then we can ignore all processing of HW_ID events for UNFORMATTED. Instead of saying cs_etm__synth_unformatted_trace_ids() is for 'fixing up missing IDs' it just creates them outright.