On Wed, Sep 21, 2022 at 7:52 PM Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> wrote: > > On Wed, Sep 21, 2022 at 9:43 AM Andrii Nakryiko <andrii@xxxxxxxxxx> wrote: > > > > Add three more critical features to veristat tool, which make it sufficient > > for a practical work on BPF verifier: > > Nice tool! Thanks! > Few requests: > > 1. > Please fix -v mode, since > veristat -v loop1.bpf.linked3.o > hangs forever. Maybe not forever, but I didn't have that much > time to find out whether it will finish eventually. > [vmuser@archvm bpf]$ sudo ./veristat -v loop1.bpf.linked3.o libbpf: prog 'nested_loops': BPF program load failed: No space left on device libbpf: prog 'nested_loops': failed to load: -28 libbpf: failed to load object 'loop1.bpf.linked3.o' ...<hangs>... Yep, some bug if the program fails to validate due to -ENOSPC. I'll fix it. BTW, I also want to extend this verbose capability to allow specifying log_level = 2 for BPF verifier, because for successfully validated BPF programs log_level = 1 is empty (except for stats). > 2. > Please add some sort of progress indicator to > veristat *.linked3.o > otherwise it's not clear when it will be done and > -v cannot be used to find out because of bug 1. just dumping every entry to console would be too verbose, so I was thinking to overwrite single line with updated progress, if output is a console. I'll look up how to do it. > > 3. > could you make it ignore non bpf elf files? > So it can be used just with veristat *.o ? Yep, I can, will add that as a convenience. Note that for now you probably want to do '*.bpf.linked3.o'. Daniel added .bpf.o suffix which helped greatly, but I think we might want to tweak this a bit more to make sure that what we have as .bpf.linked3.o is just .bpf.o, and initial .bpf.o (which might require further static linking to be complete) will be called something else.