summaryrefslogtreecommitdiffstats
path: root/vendor/perf-event-open-sys/wrapper.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /vendor/perf-event-open-sys/wrapper.h
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/perf-event-open-sys/wrapper.h')
-rw-r--r--vendor/perf-event-open-sys/wrapper.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/vendor/perf-event-open-sys/wrapper.h b/vendor/perf-event-open-sys/wrapper.h
new file mode 100644
index 000000000..1838eea99
--- /dev/null
+++ b/vendor/perf-event-open-sys/wrapper.h
@@ -0,0 +1,23 @@
+// This file is consumed by bindgen, called from our build.rs file.
+
+#include <linux/perf_event.h>
+#include <linux/hw_breakpoint.h>
+
+// for __NR_perf_event_open
+#include <asm/unistd.h>
+
+// bindgen won't capture preprocessor macro definitions, so we have to do this.
+enum perf_event_ioctls {
+ ENABLE = PERF_EVENT_IOC_ENABLE,
+ DISABLE = PERF_EVENT_IOC_DISABLE,
+ REFRESH = PERF_EVENT_IOC_REFRESH,
+ RESET = PERF_EVENT_IOC_RESET,
+ PERIOD = PERF_EVENT_IOC_PERIOD,
+ SET_OUTPUT = PERF_EVENT_IOC_SET_OUTPUT,
+ SET_FILTER = PERF_EVENT_IOC_SET_FILTER,
+ ID = PERF_EVENT_IOC_ID,
+ SET_BPF = PERF_EVENT_IOC_SET_BPF,
+ PAUSE_OUTPUT = PERF_EVENT_IOC_PAUSE_OUTPUT,
+ QUERY_BPF = PERF_EVENT_IOC_QUERY_BPF,
+ MODIFY_ATTRIBUTES = PERF_EVENT_IOC_MODIFY_ATTRIBUTES,
+};