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 9E02FC433F5 for ; Mon, 24 Jan 2022 04:33:17 +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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=vN/KnwsQOdm3puYUqDo5WfeU6UReJXRo7I/OqPnr1As=; b=zX2AVknDzTe4fv S56TKPSwXocr5thVeVl+uhSt4VZLr/LWhODlFalk7Savakboh+HQ1HkeDvmbpTKVJNLMaqaMK93QZ wApmhe2w8wdMHYirj/JuzzYe2bEv1yl5zrEi6JNBNaoE3JmX/yTbHLRkvFBA2LPuSDgCewTP7sqMV 2QFVXspYFOZehYtgdQ1Ea17myrnx8wxvL4+ltjJ1xYCZSxL5xmRmq/nFg2h7RmuGzS2JE1FOlYUYX sgzoVdVjklMO0KO5Z3tL/yA/UjQvuSQGkXG3cn/cqy0qdQyQ4Qj03asFosu3IjEjisPuyzdI30j/0 J7FvbR1nFNcI1DLRV95Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBr0u-002DBL-V2; Mon, 24 Jan 2022 04:31:33 +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 1nBr0r-002DAm-LV for linux-arm-kernel@lists.infradead.org; Mon, 24 Jan 2022 04:31: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 5B720ED1; Sun, 23 Jan 2022 20:31:28 -0800 (PST) Received: from p8cg001049571a15.arm.com (unknown [10.119.34.209]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 15E983F73B; Sun, 23 Jan 2022 20:31:19 -0800 (PST) From: Anshuman Khandual To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Anshuman Khandual , Catalin Marinas , Will Deacon , Mark Rutland , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , linux-perf-users@vger.kernel.org Subject: [RFC V1 00/11] arm64/perf: Enable branch stack sampling Date: Mon, 24 Jan 2022 10:00:42 +0530 Message-Id: <1642998653-21377-1-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220123_203129_781367_DAE4D068 X-CRM114-Status: GOOD ( 12.15 ) 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: , MIME-Version: 1.0 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 This series enables perf branch stack sampling support on arm64 platform via a new arch feature called Branch Record Buffer Extension (BRBE). All relevant register definitions could be accessed here. https://developer.arm.com/documentation/ddi0601/2021-12/AArch64-Registers The last two patches extend the perf ABI to accommodate additional branch information that can be captured in BRBE. This series applies on v5.17-rc1. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: linux-arm-kernel@lists.infradead.org Cc: linux-perf-users@vger.kernel.org Cc: linux-kernel@vger.kernel.org Anshuman Khandual (11): perf: Consolidate branch sample filter helpers arm64/perf: Add register definitions for BRBE arm64/perf: Update struct arm_pmu for BRBE arm64/perf: Update struct pmu_hw_events for BRBE arm64/perf: Detect support for BRBE arm64/perf: Drive BRBE from perf event states arm64/perf: Add BRBE driver arm64/perf: Enable branch stack sampling perf: Add more generic branch types perf: Expand perf_branch_entry.type perf: Capture branch privilege information arch/arm64/include/asm/sysreg.h | 216 ++++++++++++ arch/arm64/kernel/perf_event.c | 48 +++ arch/x86/events/intel/lbr.c | 4 +- drivers/perf/Kconfig | 11 + drivers/perf/Makefile | 1 + drivers/perf/arm_pmu.c | 65 +++- drivers/perf/arm_pmu_brbe.c | 432 +++++++++++++++++++++++ drivers/perf/arm_pmu_brbe.h | 259 ++++++++++++++ drivers/perf/arm_pmu_platform.c | 34 ++ include/linux/perf/arm_pmu.h | 49 +++ include/linux/perf_event.h | 24 ++ include/uapi/linux/perf_event.h | 26 +- kernel/events/core.c | 9 +- tools/include/uapi/linux/perf_event.h | 26 +- tools/perf/Documentation/perf-record.txt | 1 + tools/perf/util/branch.c | 13 +- tools/perf/util/parse-branch-options.c | 1 + 17 files changed, 1202 insertions(+), 17 deletions(-) create mode 100644 drivers/perf/arm_pmu_brbe.c create mode 100644 drivers/perf/arm_pmu_brbe.h -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel