selftests/bpf: add pyperf scale test
authorAlexei Starovoitov <ast@kernel.org>
Wed, 22 May 2019 03:14:21 +0000 (20:14 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 23 May 2019 14:20:57 +0000 (16:20 +0200)
commit7c9441066ab53168093c79477aabd575f7c14129
treef9b0f0dece13fb49d504ce72851404861c6b3849
parent7c0c6095d48dcd0e67c917aa73cdbb2715aafc36
selftests/bpf: add pyperf scale test

Add a snippet of pyperf bpf program used to collect python stack traces
as a scale test for the verifier.

At 189 loop iterations llvm 9.0 starts ignoring '#pragma unroll'
and generates partially unrolled loop instead.
Hence use 50, 100, and 180 loop iterations to stress test.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/prog_tests/bpf_verif_scale.c
tools/testing/selftests/bpf/progs/pyperf.h [new file with mode: 0644]
tools/testing/selftests/bpf/progs/pyperf100.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/pyperf180.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/pyperf50.c [new file with mode: 0644]