1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __PERF_ASLR_H 3 #define __PERF_ASLR_H 4 5 #include <linux/perf_event.h> 6 7 #define ASLR_SUPPORTED_SAMPLE_TYPE ( \ 8 PERF_SAMPLE_IDENTIFIER | \ 9 PERF_SAMPLE_IP | \ 10 PERF_SAMPLE_TID | \ 11 PERF_SAMPLE_TIME | \ 12 PERF_SAMPLE_ADDR | \ 13 PERF_SAMPLE_ID | \ 14 PERF_SAMPLE_STREAM_ID | \ 15 PERF_SAMPLE_CPU | \ 16 PERF_SAMPLE_PERIOD | \ 17 PERF_SAMPLE_READ | \ 18 PERF_SAMPLE_CALLCHAIN | \ 19 PERF_SAMPLE_RAW | \ 20 PERF_SAMPLE_BRANCH_STACK | \ 21 PERF_SAMPLE_STACK_USER | \ 22 PERF_SAMPLE_WEIGHT_TYPE | \ 23 PERF_SAMPLE_DATA_SRC | \ 24 PERF_SAMPLE_TRANSACTION | \ 25 PERF_SAMPLE_PHYS_ADDR | \ 26 PERF_SAMPLE_CGROUP | \ 27 PERF_SAMPLE_DATA_PAGE_SIZE | \ 28 PERF_SAMPLE_CODE_PAGE_SIZE | \ 29 PERF_SAMPLE_AUX) 30 31 struct perf_tool; 32 struct evsel; 33 struct evlist; 34 union perf_event; 35 36 struct perf_tool *aslr_tool__new(struct perf_tool *delegate); 37 void aslr_tool__delete(struct perf_tool *tool); 38 39 void aslr_tool__strip_attr_event(union perf_event *event, struct evlist *evlist); 40 int aslr_tool__cache_orig_attrs(struct perf_tool *tool, struct evsel *evsel); 41 void aslr_tool__strip_evlist(const struct perf_tool *tool, struct evlist *evlist); 42 void aslr_tool__restore_evlist(const struct perf_tool *tool, struct evlist *evlist); 43 44 #endif /* __PERF_ASLR_H */ 45