chiark
/
gitweb
/
~mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
c7dd5f0
)
progs/perftest.c: Use from Glibc syscall numbers.
master
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 17 Mar 2024 12:34:32 +0000
(12:34 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sun, 17 Mar 2024 12:34:32 +0000
(12:34 +0000)
progs/perftest.c
patch
|
blob
|
blame
|
history
diff --git
a/progs/perftest.c
b/progs/perftest.c
index b4a88ca971e5082e87621f25a0b5dd46ed168b13..7c4a1331a321f270cca6d5578b9b81702dae3b24 100644
(file)
--- a/
progs/perftest.c
+++ b/
progs/perftest.c
@@
-44,8
+44,8
@@
#include <unistd.h>
#ifdef HAVE_LINUX_PERF_EVENT_H
+# include <sys/syscall.h>
# include <linux/perf_event.h>
-# include <asm/unistd.h>
#endif
#include <mLib/alloc.h>
@@
-798,7
+798,7
@@
static void init_cyclecount(void)
attr.exclude_kernel = 1;
attr.exclude_hv = 1;
- if ((perf_fd = syscall(
__NR
_perf_event_open, &attr, 0, -1, -1, 0)) < 0)
+ if ((perf_fd = syscall(
SYS
_perf_event_open, &attr, 0, -1, -1, 0)) < 0)
moan("failed to open perf event: %s", strerror(errno));
else
cyclecount_active_p = 1;