Lines Matching +full:disable +full:- +full:wp

1 // SPDX-License-Identifier: GPL-2.0
4 * 'int-ll64.h' and avoid compile warnings when printing __u64 with %llu.
19 #include "parse-events.h"
20 #include "../perf-sys.h"
27 * Just disable the test for these architectures until these issues are
48 attr->type = PERF_TYPE_BREAKPOINT; in __event()
49 attr->size = sizeof(struct perf_event_attr); in __event()
51 attr->config = 0; in __event()
52 attr->bp_type = is_x ? HW_BREAKPOINT_X : HW_BREAKPOINT_W; in __event()
53 attr->bp_addr = (unsigned long) addr; in __event()
54 attr->bp_len = is_x ? default_breakpoint_len() : sizeof(long); in __event()
56 attr->sample_period = 1; in __event()
57 attr->sample_type = PERF_SAMPLE_IP; in __event()
59 attr->exclude_kernel = 1; in __event()
60 attr->exclude_hv = 1; in __event()
62 fd = sys_perf_event_open(attr, -1, 0, -1, in __event()
65 pr_debug("failed opening event %llx\n", attr->config); in __event()
89 TEST_ASSERT_VAL("failed to create wp\n", fd[i] != -1); in bp_accounting()
90 pr_debug("wp %d created\n", i); in bp_accounting()
99 TEST_ASSERT_VAL("failed to modify wp\n", ret == 0); in bp_accounting()
101 pr_debug("wp 0 modified to bp\n"); in bp_accounting()
105 TEST_ASSERT_VAL("failed to create max wp\n", fd_wp != -1); in bp_accounting()
106 pr_debug("wp max created\n"); in bp_accounting()
156 int i, *fd = NULL, ret = -1; in detect_share()
163 return -1; in detect_share()
167 if (fd[i] == -1) { in detect_share()
168 pr_err("failed to create wp\n"); in detect_share()
175 if (fd[i] == -1) in detect_share()
182 while (i--) in detect_share()
191 * - detects the number of watch/break-points,
193 * - detects PERF_EVENT_IOC_MODIFY_ATTRIBUTES ioctl,
195 * - detects if watchpoints and breakpoints share
197 * - create all possible watchpoints on cpu 0
198 * - change one of it to breakpoint
199 * - in case wp and bp do not share slots,