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 X-Spam-Level: X-Spam-Status: No, score=-10.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65E3CC433E6 for ; Wed, 27 Jan 2021 16:44:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 140AD64D9D for ; Wed, 27 Jan 2021 16:44:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 140AD64D9D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XYbppPqK1u9N+P0lb4h3WQzly8OWb9jK8+3ExEz3AxI=; b=qNYurCCMZnNOvEVVbuWYKoDFU lr1wSrR1KbsBOcmpcUTrjS61agkBjTueKRsSMmltbLQTwzK+z4+9AXDvt4vOx/8/ToAegG33AejQu pNxhhU3/2+oVuaPDqZka+uH7SuAJeh0MfF77n0ZoQE8/ifgwcrbsVlBbfG2J17wfmPmoq1cZYRKIu NqZiPBVFAM+14cXdF2HmiW7FTCEzKHJp4pU7pq6Xs8YrtjC7RCxVmwYGJiGbmi/tG+DmO4+VwKyzM b8mCkurz5cVEaCGv7nKFpYFt7F3pDVoQa0lBGik1zVLFwgPpGoSnVWih56dA0HKOGo9BsPqRf7R7m nCfOEQDyA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4nvN-0005df-TL; Wed, 27 Jan 2021 16:44:09 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4mlV-0003b1-7Z for linux-arm-kernel@merlin.infradead.org; Wed, 27 Jan 2021 15:29:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=lyHtJgi7Va5tfzAaI5rqL9GriRxNME2Odjiq4+hk6MQ=; b=t+PPVJrikIpj/xY/0dFh6SfmoF aKOqXkTbntV0+tau4hu7CLRPUCrjGBuRI4XKZg0wRH2LKP4qhcx/iKyipHQTVwWfrld4IT1bOg5Uf pLzZyL8E8+RhOnx/al9IXcTL7zgDbII6JIv2fvvANHH3gRwsQBG8a1iAdaKVQ6p3P/g3usps4PBdF UDyr2FZXf2LmbVaQ+ubzbul6gXGP6pr5FQGt1Bun8M09duOCxcml7w/j6zA2dpYzIgQfyiC1i4iwm USuoXr0XH1xjup804/YXMjTEI3hwduLScXLQKghT0nyAjs2JOiEKLm5lBjOx+h+gx9TBazzFpJ0rR flQOO6aA==; Received: from foss.arm.com ([217.140.110.172]) by casper.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1l4lZH-0076hW-CL for linux-arm-kernel@lists.infradead.org; Wed, 27 Jan 2021 14:13:16 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8BA471FB; Wed, 27 Jan 2021 06:12:23 -0800 (PST) Received: from [10.57.40.145] (unknown [10.57.40.145]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B8C853F68F; Wed, 27 Jan 2021 06:12:21 -0800 (PST) Subject: Re: [PATCH V3 14/14] coresight: etm-perf: Add support for trace buffer format To: Peter Zijlstra , Anshuman Khandual References: <1611737738-1493-1-git-send-email-anshuman.khandual@arm.com> <1611737738-1493-15-git-send-email-anshuman.khandual@arm.com> From: Suzuki K Poulose Message-ID: Date: Wed, 27 Jan 2021 14:12:15 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210127_141316_319993_C2F38722 X-CRM114-Status: GOOD ( 18.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mathieu.poirier@linaro.org, coresight@lists.linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Leo Yan , lcherian@marvell.com, mike.leach@linaro.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Peter On 1/27/21 12:54 PM, Peter Zijlstra wrote: > On Wed, Jan 27, 2021 at 02:25:38PM +0530, Anshuman Khandual wrote: > >> It is possible to have a >> perf session where some events end up collecting the trace >> in TMC-ETR while the others in TRBE. Thus we need a way >> to identify the type of the trace for each AUX record. > >> diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h >> index 9a5ca45..169e6b3 100644 >> --- a/include/uapi/linux/perf_event.h >> +++ b/include/uapi/linux/perf_event.h >> @@ -1111,6 +1111,10 @@ enum perf_callchain_context { >> #define PERF_AUX_FLAG_COLLISION 0x08 /* sample collided with another */ >> #define PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK 0xff00 /* PMU specific trace format type */ >> >> +/* CoreSight PMU AUX buffer formats */ >> +#define PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT 0x0000 /* Default for backward compatibility */ >> +#define PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW 0x0100 /* Raw format of the source */ > > Would CORESIGHT_FORMAT_ETR / CORESIGHT_FORMAT_TRBE be better names? > Not really. The format used by the ETR is CORESIGHT frame formatting. And there are other sinks that uses the formatting. e.g, TMC-ETB (a sink with internal memory), TMC-ETF (trace fifo with internal memory). So it is really not tied to ETR. As for TRBE, it simply pumps the data thrown at it to the memory. As such calling it TRBE format would be confusing as the format of the buffer is really Raw trace thrown at it. This can be inferred from the ETM/ETE looking at the ID registers, which the userspace perf already captures in the perf.data. So the decoder perf can look at the perf.data and the AUX records to interpret the buffer correctly. Suzuki _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel