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 234B6C43334 for ; Tue, 19 Jul 2022 21:51:46 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=981gns8BpFhBzXsk7+SLH79A0Tni0j6BJ4UfoCFnwTc=; b=DUvEglrZSk+hr3 5hHYFOKr4Ki2QhQD0bbPGzwL9jfjsrS9Sj6xecP9SJcXdSNwU4YbGhNEkBL5MHbh/vv6sKv1BPsIQ OoM2wi0dLtITNo8MhYRRj5Rijmjl02d4LO38X9lejo3gxYm2ACy668zyB9yV7YWXJn3lvLHBhcuIo PPmh5cbfgLboeyseUyaA7GJAkVCzUH1rIvSWq/XlI9JVmmMfWv1w2dzMdVrJam6b26hlxDLPFU6Aj 3NN7d93B2MxgEjeC3jmPNeZKkro8CY3UAqxQeg6D2xPdHiXugtHGjDY2C24lKN3tnyPa0RsdVSRi1 oDmXFCCcGkcGtaU37Tfg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oDv6Q-00DP7b-Ow; Tue, 19 Jul 2022 21:50:02 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oDv6M-00DP3S-Ox for linux-arm-kernel@lists.infradead.org; Tue, 19 Jul 2022 21:50:00 +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 C67741576; Tue, 19 Jul 2022 14:49:57 -0700 (PDT) Received: from [10.57.42.173] (unknown [10.57.42.173]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 99F6F3F70D; Tue, 19 Jul 2022 14:49:55 -0700 (PDT) Message-ID: <1c9e4aa4-a619-0614-54ef-0ac77117759d@arm.com> Date: Tue, 19 Jul 2022 22:49:54 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v2 07/13] coresight: perf: traceid: Add perf notifiers for Trace ID To: Mike Leach , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: mathieu.poirier@linaro.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, linux-perf-users@vger.kernel.org, leo.yan@linaro.org, quic_jinlmao@quicinc.com References: <20220704081149.16797-1-mike.leach@linaro.org> <20220704081149.16797-8-mike.leach@linaro.org> From: Suzuki K Poulose In-Reply-To: <20220704081149.16797-8-mike.leach@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220719_144958_887743_AE892855 X-CRM114-Status: GOOD ( 20.68 ) 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-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 Mike, On 04/07/2022 09:11, Mike Leach wrote: > Adds in notifier calls to the trace ID allocator that perf > events are starting and stopping. > > This ensures that Trace IDs associated with CPUs remain the same > throughout the perf session, and are only released when all perf > sessions are complete. The patch looks fine to me. I think it would be good to add the definition of coresight_trace_id_perf_{stop,start}() in this patch. > > Signed-off-by: Mike Leach > --- > drivers/hwtracing/coresight/coresight-etm-perf.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c > index c039b6ae206f..ad3fdc07c60b 100644 > --- a/drivers/hwtracing/coresight/coresight-etm-perf.c > +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c > @@ -22,6 +22,7 @@ > #include "coresight-etm-perf.h" > #include "coresight-priv.h" > #include "coresight-syscfg.h" > +#include "coresight-trace-id.h" > > static struct pmu etm_pmu; > static bool etm_perf_up; > @@ -228,6 +229,9 @@ static void free_event_data(struct work_struct *work) > *ppath = NULL; > } > > + /* mark perf event as done for trace id allocator */ > + coresight_trace_id_perf_stop(); > + > free_percpu(event_data->path); > kfree(event_data); > } > @@ -314,6 +318,9 @@ static void *etm_setup_aux(struct perf_event *event, void **pages, > sink = user_sink = coresight_get_sink_by_id(id); > } > > + /* tell the trace ID allocator that a perf event is starting up */ > + coresight_trace_id_perf_start(); > + > /* check if user wants a coresight configuration selected */ > cfg_hash = (u32)((event->attr.config2 & GENMASK_ULL(63, 32)) >> 32); > if (cfg_hash) { Suzuki _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel