diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2021-06-04 15:31:09 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-06-16 17:09:10 +0300 |
commit | a1ea0ca8a6f17d7b79bbc4d05dd4e6ca162d8f15 (patch) | |
tree | 266b55355a2b7fa475f1843f8984ac1dde23c086 /tools/testing/selftests/powerpc | |
parent | e2c043163d44f7b3a9e65d9161af72b647b18451 (diff) | |
download | linux-a1ea0ca8a6f17d7b79bbc4d05dd4e6ca162d8f15.tar.xz |
powerpc/selftests: Use gettid() instead of getppid() for null_syscall
gettid() is 10% lighter than getppid(), use it for null_syscall selftest.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/0ad62673d3e063f848e7c99d719bb966efd433e8.1622809833.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'tools/testing/selftests/powerpc')
-rw-r--r-- | tools/testing/selftests/powerpc/benchmarks/null_syscall.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/powerpc/benchmarks/null_syscall.c b/tools/testing/selftests/powerpc/benchmarks/null_syscall.c index 579f0215c6e7..9836838a529f 100644 --- a/tools/testing/selftests/powerpc/benchmarks/null_syscall.c +++ b/tools/testing/selftests/powerpc/benchmarks/null_syscall.c @@ -14,6 +14,7 @@ #include <time.h> #include <sys/types.h> #include <sys/time.h> +#include <sys/syscall.h> #include <signal.h> static volatile int soak_done; @@ -121,7 +122,7 @@ static void do_null_syscall(unsigned long nr) unsigned long i; for (i = 0; i < nr; i++) - getppid(); + syscall(__NR_gettid); } #define TIME(A, STR) \ |