diff options
author | Alexei Starovoitov <[email protected]> | 2020-01-09 22:41:22 -0800 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2020-01-10 17:20:07 +0100 |
commit | 6db2d81a46f99edb5690cf0b03bbe3b7f29dfd7b (patch) | |
tree | 4cdd4b38078ed60f308ebe16787f36cfd7dfd4e4 /tools/testing/selftests/bpf/progs/pyperf_global.c | |
parent | 7608e4db6ded8e965dd213baddedba9602959e7d (diff) |
selftests/bpf: Add a test for a large global function
test results:
pyperf50 with always_inlined the same function five times: processed 46378 insns
pyperf50 with global function: processed 6102 insns
Signed-off-by: Alexei Starovoitov <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Song Liu <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/progs/pyperf_global.c')
-rw-r--r-- | tools/testing/selftests/bpf/progs/pyperf_global.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/pyperf_global.c b/tools/testing/selftests/bpf/progs/pyperf_global.c new file mode 100644 index 000000000000..079e78a7562b --- /dev/null +++ b/tools/testing/selftests/bpf/progs/pyperf_global.c @@ -0,0 +1,5 @@ +// SPDX-License-Identifier: GPL-2.0 +/* Copyright (c) 2020 Facebook */ +#define STACK_MAX_LEN 50 +#define GLOBAL_FUNC +#include "pyperf.h" |