On 5/21/19 5:36 PM, Andrii Nakryiko wrote: >> --- /dev/null >> +++ b/tools/testing/selftests/bpf/progs/pyperf.h >> @@ -0,0 +1,268 @@ >> +// SPDX-License-Identifier: GPL-2.0 >> +// Copyright (c) 2019 Facebook > > Maybe let's include a link to an up-to-date real tool, that was used > to create this scale test in BCC: > https://github.com/iovisor/bcc/blob/master/examples/cpp/pyperf/PyPerfBPFProgram.cc I thought about it, but decided not to, since this hack is not exactly the same. I tried to keep an idea of the loop though with roughly the same number of probe_reads and 'if' conditions, but was chopping all bcc-ism out of it. In the commit log: "Add a snippet of pyperf bpf program" By "a snippet" I meant that it's not the same thing, but close enough from verifier complexity point of view. Existing pyperf works around the lack of loops with tail-calls :( I'm thinking to reuse this hack as future bounded loop test too. Another reason to avoid the link is I'm hoping that pyperf will move from 'examples' directory there into proper tool, so the link will become broken.