Skip to content

perf tools: improve BPF related error delivering and testing

Wang Nan lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 2 repliesIn review
  2. v15 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- Use enum for error code.

- Eliminate for-loop, directly get error message from array using array index.

- Classify error reason of program loading failure.

- Improve message when version mismatching.

[1] http://lkml.kernel.org/r/[email protected]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7bpf tools: Improve libbpf error reportingtools/lib/bpf/libbpf.c tools/lib/bpf/libbpf.h tools/perf/tests/llvm.c +2 more+159 -591 reply
2/7bpf tools: Add new API bpf_object__get_kversion()tools/lib/bpf/libbpf.c tools/lib/bpf/libbpf.h+9 -00 replies
3/7perf tools: Make fetch_kernel_version() public availabletools/perf/util/llvm-utils.c tools/perf/util/util.c tools/perf/util/util.h+50 -330 replies
3/7perf tools: Make fetch_kernel_version() public availabletools/perf/util/llvm-utils.c tools/perf/util/util.c tools/perf/util/util.h+49 -330 replies
4/7perf tools: Improve BPF related error messages outputtools/perf/util/bpf-loader.c tools/perf/util/bpf-loader.h tools/perf/util/parse-events.c +1 more+109 -170 replies
4/7perf tools: Improve BPF related error messages outputtools/perf/util/bpf-loader.c tools/perf/util/bpf-loader.h tools/perf/util/parse-events.c +1 more+107 -150 replies
5/7perf test: Enforce LLVM test: update basic BPF test programtools/perf/tests/Build tools/perf/tests/bpf-script-example.c tools/perf/tests/llvm.c +1 more+129 -310 replies
6/7perf test: Enforce LLVM test: add kbuild testtools/perf/tests/Build tools/perf/tests/bpf-script-test-kbuild.c tools/perf/tests/llvm.c +1 more+35 -10 replies
7/7perf test: Add 'perf test BPF'tools/perf/tests/Build tools/perf/tests/bpf.c tools/perf/tests/builtin-test.c +3 more+248 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/7] perf tools: improve BPF related error delivering and testing

This patchset is based on Arnaldo's perf/core.

Previous version can be found from [1].

Patch 1/7 - 4/7 are error message related patches.

Patch 5/7 - 7/7 are testing related patches.

v1 -> v2:

- Use enum for error code.

- Eliminate for-loop, directly get error message from array using array index.

- Classify error reason of program loading failure.

- Improve message when version mismatching.

[1] http://lkml.kernel.org/r/[email protected]

Wang Nan (7):
bpf tools: Improve libbpf error reporting
bpf tools: Add new API bpf_object__get_kversion() perf tools: Make fetch_kernel_version() public available perf tools: Improve BPF related error messages output perf test: Enforce LLVM test: update basic BPF test program perf test: Enforce LLVM test: add kbuild test perf test: Add 'perf test BPF'

 tools/lib/bpf/libbpf.c                    | 167 +++++++++++++++++-------
 tools/lib/bpf/libbpf.h                    |  21 +++
 tools/perf/tests/Build                    |  17 ++-
 tools/perf/tests/bpf-script-example.c     |   4 +
 tools/perf/tests/bpf-script-test-kbuild.c |  21 +++
 tools/perf/tests/bpf.c                    | 209 ++++++++++++++++++++++++++++++
 tools/perf/tests/builtin-test.c           |   4 +
 tools/perf/tests/llvm.c                   | 137 +++++++++++++++-----
 tools/perf/tests/llvm.h                   |  18 +++
 tools/perf/tests/tests.h                  |   1 +
 tools/perf/util/bpf-loader.c              | 143 +++++++++++++++++---
 tools/perf/util/bpf-loader.h              |  32 +++++
 tools/perf/util/llvm-utils.c              |  49 +++----
 tools/perf/util/parse-events.c            |  11 +-
 tools/perf/util/util.c                    |  31 +++++
 tools/perf/util/util.h                    |   8 ++
 16 files changed, 735 insertions(+), 138 deletions(-)
 create mode 100644 tools/perf/tests/bpf-script-test-kbuild.c
 create mode 100644 tools/perf/tests/bpf.c
 create mode 100644 tools/perf/tests/llvm.h
Signature · 1 line
1.8.3.4