Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at master 47 lines 1.2 kB view raw
1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * Branch Record Buffer Extension Helpers. 4 * 5 * Copyright (C) 2022-2025 ARM Limited 6 * 7 * Author: Anshuman Khandual <anshuman.khandual@arm.com> 8 */ 9 10struct arm_pmu; 11struct perf_branch_stack; 12struct perf_event; 13 14#ifdef CONFIG_ARM64_BRBE 15void brbe_probe(struct arm_pmu *arm_pmu); 16unsigned int brbe_num_branch_records(const struct arm_pmu *armpmu); 17void brbe_invalidate(void); 18 19void brbe_enable(const struct arm_pmu *arm_pmu); 20void brbe_disable(void); 21 22bool brbe_branch_attr_valid(struct perf_event *event); 23void brbe_read_filtered_entries(struct perf_branch_stack *branch_stack, 24 const struct perf_event *event); 25#else 26static inline void brbe_probe(struct arm_pmu *arm_pmu) { } 27static inline unsigned int brbe_num_branch_records(const struct arm_pmu *armpmu) 28{ 29 return 0; 30} 31 32static inline void brbe_invalidate(void) { } 33 34static inline void brbe_enable(const struct arm_pmu *arm_pmu) { }; 35static inline void brbe_disable(void) { }; 36 37static inline bool brbe_branch_attr_valid(struct perf_event *event) 38{ 39 WARN_ON_ONCE(!has_branch_stack(event)); 40 return false; 41} 42 43static void brbe_read_filtered_entries(struct perf_branch_stack *branch_stack, 44 const struct perf_event *event) 45{ 46} 47#endif