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 5ADFBC7EE24 for ; Mon, 5 Jun 2023 08:01:03 +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=IabS+uYm/4dMjBwDw1yGOTPvUnP6zOjf3ljlWmpEjTg=; b=jaZshkVy2QZfEK pcyafQXqgIn7zifiW7SrRgSofJ9arBCrJCIJWXMu9UX/2qGad2YM1dv1Z0HRfwfRtnxQZAP05E9rN aiLLl9pQFmA/1mZVfTAwLUL1sKChrqC8BoNcZXOy/oN/91bGcAcM+hXbZvQopTEDhLus4moO7ct4p NoUahl+sstcyxPFUpulGGtDimqpG9JgLQGR5f+Nj6p5yN5gMXxJj099d5vZupVe6WaEZVygriGcU1 dZi//eA3NdYIyfpRn+ENm3emxmZ1w4Ld4ccwNT2zJ+3B/IBrrpS9UaIN9jkubwGQyUQu1OJPCQ+nf mJFo5+XvjMCQB7pOLg7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q658j-00EeEX-0M; Mon, 05 Jun 2023 08:00:33 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q658g-00EeDr-0O for linux-arm-kernel@lists.infradead.org; Mon, 05 Jun 2023 08:00:31 +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 D29A2D75; Mon, 5 Jun 2023 01:01:14 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.24.244]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 227813F793; Mon, 5 Jun 2023 01:00:27 -0700 (PDT) Date: Mon, 5 Jun 2023 09:00:24 +0100 From: Mark Rutland To: Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, will@kernel.org, catalin.marinas@arm.com, Mark Brown , James Clark , Rob Herring , Marc Zyngier , Suzuki Poulose , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , linux-perf-users@vger.kernel.org Subject: Re: [PATCH V11 04/10] arm64/perf: Add branch stack support in struct pmu_hw_events Message-ID: References: <20230531040428.501523-1-anshuman.khandual@arm.com> <20230531040428.501523-5-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230531040428.501523-5-anshuman.khandual@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230605_010030_208323_52CE5895 X-CRM114-Status: GOOD ( 18.42 ) 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="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, May 31, 2023 at 09:34:22AM +0530, Anshuman Khandual wrote: > This adds branch records buffer pointer in 'struct pmu_hw_events' which can > be used to capture branch records during PMU interrupt. This percpu pointer > here needs to be allocated first before usage. > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Mark Rutland > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Tested-by: James Clark > Signed-off-by: Anshuman Khandual Acked-by: Mark Rutland > --- > include/linux/perf/arm_pmu.h | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/include/linux/perf/arm_pmu.h b/include/linux/perf/arm_pmu.h > index 0da745eaf426..694b241e456c 100644 > --- a/include/linux/perf/arm_pmu.h > +++ b/include/linux/perf/arm_pmu.h > @@ -44,6 +44,13 @@ static_assert((PERF_EVENT_FLAG_ARCH & ARMPMU_EVT_47BIT) == ARMPMU_EVT_47BIT); > }, \ > } > > +#define MAX_BRANCH_RECORDS 64 > + > +struct branch_records { > + struct perf_branch_stack branch_stack; > + struct perf_branch_entry branch_entries[MAX_BRANCH_RECORDS]; > +}; > + > /* The events for a given PMU register set. */ > struct pmu_hw_events { > /* > @@ -70,6 +77,8 @@ struct pmu_hw_events { > struct arm_pmu *percpu_pmu; > > int irq; > + > + struct branch_records *branches; > }; > > enum armpmu_attr_groups { > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel