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 8C4F3C761A6 for ; Wed, 29 Mar 2023 13:21:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7RK8SwwL4AsnUwD5fPx80EQvBYgvUBQVSxj72Ma2pjU=; b=kHwMWTQnf4frCG 9a+rOdsKCIDAhjNcEdeHx8evrMyWFZwXL/9Sq2SIdgnZ5+zv3VdbXA65aZVavrIl1Uh4a6nMyd6FW iQf9F6K38uj20Xz/lQVCc7l7KlVVfs5jbuIz2Eds/gayHzOU+P6mKpxliNqUnbD6yd9TlzG/drsZV Zf/5y38GPp621reyAbEROTlfcVzAYekTqDcj5zq6lQszkMdQKF6HE+9GERh4/qi/ocEDcCvVdIDEJ 3Y3QzFHZ23vT7ByI/DT+KuMBWEKX1HXzAiUF+2r+rhuEvLaf8ghhSeghbRUCRc5GfzhW/g22aLbBM c2IHC/Qq4aAgAKkj+Dfg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1phViv-000L9s-0M; Wed, 29 Mar 2023 13:20:21 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1phViF-000Kja-0f for linux-arm-kernel@bombadil.infradead.org; Wed, 29 Mar 2023 13:19:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=INzMBEUfOlbDiEMOvOexw2d2QbflsroDMzj/szOeMrE=; b=qqo+1Go8KtE4IeYzijVbjMHedX LU2aj4yEEeD1ChOZ4uAmpfoujHYm8k6Q0oTS6Z3BWChxC30BcxvNvNNkdo1F0qwI1CF1wN+8I9+gy RKMccBI1jox5GCQEQlfoPY+B7VqeP2Ym/hR/sLKqbSOGnseChymuURK7xttPzDa7h33C3usxd4wMA WIiAmGsWGs5IayLTPWvgddvo5/bh2rb0FKlbmMPohZr7jlcMHyjFbc+Cy5BVcLa+8lww4fcRK91sG jDT/OWkWIvg7cp31eFetmvCzNWXPx1C7ZYPqSQIe2LmAWuExnpDsTgLRtCrkN6PmxoyT6Wp4bIwSC fL0DxMIw==; Received: from [187.19.239.165] (helo=quaco.ghostprotocols.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1phViC-009S75-Id; Wed, 29 Mar 2023 13:19:37 +0000 Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 465FF4052D; Wed, 29 Mar 2023 10:19:34 -0300 (-03) Date: Wed, 29 Mar 2023 10:19:34 -0300 From: Arnaldo Carvalho de Melo To: Ganapatrao Kulkarni Cc: Suzuki K Poulose , Mike Leach , mathieu.poirier@linaro.org, peterz@infradead.org, mingo@redhat.com, linux-perf-users@vger.kernel.org, leo.yan@linaro.org, quic_jinlmao@quicinc.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, James Clark Subject: Re: v4: Re: [PATCH v7 00/15] coresight: Add new API to allocate trace source ID values Message-ID: References: <20230116124928.5440-1-mike.leach@linaro.org> <546f218f-3ac9-8fc2-c843-2f2f16882f31@arm.com> <5b7df6df-0c2d-6953-0f50-e85745cb1f4b@arm.com> <2864f28e-dd2f-5a9c-922f-5c044a864beb@arm.com> <6a71acac-c478-6e5d-3165-4ba9526614db@arm.com> <5556dc65-79ef-e8d2-e5b4-046594af78ea@os.amperecomputing.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5556dc65-79ef-e8d2-e5b4-046594af78ea@os.amperecomputing.com> X-Url: http://acmel.wordpress.com 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: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Em Wed, Mar 29, 2023 at 09:44:47AM +0530, Ganapatrao Kulkarni escreveu: > Hi Mike, > = > On 27-02-2023 03:56 pm, Suzuki K Poulose wrote: > > Mike, > > = > > Please could you send all the perf tool related patches as a seperate > > series, with all the tags to Arnaldo directly at -rc1. > > = > > Please add a cover letter explaining that the kernel changes are > > available upstream. > = > Looks like, Perf tool patches corresponding to dynamic trace id are not y= et > merged in to perf-tools-next. > = > Without these patches, the mainline perf tool breaks for the coresight for > higher cores. I'm pushing what I have to tmp.perf-tools-next while this + other changes goes thru my container set build tests. - Arnaldo = > > = > > Kind regards > > Suzuki > > = > > On 20/02/2023 16:24, Suzuki K Poulose wrote: > > > Arnaldo > > > = > > > Gentle ping > > > = > > > = > > > On 31/01/2023 11:49, Suzuki K Poulose wrote: > > > > Hi Arnaldo > > > > = > > > > On 24/01/2023 11:36, Suzuki K Poulose wrote: > > > > > Hi Arnaldo > > > > > = > > > > > Gentle ping. > > > > > = > > > > > On 19/01/2023 12:00, Suzuki K Poulose wrote: > > > > > > Hi Arnaldo, > > > > > > = > > > > > > On 16/01/2023 12:49, Mike Leach wrote: > > > > > > > The current method for allocating trace source ID > > > > > > > values to sources is > > > > > > > to use a fixed algorithm for CPU based sources of > > > > > > > (cpu_num * 2 + 0x10). > > > > > > > The STM is allocated ID 0x1. > > > > > > > = > > > > > > > This fixed algorithm is used in both the CoreSight > > > > > > > driver code, and by > > > > > > > perf when writing the trace metadata in the AUXTRACE_INFO rec= ord. > > > > > > > = > > > > > > > The method needs replacing as currently:- > > > > > > > 1. It is inefficient in using available IDs. > > > > > > > 2. Does not scale to larger systems with many cores and the a= lgorithm > > > > > > > has no limits so will generate invalid trace IDs for cpu numb= er > 44. > > > > > > > = > > > > > > > Additionally requirements to allocate additional system IDs o= n some > > > > > > > systems have been seen. > > > > > > > = > > > > > > > This patch set=A0 introduces an API that allows the > > > > > > > allocation of trace IDs > > > > > > > in a dynamic manner. > > > > > > > = > > > > > > > Architecturally reserved IDs are never allocated, and the sys= tem is > > > > > > > limited to allocating only valid IDs. > > > > > > > = > > > > > > > Each of the current trace sources ETM3.x, ETM4.x and > > > > > > > STM is updated to use > > > > > > > the new API. > > > > > > > = > > > > > > > For the ETMx.x devices IDs are allocated on certain events > > > > > > > a) When using sysfs, an ID will be allocated on > > > > > > > hardware enable, or a read of > > > > > > > sysfs TRCTRACEID register and freed when the sysfs reset is w= ritten. > > > > > > > = > > > > > > > b) When using perf, ID is allocated on during setup > > > > > > > AUX event, and freed on > > > > > > > event free. IDs are communicated using the AUX_OUTPUT_HW_ID p= acket. > > > > > > > The ID allocator is notified when perf sessions start and stop > > > > > > > so CPU based IDs are kept constant throughout any perf sessio= n. > > > > > > > = > > > > > > > = > > > > > > > Note: This patchset breaks some backward > > > > > > > compatibility for perf record and > > > > > > > perf report. > > > > > > > = > > > > > > > The version of the AUXTRACE_INFO has been updated to > > > > > > > reflect the fact that > > > > > > > the trace source IDs are generated differently. This will > > > > > > > mean older versions of perf report cannot decode the newer fi= le. > > > > > > > = > > > > > > > Appies to coresight/next > > > > > > > = > > > > > = > > > > > ... > > > > > = > > > > > > > Mike Leach (15): > > > > > > > =A0=A0 coresight: trace-id: Add API to dynamically assign Tra= ce ID values > > > > > > > =A0=A0 coresight: Remove obsolete Trace ID unniqueness checks > > > > > > > =A0=A0 coresight: perf: traceid: Add perf ID allocation and n= otifiers > > > > > > > =A0=A0 coresight: stm: Update STM driver to use Trace ID API > > > > > > > =A0=A0 coresight: etm4x: Update ETM4 driver to use Trace ID A= PI > > > > > > > =A0=A0 coresight: etm3x: Update ETM3 driver to use Trace ID A= PI > > > > > > > =A0=A0 coresight: etmX.X: stm: Remove trace_id() callback > > > > > > > =A0=A0 coresight: trace id: Remove legacy get trace ID functi= on. > > > > > > > =A0=A0 perf: cs-etm: Move mapping of Trace ID and cpu > > > > > > > into helper function > > > > > > > =A0=A0 perf: cs-etm: Update record event to use new Trace ID = protocol > > > > > > > =A0=A0 kernel: events: Export perf_report_aux_output_id() > > > > > > > =A0=A0 perf: cs-etm: Handle PERF_RECORD_AUX_OUTPUT_HW_ID pack= et > > > > > > > =A0=A0 coresight: events: PERF_RECORD_AUX_OUTPUT_HW_ID used f= or Trace ID > > > > > > > =A0=A0 coresight: trace-id: Add debug & test macros to > > > > > > > Trace ID allocation > > > > > > > =A0=A0 coresight: etm3x: docs: Alter sysfs documentation > > > > > > > for trace id updates > > > > > > = > > > > > > I have pushed the kernel patches on this series to > > > > > > coresight tree next[0]. > > > > > > = > > > > > > I will be sending them out to Greg for v6.3. Please > > > > > > could you queue the > > > > > > perf tool changes in the series ? i.e., Patches 9,10 and 12. > > > > > > = > > > > > > = > > > > > > [0] https://git.kernel.org/pub/scm/linux/kernel/git/coresight/l= inux.git/log/?h=3Dnext > > > > > > = > > > > > = > > > > > Please could you pick up the perf tool changes above ? > > > > = > > > > Please could you confirm if you are able to queue the perf tool > > > > changes ? Or would you like me route it via coresight tree ? > > > > = > > > > Kind regards > > > > Suzuki > > > > = > > > = > > > = > > > Suzuki > > > = > > = > = > Thanks, > Ganapat > = -- = - Arnaldo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel