Hi!
> +#define _GNU_SOURCE
> +#include <unistd.h>
> +#include <sys/syscall.h>
> +#include <linux/perf_event.h>
> +int main(void) {
> + struct perf_event_attr pe;
> + syscall(__NR_perf_event_open, &pe, 0, -1, -1, 0);
> + return 0;
> +}])],[has_perf_event_open_syscall="yes"])
> +if test "x$has_perf_event_open_syscall" = "xyes"; then
> + AC_DEFINE(HAVE_PERF_EVENT_OPEN_SYSCALL,1,[Define to 1 if you have the
> perf_event_open syscall support on your system])
> +else
> + AC_DEFINE(HAVE_PERF_EVENT_OPEN_SYSCALL,0,[Define to 0 if you do not
> have the perf_event_open syscall support on your system])
> +fi
> +])
This is wrong, we have linux_syscall_numbers.h in
testcases/kernel/include/ in order to make sure syscall numbers are
defined.
Looking at the code it should rather be check for
struct perf_event_attr in /usr/include/linux/perf_event.h, right?
> +static void do_work(void)
> +{
> + int i;
> +
> + for (i = 0; i < LOOPS; ++i)
> + asm volatile ("" : : "g" (i));
> +}
What is the exact purpose of the asm snippet here?
--
Cyril Hrubis
[email protected]
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list