1. 02 Apr, 2024 1 commit
    • Rameez Rehman's avatar
      bpftool: Use simpler indentation in source rST for documentation · f7b68543
      Rameez Rehman authored
      The rST manual pages for bpftool would use a mix of tabs and spaces for
      indentation. While this is the norm in C code, this is rather unusual
      for rST documents, and over time we've seen many contributors use a
      wrong level of indentation for documentation update.
      
      Let's fix bpftool's indentation in docs once and for all:
      
      - Let's use spaces, that are more common in rST files.
      - Remove one level of indentation for the synopsis, the command
        description, and the "see also" section. As a result, all sections
        start with the same indentation level in the generated man page.
      - Rewrap the paragraphs after the changes.
      
      There is no content change in this patch, only indentation and
      rewrapping changes. The wrapping in the generated source files for the
      manual pages is changed, but the pages displayed with "man" remain the
      same, apart from the adjusted indentation level on relevant sections.
      
      [ Quentin: rebased on bpf-next, removed indent level for command
        description and options, updated synopsis, command summary, and "see
        also" sections. ]
      Signed-off-by: default avatarRameez Rehman <rameezrehman408@hotmail.com>
      Signed-off-by: default avatarQuentin Monnet <qmo@kernel.org>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Link: https://lore.kernel.org/bpf/20240331200346.29118-2-qmo@kernel.org
      f7b68543
  2. 30 Mar, 2024 1 commit
    • Andrii Nakryiko's avatar
      selftests/bpf: make multi-uprobe tests work in RELEASE=1 mode · 623bdd58
      Andrii Nakryiko authored
      When BPF selftests are built in RELEASE=1 mode with -O2 optimization
      level, uprobe_multi binary, called from multi-uprobe tests is optimized
      to the point that all the thousands of target uprobe_multi_func_XXX
      functions are eliminated, breaking tests.
      
      So ensure they are preserved by using weak attribute.
      
      But, actually, compiling uprobe_multi binary with -O2 takes a really
      long time, and is quite useless (it's not a benchmark). So in addition
      to ensuring that uprobe_multi_func_XXX functions are preserved, opt-out
      of -O2 explicitly in Makefile and stick to -O0. This saves a lot of
      compilation time.
      
      With -O2, just recompiling uprobe_multi:
      
        $ touch uprobe_multi.c
        $ time make RELEASE=1 -j90
        make RELEASE=1 -j90  291.66s user 2.54s system 99% cpu 4:55.52 total
      
      With -O0:
        $ touch uprobe_multi.c
        $ time make RELEASE=1 -j90
        make RELEASE=1 -j90  22.40s user 1.91s system 99% cpu 24.355 total
      
      5 minutes vs (still slow, but...) 24 seconds.
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Link: https://lore.kernel.org/r/20240329190410.4191353-1-andrii@kernel.orgSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      623bdd58
  3. 29 Mar, 2024 38 commits