Skip to content

[PW_SID:1094515] [v5,1/7] perf unwind: Refactor get_entries to allow dynamic libdw/libunwind selection#1941

Open
linux-riscv-bot wants to merge 7 commits into
workflow__riscv__fixesfrom
pw1094515
Open

[PW_SID:1094515] [v5,1/7] perf unwind: Refactor get_entries to allow dynamic libdw/libunwind selection#1941
linux-riscv-bot wants to merge 7 commits into
workflow__riscv__fixesfrom
pw1094515

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1094515 applied to workflow__riscv__fixes

Name: [v5,1/7] perf unwind: Refactor get_entries to allow dynamic libdw/libunwind selection
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1094515
Version: 5

…lection

Currently, both libdw and libunwind define 'unwind__get_entries'. This
causes a duplicate symbol build failure when both are compiled into
perf.

This commit refactors the DWARF unwind post-processing to be
configurable at runtime via the .perfconfig file option
'unwind.style', or using the argument '--unwind-style' in the commands
'perf report', 'perf script' and 'perf inject', in a similar manner to
the addr2line or the disassembler style.

The file 'tools/perf/util/unwind.c' adds the top-level dispatch
function 'unwind__get_entries'. The backend implementations are
renamed to 'libdw__get_entries' and 'libunwind__get_entries'. Both are
attempted as fallbacks if not configured, or if the primary backend
fails.

Fixes: 2e91915 ("perf build: Remove NO_LIBDW_DWARF_UNWIND option")
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The separate test files only exist to pass a different #include,
instead have a single source file and pass -include to $(CC) to
include the relevant header file for the architecture being
tested. Generate the rules using a foreach loop. Include tests for all
current libunwind architectures.

Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Iterate LIBUNWIND_ARCHS when setting up CONFIG_ and HAVE_ definitions
rather than treating each architecture individually. This sets up the
libunwind build variables and C definitions beyond x86 and
arm/aarch64. The existing naming convention is followed for
compatibility.

Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Move the libunwind register to perf register mapping functions in
arch/../util/unwind-libunwind.c into a new libunwind-arch
directory. Rename the functions to
__get_perf_regnum_for_unw_regnum_<arch>. Add untested ppc32 and s390
functions. Add a get_perf_regnum_for_unw_regnum function that takes an
ELF machine as well as a register number and chooses the appropriate
architecture implementation.

Split the x86 and powerpc 32 and 64-bit implementations apart so that
a single libunwind-<arch>.h header is included.

Move the e_machine into the unwind_info struct to make it easier to
pass.

Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Flush and finish access are relatively simple calls into libunwind,
move them out struct unwind_libunwind_ops. So that the correct version
can be called, add an e_machine variable to maps. This size regression
will go away when the unwind_libunwind_ops no longer need stashing in
the maps. To set the e_machine up pass it into unwind__prepare_access,
which no longer needs to determine the unwind operations based on a
map dso because of this. This also means the maps copying code can
call unwind__prepare_access once for the e_machine rather than once
per map.

Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Local unwinding only works on the machine libunwind is built for,
rather than cross platform, the APIs for remote and local unwinding
are similar but types like unw_word_t depend on the included
header. Place the architecture specific code into the appropriate
libunwind-<arch>.c file. Put generic code in unwind-libunwind.c and
use libunwind-arch to choose the correct implementation based on the
thread's e_machine. Structuring the code this way avoids including the
unwind-libunwind-local.c for each architecture of remote
unwinding. Data is moved into the struct unwind_info to simplify the
architecture and generic code, trying to keep as much code as possible
generic.

Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add a RISC-V implementation for unwinding.

Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/7] perf unwind: Refactor get_entries to allow dynamic libdw/libunwind selection"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 113.99 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/7] perf unwind: Refactor get_entries to allow dynamic libdw/libunwind selection"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1014.95 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/7] perf unwind: Refactor get_entries to allow dynamic libdw/libunwind selection"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1363.41 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/7] perf unwind: Refactor get_entries to allow dynamic libdw/libunwind selection"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 19.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/7] perf unwind: Refactor get_entries to allow dynamic libdw/libunwind selection"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 20.61 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/7] perf unwind: Refactor get_entries to allow dynamic libdw/libunwind selection"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 3.51 seconds
Result: WARNING
Output:

CHECK: Please don't use multiple blank lines
#157: FILE: tools/perf/util/symbol_conf.h:20:
+
+

CHECK: Alignment should match open parenthesis
#179: FILE: tools/perf/util/unwind-libdw.c:343:
+int libdw__get_entries(unwind_entry_cb_t cb, void *arg,
 			struct thread *thread,

CHECK: Alignment should match open parenthesis
#289: FILE: tools/perf/util/unwind-libunwind.c:83:
+int libunwind__get_entries(unwind_entry_cb_t cb, void *arg,
 			 struct thread *thread,

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#293: 
new file mode 100644

CHECK: Lines should not end with a '('
#337: FILE: tools/perf/util/unwind.c:40:
+			pr_warning_once(

total: 0 errors, 1 warnings, 4 checks, 393 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit c542b72cd5a0 ("perf unwind: Refactor get_entries to allow dynamic libdw/libunwind selection") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 4 checks, 393 lines checked
CHECK: Alignment should match open parenthesis
CHECK: Lines should not end with a '('
CHECK: Please don't use multiple blank lines
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/7] perf unwind: Refactor get_entries to allow dynamic libdw/libunwind selection"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 76.68 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/7] perf unwind: Refactor get_entries to allow dynamic libdw/libunwind selection"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 2.96 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/7] perf unwind: Refactor get_entries to allow dynamic libdw/libunwind selection"
kdoc
Desc: Detects for kdoc errors
Duration: 0.75 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/7] perf unwind: Refactor get_entries to allow dynamic libdw/libunwind selection"
module-param
Desc: Detect module_param changes
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/7] perf unwind: Refactor get_entries to allow dynamic libdw/libunwind selection"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/7] perf unwind: Refactor get_entries to allow dynamic libdw/libunwind selection"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/7] tools build: Deduplicate test-libunwind for different architectures"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 114.16 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/7] tools build: Deduplicate test-libunwind for different architectures"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1016.11 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/7] tools build: Deduplicate test-libunwind for different architectures"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1365.01 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/7] tools build: Deduplicate test-libunwind for different architectures"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 18.98 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/7] tools build: Deduplicate test-libunwind for different architectures"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 20.64 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/7] tools build: Deduplicate test-libunwind for different architectures"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.76 seconds
Result: WARNING
Output:

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#145: 
deleted file mode 100644

total: 0 errors, 1 warnings, 0 checks, 106 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 447daf7e2508 ("tools build: Deduplicate test-libunwind for different architectures") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 0 checks, 106 lines checked
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/7] tools build: Deduplicate test-libunwind for different architectures"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 76.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/7] tools build: Deduplicate test-libunwind for different architectures"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/7] tools build: Deduplicate test-libunwind for different architectures"
kdoc
Desc: Detects for kdoc errors
Duration: 2.38 seconds
Result: ERROR
Output:

Checking the tree before the patch
Checking the tree with the patch
Error: Cannot find file tools/build/feature/test-libunwind-aarch64.c
Error: Cannot find file tools/build/feature/test-libunwind-arm.c
Error: Cannot find file tools/build/feature/test-libunwind-debug-frame-aarch64.c
Error: Cannot find file tools/build/feature/test-libunwind-debug-frame-arm.c
Error: Cannot find file tools/build/feature/test-libunwind-x86.c
Error: Cannot find file tools/build/feature/test-libunwind-x86_64.c
Errors and warnings before: 0 this patch: 6
New warnings added
0a1,6
> Error: Cannot find file tools/build/feature/test-libunwind-aarch64.c
> Error: Cannot find file tools/build/feature/test-libunwind-arm.c
> Error: Cannot find file tools/build/feature/test-libunwind-debug-frame-aarch64.c
> Error: Cannot find file tools/build/feature/test-libunwind-debug-frame-arm.c
> Error: Cannot find file tools/build/feature/test-libunwind-x86.c
> Error: Cannot find file tools/build/feature/test-libunwind-x86_64.c
Per-file breakdown


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/7] tools build: Deduplicate test-libunwind for different architectures"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/7] tools build: Deduplicate test-libunwind for different architectures"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 5: "[v5,5/7] perf unwind-libunwind: Move flush/finish access out of local"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 76.84 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 5: "[v5,5/7] perf unwind-libunwind: Move flush/finish access out of local"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 5: "[v5,5/7] perf unwind-libunwind: Move flush/finish access out of local"
kdoc
Desc: Detects for kdoc errors
Duration: 0.72 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 5: "[v5,5/7] perf unwind-libunwind: Move flush/finish access out of local"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 5: "[v5,5/7] perf unwind-libunwind: Move flush/finish access out of local"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 5: "[v5,5/7] perf unwind-libunwind: Move flush/finish access out of local"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[v5,6/7] perf unwind-libunwind: Remove libunwind-local"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 114.49 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[v5,6/7] perf unwind-libunwind: Remove libunwind-local"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1014.54 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[v5,6/7] perf unwind-libunwind: Remove libunwind-local"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1364.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[v5,6/7] perf unwind-libunwind: Remove libunwind-local"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 19.39 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[v5,6/7] perf unwind-libunwind: Remove libunwind-local"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.02 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[v5,6/7] perf unwind-libunwind: Remove libunwind-local"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 74.00 seconds
Result: WARNING
Output:

CHECK: Please use a blank line after function/struct/union/enum declarations
#291: FILE: tools/perf/util/libunwind-arch/libunwind-arch.h:34:
+};
+struct libarch_unwind__proc_info;

CHECK: Alignment should match open parenthesis
#440: FILE: tools/perf/util/libunwind-arch/libunwind-arch.h:210:
+struct unwind_info *__libunwind_arch_unwind_info__new_arm(struct thread *thread,
+							struct perf_sample *sample,

CHECK: Alignment should match open parenthesis
#445: FILE: tools/perf/util/libunwind-arch/libunwind-arch.h:215:
+struct unwind_info *__libunwind_arch_unwind_info__new_arm64(struct thread *thread,
+							struct perf_sample *sample,

CHECK: Alignment should match open parenthesis
#450: FILE: tools/perf/util/libunwind-arch/libunwind-arch.h:220:
+struct unwind_info *__libunwind_arch_unwind_info__new_loongarch(struct thread *thread,
+							struct perf_sample *sample,

CHECK: Alignment should match open parenthesis
#455: FILE: tools/perf/util/libunwind-arch/libunwind-arch.h:225:
+struct unwind_info *__libunwind_arch_unwind_info__new_mips(struct thread *thread,
+							struct perf_sample *sample,

CHECK: Alignment should match open parenthesis
#460: FILE: tools/perf/util/libunwind-arch/libunwind-arch.h:230:
+struct unwind_info *__libunwind_arch_unwind_info__new_ppc32(struct thread *thread,
+							struct perf_sample *sample,

CHECK: Alignment should match open parenthesis
#465: FILE: tools/perf/util/libunwind-arch/libunwind-arch.h:235:
+struct unwind_info *__libunwind_arch_unwind_info__new_ppc64(struct thread *thread,
+							struct perf_sample *sample,

CHECK: Alignment should match open parenthesis
#470: FILE: tools/perf/util/libunwind-arch/libunwind-arch.h:240:
+struct unwind_info *__libunwind_arch_unwind_info__new_s390(struct thread *thread,
+							struct perf_sample *sample,

CHECK: Alignment should match open parenthesis
#475: FILE: tools/perf/util/libunwind-arch/libunwind-arch.h:245:
+struct unwind_info *__libunwind_arch_unwind_info__new_i386(struct thread *thread,
+							struct perf_sample *sample,

CHECK: Alignment should match open parenthesis
#480: FILE: tools/perf/util/libunwind-arch/libunwind-arch.h:250:
+struct unwind_info *__libunwind_arch_unwind_info__new_x86_64(struct thread *thread,
+							struct perf_sample *sample,

CHECK: Alignment should match open parenthesis
#485: FILE: tools/perf/util/libunwind-arch/libunwind-arch.h:255:
+struct unwind_info *libunwind_arch_unwind_info__new(struct thread *thread,
+						struct perf_sample *sample,

CHECK: Please don't use multiple blank lines
#527: FILE: tools/perf/util/libunwind-arch/libunwind-arm.c:40:
+
+

WARNING: Prefer using '"%s...", __func__' to using 'put_unwind_info', this function's name, in a string
#539: FILE: tools/perf/util/libunwind-arch/libunwind-arm.c:52:
+	pr_debug("unwind: put_unwind_info called\n");

WARNING: Prefer using '"%s...", __func__' to using 'access_fpreg', this function's name, in a string
#567: FILE: tools/perf/util/libunwind-arch/libunwind-arm.c:80:
+	pr_err("unwind: access_fpreg unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'resume', this function's name, in a string
#575: FILE: tools/perf/util/libunwind-arch/libunwind-arm.c:88:
+	pr_err("unwind: resume unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'get_proc_name', this function's name, in a string
#584: FILE: tools/perf/util/libunwind-arch/libunwind-arm.c:97:
+	pr_err("unwind: get_proc_name unsupported\n");

CHECK: Alignment should match open parenthesis
#622: FILE: tools/perf/util/libunwind-arch/libunwind-arm.c:135:
+int __libunwind_arch__dwarf_search_unwind_table_arm(void *as __maybe_unused,
+						       uint64_t ip __maybe_unused,

WARNING: line length of 107 exceeds 100 columns
#623: FILE: tools/perf/util/libunwind-arch/libunwind-arm.c:136:
+						       struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 101 exceeds 100 columns
#664: FILE: tools/perf/util/libunwind-arch/libunwind-arm.c:177:
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 104 exceeds 100 columns
#698: FILE: tools/perf/util/libunwind-arch/libunwind-arm.c:211:
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Alignment should match open parenthesis
#698: FILE: tools/perf/util/libunwind-arch/libunwind-arm.c:211:
+struct unwind_info *__libunwind_arch_unwind_info__new_arm(struct thread *thread __maybe_unused,
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Comparison to NULL could be written "!addr_space"
#715: FILE: tools/perf/util/libunwind-arch/libunwind-arm.c:228:
+	if (addr_space == NULL)

WARNING: Prefer using '"%s...", __func__' to using 'put_unwind_info', this function's name, in a string
#811: FILE: tools/perf/util/libunwind-arch/libunwind-arm64.c:51:
+	pr_debug("unwind: put_unwind_info called\n");

WARNING: Prefer using '"%s...", __func__' to using 'access_fpreg', this function's name, in a string
#839: FILE: tools/perf/util/libunwind-arch/libunwind-arm64.c:79:
+	pr_err("unwind: access_fpreg unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'resume', this function's name, in a string
#847: FILE: tools/perf/util/libunwind-arch/libunwind-arm64.c:87:
+	pr_err("unwind: resume unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'get_proc_name', this function's name, in a string
#856: FILE: tools/perf/util/libunwind-arch/libunwind-arm64.c:96:
+	pr_err("unwind: get_proc_name unsupported\n");

CHECK: Alignment should match open parenthesis
#894: FILE: tools/perf/util/libunwind-arch/libunwind-arm64.c:134:
+int __libunwind_arch__dwarf_search_unwind_table_arm64(void *as __maybe_unused,
+						       uint64_t ip __maybe_unused,

WARNING: line length of 107 exceeds 100 columns
#895: FILE: tools/perf/util/libunwind-arch/libunwind-arm64.c:135:
+						       struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 101 exceeds 100 columns
#936: FILE: tools/perf/util/libunwind-arch/libunwind-arm64.c:176:
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

CHECK: Alignment should match open parenthesis
#936: FILE: tools/perf/util/libunwind-arch/libunwind-arm64.c:176:
+int __libunwind_arch__dwarf_find_debug_frame_arm64(int found __maybe_unused,
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 104 exceeds 100 columns
#970: FILE: tools/perf/util/libunwind-arch/libunwind-arm64.c:210:
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Alignment should match open parenthesis
#970: FILE: tools/perf/util/libunwind-arch/libunwind-arm64.c:210:
+struct unwind_info *__libunwind_arch_unwind_info__new_arm64(struct thread *thread __maybe_unused,
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Comparison to NULL could be written "!addr_space"
#987: FILE: tools/perf/util/libunwind-arch/libunwind-arm64.c:227:
+	if (addr_space == NULL)

WARNING: Prefer using '"%s...", __func__' to using 'put_unwind_info', this function's name, in a string
#1083: FILE: tools/perf/util/libunwind-arch/libunwind-i386.c:74:
+	pr_debug("unwind: put_unwind_info called\n");

WARNING: Prefer using '"%s...", __func__' to using 'access_fpreg', this function's name, in a string
#1111: FILE: tools/perf/util/libunwind-arch/libunwind-i386.c:102:
+	pr_err("unwind: access_fpreg unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'resume', this function's name, in a string
#1119: FILE: tools/perf/util/libunwind-arch/libunwind-i386.c:110:
+	pr_err("unwind: resume unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'get_proc_name', this function's name, in a string
#1128: FILE: tools/perf/util/libunwind-arch/libunwind-i386.c:119:
+	pr_err("unwind: get_proc_name unsupported\n");

CHECK: Alignment should match open parenthesis
#1166: FILE: tools/perf/util/libunwind-arch/libunwind-i386.c:157:
+int __libunwind_arch__dwarf_search_unwind_table_i386(void *as __maybe_unused,
+						       uint64_t ip __maybe_unused,

WARNING: line length of 107 exceeds 100 columns
#1167: FILE: tools/perf/util/libunwind-arch/libunwind-i386.c:158:
+						       struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 101 exceeds 100 columns
#1208: FILE: tools/perf/util/libunwind-arch/libunwind-i386.c:199:
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

CHECK: Alignment should match open parenthesis
#1208: FILE: tools/perf/util/libunwind-arch/libunwind-i386.c:199:
+int __libunwind_arch__dwarf_find_debug_frame_i386(int found __maybe_unused,
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 104 exceeds 100 columns
#1242: FILE: tools/perf/util/libunwind-arch/libunwind-i386.c:233:
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Alignment should match open parenthesis
#1242: FILE: tools/perf/util/libunwind-arch/libunwind-i386.c:233:
+struct unwind_info *__libunwind_arch_unwind_info__new_i386(struct thread *thread __maybe_unused,
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Comparison to NULL could be written "!addr_space"
#1259: FILE: tools/perf/util/libunwind-arch/libunwind-i386.c:250:
+	if (addr_space == NULL)

WARNING: Prefer using '"%s...", __func__' to using 'put_unwind_info', this function's name, in a string
#1355: FILE: tools/perf/util/libunwind-arch/libunwind-loongarch.c:59:
+	pr_debug("unwind: put_unwind_info called\n");

WARNING: Prefer using '"%s...", __func__' to using 'access_fpreg', this function's name, in a string
#1383: FILE: tools/perf/util/libunwind-arch/libunwind-loongarch.c:87:
+	pr_err("unwind: access_fpreg unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'resume', this function's name, in a string
#1391: FILE: tools/perf/util/libunwind-arch/libunwind-loongarch.c:95:
+	pr_err("unwind: resume unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'get_proc_name', this function's name, in a string
#1400: FILE: tools/perf/util/libunwind-arch/libunwind-loongarch.c:104:
+	pr_err("unwind: get_proc_name unsupported\n");

CHECK: Alignment should match open parenthesis
#1438: FILE: tools/perf/util/libunwind-arch/libunwind-loongarch.c:142:
+int __libunwind_arch__dwarf_search_unwind_table_loongarch(void *as __maybe_unused,
+						       uint64_t ip __maybe_unused,

WARNING: line length of 107 exceeds 100 columns
#1439: FILE: tools/perf/util/libunwind-arch/libunwind-loongarch.c:143:
+						       struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 101 exceeds 100 columns
#1480: FILE: tools/perf/util/libunwind-arch/libunwind-loongarch.c:184:
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

CHECK: Alignment should match open parenthesis
#1480: FILE: tools/perf/util/libunwind-arch/libunwind-loongarch.c:184:
+int __libunwind_arch__dwarf_find_debug_frame_loongarch(int found __maybe_unused,
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 101 exceeds 100 columns
#1513: FILE: tools/perf/util/libunwind-arch/libunwind-loongarch.c:217:
+struct unwind_info *__libunwind_arch_unwind_info__new_loongarch(struct thread *thread __maybe_unused,

WARNING: line length of 104 exceeds 100 columns
#1514: FILE: tools/perf/util/libunwind-arch/libunwind-loongarch.c:218:
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Alignment should match open parenthesis
#1514: FILE: tools/perf/util/libunwind-arch/libunwind-loongarch.c:218:
+struct unwind_info *__libunwind_arch_unwind_info__new_loongarch(struct thread *thread __maybe_unused,
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Comparison to NULL could be written "!addr_space"
#1531: FILE: tools/perf/util/libunwind-arch/libunwind-loongarch.c:235:
+	if (addr_space == NULL)

WARNING: Prefer using '"%s...", __func__' to using 'put_unwind_info', this function's name, in a string
#1627: FILE: tools/perf/util/libunwind-arch/libunwind-mips.c:61:
+	pr_debug("unwind: put_unwind_info called\n");

WARNING: Prefer using '"%s...", __func__' to using 'access_fpreg', this function's name, in a string
#1655: FILE: tools/perf/util/libunwind-arch/libunwind-mips.c:89:
+	pr_err("unwind: access_fpreg unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'resume', this function's name, in a string
#1663: FILE: tools/perf/util/libunwind-arch/libunwind-mips.c:97:
+	pr_err("unwind: resume unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'get_proc_name', this function's name, in a string
#1672: FILE: tools/perf/util/libunwind-arch/libunwind-mips.c:106:
+	pr_err("unwind: get_proc_name unsupported\n");

CHECK: Alignment should match open parenthesis
#1710: FILE: tools/perf/util/libunwind-arch/libunwind-mips.c:144:
+int __libunwind_arch__dwarf_search_unwind_table_mips(void *as __maybe_unused,
+						       uint64_t ip __maybe_unused,

WARNING: line length of 107 exceeds 100 columns
#1711: FILE: tools/perf/util/libunwind-arch/libunwind-mips.c:145:
+						       struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 101 exceeds 100 columns
#1752: FILE: tools/perf/util/libunwind-arch/libunwind-mips.c:186:
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

CHECK: Alignment should match open parenthesis
#1752: FILE: tools/perf/util/libunwind-arch/libunwind-mips.c:186:
+int __libunwind_arch__dwarf_find_debug_frame_mips(int found __maybe_unused,
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 104 exceeds 100 columns
#1786: FILE: tools/perf/util/libunwind-arch/libunwind-mips.c:220:
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Alignment should match open parenthesis
#1786: FILE: tools/perf/util/libunwind-arch/libunwind-mips.c:220:
+struct unwind_info *__libunwind_arch_unwind_info__new_mips(struct thread *thread __maybe_unused,
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Comparison to NULL could be written "!addr_space"
#1803: FILE: tools/perf/util/libunwind-arch/libunwind-mips.c:237:
+	if (addr_space == NULL)

WARNING: Prefer using '"%s...", __func__' to using 'put_unwind_info', this function's name, in a string
#1899: FILE: tools/perf/util/libunwind-arch/libunwind-ppc32.c:63:
+	pr_debug("unwind: put_unwind_info called\n");

WARNING: Prefer using '"%s...", __func__' to using 'access_fpreg', this function's name, in a string
#1927: FILE: tools/perf/util/libunwind-arch/libunwind-ppc32.c:91:
+	pr_err("unwind: access_fpreg unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'resume', this function's name, in a string
#1935: FILE: tools/perf/util/libunwind-arch/libunwind-ppc32.c:99:
+	pr_err("unwind: resume unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'get_proc_name', this function's name, in a string
#1944: FILE: tools/perf/util/libunwind-arch/libunwind-ppc32.c:108:
+	pr_err("unwind: get_proc_name unsupported\n");

CHECK: Alignment should match open parenthesis
#1982: FILE: tools/perf/util/libunwind-arch/libunwind-ppc32.c:146:
+int __libunwind_arch__dwarf_search_unwind_table_ppc32(void *as __maybe_unused,
+						       uint64_t ip __maybe_unused,

WARNING: line length of 107 exceeds 100 columns
#1983: FILE: tools/perf/util/libunwind-arch/libunwind-ppc32.c:147:
+						       struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 101 exceeds 100 columns
#2024: FILE: tools/perf/util/libunwind-arch/libunwind-ppc32.c:188:
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

CHECK: Alignment should match open parenthesis
#2024: FILE: tools/perf/util/libunwind-arch/libunwind-ppc32.c:188:
+int __libunwind_arch__dwarf_find_debug_frame_ppc32(int found __maybe_unused,
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 104 exceeds 100 columns
#2058: FILE: tools/perf/util/libunwind-arch/libunwind-ppc32.c:222:
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Alignment should match open parenthesis
#2058: FILE: tools/perf/util/libunwind-arch/libunwind-ppc32.c:222:
+struct unwind_info *__libunwind_arch_unwind_info__new_ppc32(struct thread *thread __maybe_unused,
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Comparison to NULL could be written "!addr_space"
#2075: FILE: tools/perf/util/libunwind-arch/libunwind-ppc32.c:239:
+	if (addr_space == NULL)

WARNING: Prefer using '"%s...", __func__' to using 'put_unwind_info', this function's name, in a string
#2171: FILE: tools/perf/util/libunwind-arch/libunwind-ppc64.c:65:
+	pr_debug("unwind: put_unwind_info called\n");

WARNING: Prefer using '"%s...", __func__' to using 'access_fpreg', this function's name, in a string
#2199: FILE: tools/perf/util/libunwind-arch/libunwind-ppc64.c:93:
+	pr_err("unwind: access_fpreg unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'resume', this function's name, in a string
#2207: FILE: tools/perf/util/libunwind-arch/libunwind-ppc64.c:101:
+	pr_err("unwind: resume unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'get_proc_name', this function's name, in a string
#2216: FILE: tools/perf/util/libunwind-arch/libunwind-ppc64.c:110:
+	pr_err("unwind: get_proc_name unsupported\n");

CHECK: Alignment should match open parenthesis
#2254: FILE: tools/perf/util/libunwind-arch/libunwind-ppc64.c:148:
+int __libunwind_arch__dwarf_search_unwind_table_ppc64(void *as __maybe_unused,
+						       uint64_t ip __maybe_unused,

WARNING: line length of 107 exceeds 100 columns
#2255: FILE: tools/perf/util/libunwind-arch/libunwind-ppc64.c:149:
+						       struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 101 exceeds 100 columns
#2296: FILE: tools/perf/util/libunwind-arch/libunwind-ppc64.c:190:
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

CHECK: Alignment should match open parenthesis
#2296: FILE: tools/perf/util/libunwind-arch/libunwind-ppc64.c:190:
+int __libunwind_arch__dwarf_find_debug_frame_ppc64(int found __maybe_unused,
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 104 exceeds 100 columns
#2330: FILE: tools/perf/util/libunwind-arch/libunwind-ppc64.c:224:
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Alignment should match open parenthesis
#2330: FILE: tools/perf/util/libunwind-arch/libunwind-ppc64.c:224:
+struct unwind_info *__libunwind_arch_unwind_info__new_ppc64(struct thread *thread __maybe_unused,
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Comparison to NULL could be written "!addr_space"
#2347: FILE: tools/perf/util/libunwind-arch/libunwind-ppc64.c:241:
+	if (addr_space == NULL)

WARNING: Prefer using '"%s...", __func__' to using 'put_unwind_info', this function's name, in a string
#2443: FILE: tools/perf/util/libunwind-arch/libunwind-s390.c:61:
+	pr_debug("unwind: put_unwind_info called\n");

WARNING: Prefer using '"%s...", __func__' to using 'access_fpreg', this function's name, in a string
#2471: FILE: tools/perf/util/libunwind-arch/libunwind-s390.c:89:
+	pr_err("unwind: access_fpreg unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'resume', this function's name, in a string
#2479: FILE: tools/perf/util/libunwind-arch/libunwind-s390.c:97:
+	pr_err("unwind: resume unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'get_proc_name', this function's name, in a string
#2488: FILE: tools/perf/util/libunwind-arch/libunwind-s390.c:106:
+	pr_err("unwind: get_proc_name unsupported\n");

CHECK: Alignment should match open parenthesis
#2526: FILE: tools/perf/util/libunwind-arch/libunwind-s390.c:144:
+int __libunwind_arch__dwarf_search_unwind_table_s390(void *as __maybe_unused,
+						       uint64_t ip __maybe_unused,

WARNING: line length of 107 exceeds 100 columns
#2527: FILE: tools/perf/util/libunwind-arch/libunwind-s390.c:145:
+						       struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 101 exceeds 100 columns
#2568: FILE: tools/perf/util/libunwind-arch/libunwind-s390.c:186:
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

CHECK: Alignment should match open parenthesis
#2568: FILE: tools/perf/util/libunwind-arch/libunwind-s390.c:186:
+int __libunwind_arch__dwarf_find_debug_frame_s390(int found __maybe_unused,
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 104 exceeds 100 columns
#2602: FILE: tools/perf/util/libunwind-arch/libunwind-s390.c:220:
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Alignment should match open parenthesis
#2602: FILE: tools/perf/util/libunwind-arch/libunwind-s390.c:220:
+struct unwind_info *__libunwind_arch_unwind_info__new_s390(struct thread *thread __maybe_unused,
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Comparison to NULL could be written "!addr_space"
#2619: FILE: tools/perf/util/libunwind-arch/libunwind-s390.c:237:
+	if (addr_space == NULL)

WARNING: Prefer using '"%s...", __func__' to using 'put_unwind_info', this function's name, in a string
#2715: FILE: tools/perf/util/libunwind-arch/libunwind-x86_64.c:83:
+	pr_debug("unwind: put_unwind_info called\n");

WARNING: Prefer using '"%s...", __func__' to using 'access_fpreg', this function's name, in a string
#2743: FILE: tools/perf/util/libunwind-arch/libunwind-x86_64.c:111:
+	pr_err("unwind: access_fpreg unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'resume', this function's name, in a string
#2751: FILE: tools/perf/util/libunwind-arch/libunwind-x86_64.c:119:
+	pr_err("unwind: resume unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'get_proc_name', this function's name, in a string
#2760: FILE: tools/perf/util/libunwind-arch/libunwind-x86_64.c:128:
+	pr_err("unwind: get_proc_name unsupported\n");

WARNING: line length of 107 exceeds 100 columns
#2799: FILE: tools/perf/util/libunwind-arch/libunwind-x86_64.c:167:
+						       struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 101 exceeds 100 columns
#2840: FILE: tools/perf/util/libunwind-arch/libunwind-x86_64.c:208:
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

CHECK: Alignment should match open parenthesis
#2840: FILE: tools/perf/util/libunwind-arch/libunwind-x86_64.c:208:
+int __libunwind_arch__dwarf_find_debug_frame_x86_64(int found __maybe_unused,
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 104 exceeds 100 columns
#2874: FILE: tools/perf/util/libunwind-arch/libunwind-x86_64.c:242:
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Comparison to NULL could be written "!addr_space"
#2891: FILE: tools/perf/util/libunwind-arch/libunwind-x86_64.c:259:
+	if (addr_space == NULL)

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#2954: 
deleted file mode 100644

WARNING: Macros with flow control statements should be avoided
#3986: FILE: tools/perf/util/unwind-libunwind.c:52:
+#define dw_read(ptr, type, end) ({	\
+	type *__p = (type *) ptr;	\
+	type  __v;			\
+	if ((__p + 1) > (type *) end)	\
+		return -EINVAL;		\
+	__v = *__p++;			\
+	ptr = (typeof(ptr)) __p;	\
+	__v;				\
+	})

CHECK: No space is necessary after a cast
#3989: FILE: tools/perf/util/unwind-libunwind.c:55:
+	if ((__p + 1) > (type *) end)	\

CHECK: No space is necessary after a cast
#3992: FILE: tools/perf/util/unwind-libunwind.c:58:
+	ptr = (typeof(ptr)) __p;	\

CHECK: No space is necessary after a cast
#4017: FILE: tools/perf/util/unwind-libunwind.c:83:
+		*val = (unsigned long) cur;

CHECK: Macro argument 'ptr' may be better as '(ptr)' to avoid precedence issues
#4048: FILE: tools/perf/util/unwind-libunwind.c:114:
+#define dw_read_encoded_value(ptr, end, enc) ({			\
+	u64 __v;						\
+	if (__dw_read_encoded_value(&ptr, end, &__v, enc)) {	\
+		return -EINVAL;                                 \
+	}                                                       \
+	__v;                                                    \
+	})

WARNING: Macros with flow control statements should be avoided
#4048: FILE: tools/perf/util/unwind-libunwind.c:114:
+#define dw_read_encoded_value(ptr, end, enc) ({			\
+	u64 __v;						\
+	if (__dw_read_encoded_value(&ptr, end, &__v, enc)) {	\
+		return -EINVAL;                                 \
+	}                                                       \
+	__v;                                                    \
+	})

CHECK: Comparison to NULL could be written "!elf"
#4063: FILE: tools/perf/util/unwind-libunwind.c:129:
+	if (elf == NULL)

CHECK: No space is necessary after a cast
#4106: FILE: tools/perf/util/unwind-libunwind.c:172:
+	u8 *enc = (u8 *) &hdr.enc;

CHECK: No space is necessary after a cast
#4107: FILE: tools/perf/util/unwind-libunwind.c:173:
+	u8 *end = (u8 *) &hdr.data;

CHECK: No space is necessary after a cast
#4110: FILE: tools/perf/util/unwind-libunwind.c:176:
+	r = dso__data_read_offset(dso, machine, offset, (u8 *) &hdr, sizeof(hdr));

CHECK: No space is necessary after a cast
#4118: FILE: tools/perf/util/unwind-libunwind.c:184:
+	*table_data_offset = enc - (u8 *) &hdr;

CHECK: Blank lines aren't necessary after an open brace '{'
#4129: FILE: tools/perf/util/unwind-libunwind.c:195:
+{
+

CHECK: Comparison to NULL could be written "!elf"
#4146: FILE: tools/perf/util/unwind-libunwind.c:212:
+	if (elf == NULL)

CHECK: Comparison to NULL could be written "!gelf_getehdr"
#4149: FILE: tools/perf/util/unwind-libunwind.c:215:
+	if (gelf_getehdr(elf, &ehdr) == NULL)

CHECK: Alignment should match open parenthesis
#4193: FILE: tools/perf/util/unwind-libunwind.c:259:
+	ret = unwind_spec_ehframe(dso, ui->machine, dso__data(dso)->eh_frame_hdr_offset,
+				   table_data, fde_count);

CHECK: Comparison to NULL could be written "!debuglink"
#4241: FILE: tools/perf/util/unwind-libunwind.c:307:
+			if (debuglink == NULL) {

CHECK: Lines should not end with a '('
#4246: FILE: tools/perf/util/unwind-libunwind.c:312:
+			ret = dso__read_binary_type_filename(

CHECK: Alignment should match open parenthesis
#4253: FILE: tools/perf/util/unwind-libunwind.c:319:
+					ofs = elf_section_offset(fd,
+							".debug_frame");

CHECK: Comparison to NULL could be written "dso__symsrc_filename"
#4258: FILE: tools/perf/util/unwind-libunwind.c:324:
+				if (dso__symsrc_filename(dso) != NULL) {

CHECK: Lines should not end with a '('
#4259: FILE: tools/perf/util/unwind-libunwind.c:325:
+					pr_warning(

CHECK: Comparison to NULL could be written "!elf"
#4304: FILE: tools/perf/util/unwind-libunwind.c:367:
+	if (elf == NULL)

CHECK: Comparison to NULL could be written "!gelf_getehdr"
#4306: FILE: tools/perf/util/unwind-libunwind.c:369:
+	if (gelf_getehdr(elf, &ehdr) == NULL)

WARNING: Prefer using '"%s...", __func__' to using 'elf_is_exec', this function's name, in a string
#4313: FILE: tools/perf/util/unwind-libunwind.c:376:
+	pr_debug3("unwind: elf_is_exec(%s): %d\n", name, retval);

WARNING: line length of 103 exceeds 100 columns
#4373: FILE: tools/perf/util/unwind-libunwind.c:436:
+			ret = libunwind_arch__dwarf_search_unwind_table(ui->e_machine, as, ip, &di, pi,

CHECK: No space is necessary after a cast
#4402: FILE: tools/perf/util/unwind-libunwind.c:465:
+				   (u8 *) data_word,

WARNING: quoted string split across lines
#4440: FILE: tools/perf/util/unwind-libunwind.c:503:
+			pr_debug3("unwind: access_mem %p not inside range"
+				  " 0x%" PRIx64 "-0x%" PRIx64 "\n",

CHECK: No space is necessary after a cast
#4441: FILE: tools/perf/util/unwind-libunwind.c:504:
+				  (void *) (uintptr_t) addr, start, end);

CHECK: No space is necessary after a cast
#4451: FILE: tools/perf/util/unwind-libunwind.c:514:
+		  (void *) (uintptr_t) addr, *((unsigned long *)valp_word), offset);

CHECK: No space is necessary after a cast
#4556: FILE: tools/perf/util/unwind-libunwind.c:607:
+		 al.map ? map__map_ip(al.map, ip) : (u64) 0);

WARNING: line length of 106 exceeds 100 columns
#4601: FILE: tools/perf/util/unwind-libunwind.c:647:
+	ui = libunwind_arch_unwind_info__new(thread, sample, max_stack, best_effort, e_machine, first_ip);

total: 0 errors, 71 warnings, 69 checks, 3596 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit ddd14baf41b9 ("perf unwind-libunwind: Remove libunwind-local") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 71 warnings, 69 checks, 3596 lines checked
CHECK: Alignment should match open parenthesis
CHECK: Blank lines aren't necessary after an open brace '{'
CHECK: Comparison to NULL could be written "!addr_space"
CHECK: Comparison to NULL could be written "!debuglink"
CHECK: Comparison to NULL could be written "!elf"
CHECK: Comparison to NULL could be written "!gelf_getehdr"
CHECK: Comparison to NULL could be written "dso__symsrc_filename"
CHECK: Lines should not end with a '('
CHECK: Macro argument 'ptr' may be better as '(ptr)' to avoid precedence issues
CHECK: No space is necessary after a cast
CHECK: Please don't use multiple blank lines
CHECK: Please use a blank line after function/struct/union/enum declarations
WARNING: Macros with flow control statements should be avoided
WARNING: Prefer using '"%s...", __func__' to using 'access_fpreg', this function's name, in a string
WARNING: Prefer using '"%s...", __func__' to using 'elf_is_exec', this function's name, in a string
WARNING: Prefer using '"%s...", __func__' to using 'get_proc_name', this function's name, in a string
WARNING: Prefer using '"%s...", __func__' to using 'put_unwind_info', this function's name, in a string
WARNING: Prefer using '"%s...", __func__' to using 'resume', this function's name, in a string
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
WARNING: line length of 101 exceeds 100 columns
WARNING: line length of 103 exceeds 100 columns
WARNING: line length of 104 exceeds 100 columns
WARNING: line length of 106 exceeds 100 columns
WARNING: line length of 107 exceeds 100 columns
WARNING: quoted string split across lines


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[v5,6/7] perf unwind-libunwind: Remove libunwind-local"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 77.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[v5,6/7] perf unwind-libunwind: Remove libunwind-local"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[v5,6/7] perf unwind-libunwind: Remove libunwind-local"
kdoc
Desc: Detects for kdoc errors
Duration: 1.69 seconds
Result: ERROR
Output:

Checking the tree before the patch
Checking the tree with the patch
Error: Cannot find file tools/perf/util/libunwind/arm64.c
Error: Cannot find file tools/perf/util/libunwind/x86_32.c
Error: Cannot find file tools/perf/util/unwind-libunwind-local.c
Errors and warnings before: 0 this patch: 3
New warnings added
0a1,3
> Error: Cannot find file tools/perf/util/libunwind/arm64.c
> Error: Cannot find file tools/perf/util/libunwind/x86_32.c
> Error: Cannot find file tools/perf/util/unwind-libunwind-local.c
Per-file breakdown


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[v5,6/7] perf unwind-libunwind: Remove libunwind-local"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[v5,6/7] perf unwind-libunwind: Remove libunwind-local"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[v5,6/7] perf unwind-libunwind: Remove libunwind-local"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v5,7/7] perf unwind-libunwind: Add RISC-V libunwind support"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 113.70 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v5,7/7] perf unwind-libunwind: Add RISC-V libunwind support"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1015.01 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v5,7/7] perf unwind-libunwind: Add RISC-V libunwind support"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1369.35 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v5,7/7] perf unwind-libunwind: Add RISC-V libunwind support"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 19.56 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v5,7/7] perf unwind-libunwind: Add RISC-V libunwind support"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 20.73 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v5,7/7] perf unwind-libunwind: Add RISC-V libunwind support"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.40 seconds
Result: WARNING
Output:

CHECK: Alignment should match open parenthesis
#152: FILE: tools/perf/util/libunwind-arch/libunwind-arch.h:119:
+int __libunwind_arch__dwarf_search_unwind_table_riscv(void *as, uint64_t ip,
+						     struct libarch_unwind__dyn_info *di,

CHECK: Alignment should match open parenthesis
#164: FILE: tools/perf/util/libunwind-arch/libunwind-arch.h:189:
+int __libunwind_arch__dwarf_find_debug_frame_riscv(int found,
+						  struct libarch_unwind__dyn_info *di_debug,

CHECK: Alignment should match open parenthesis
#178: FILE: tools/perf/util/libunwind-arch/libunwind-arch.h:256:
+struct unwind_info *__libunwind_arch_unwind_info__new_riscv(struct thread *thread,
+							struct perf_sample *sample,

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#194: 
new file mode 100644

WARNING: Prefer using '"%s...", __func__' to using 'put_unwind_info', this function's name, in a string
#257: FILE: tools/perf/util/libunwind-arch/libunwind-riscv.c:59:
+	pr_debug("unwind: put_unwind_info called\n");

WARNING: Prefer using '"%s...", __func__' to using 'access_fpreg', this function's name, in a string
#285: FILE: tools/perf/util/libunwind-arch/libunwind-riscv.c:87:
+	pr_err("unwind: access_fpreg unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'resume', this function's name, in a string
#293: FILE: tools/perf/util/libunwind-arch/libunwind-riscv.c:95:
+	pr_err("unwind: resume unsupported\n");

WARNING: Prefer using '"%s...", __func__' to using 'get_proc_name', this function's name, in a string
#302: FILE: tools/perf/util/libunwind-arch/libunwind-riscv.c:104:
+	pr_err("unwind: get_proc_name unsupported\n");

CHECK: Alignment should match open parenthesis
#340: FILE: tools/perf/util/libunwind-arch/libunwind-riscv.c:142:
+int __libunwind_arch__dwarf_search_unwind_table_riscv(void *as __maybe_unused,
+						       uint64_t ip __maybe_unused,

WARNING: line length of 107 exceeds 100 columns
#341: FILE: tools/perf/util/libunwind-arch/libunwind-riscv.c:143:
+						       struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 101 exceeds 100 columns
#382: FILE: tools/perf/util/libunwind-arch/libunwind-riscv.c:184:
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

CHECK: Alignment should match open parenthesis
#382: FILE: tools/perf/util/libunwind-arch/libunwind-riscv.c:184:
+int __libunwind_arch__dwarf_find_debug_frame_riscv(int found __maybe_unused,
+						 struct libarch_unwind__dyn_info *_di __maybe_unused,

WARNING: line length of 104 exceeds 100 columns
#416: FILE: tools/perf/util/libunwind-arch/libunwind-riscv.c:218:
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Alignment should match open parenthesis
#416: FILE: tools/perf/util/libunwind-arch/libunwind-riscv.c:218:
+struct unwind_info *__libunwind_arch_unwind_info__new_riscv(struct thread *thread __maybe_unused,
+							     struct perf_sample *sample  __maybe_unused,

CHECK: Comparison to NULL could be written "!addr_space"
#433: FILE: tools/perf/util/libunwind-arch/libunwind-riscv.c:235:
+	if (addr_space == NULL)

total: 0 errors, 8 warnings, 7 checks, 443 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 44d60d0c252c ("perf unwind-libunwind: Add RISC-V libunwind support") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 8 warnings, 7 checks, 443 lines checked
CHECK: Alignment should match open parenthesis
CHECK: Comparison to NULL could be written "!addr_space"
WARNING: Prefer using '"%s...", __func__' to using 'access_fpreg', this function's name, in a string
WARNING: Prefer using '"%s...", __func__' to using 'get_proc_name', this function's name, in a string
WARNING: Prefer using '"%s...", __func__' to using 'put_unwind_info', this function's name, in a string
WARNING: Prefer using '"%s...", __func__' to using 'resume', this function's name, in a string
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
WARNING: line length of 101 exceeds 100 columns
WARNING: line length of 104 exceeds 100 columns
WARNING: line length of 107 exceeds 100 columns


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v5,7/7] perf unwind-libunwind: Add RISC-V libunwind support"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 76.56 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v5,7/7] perf unwind-libunwind: Add RISC-V libunwind support"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v5,7/7] perf unwind-libunwind: Add RISC-V libunwind support"
kdoc
Desc: Detects for kdoc errors
Duration: 0.75 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v5,7/7] perf unwind-libunwind: Add RISC-V libunwind support"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v5,7/7] perf unwind-libunwind: Add RISC-V libunwind support"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v5,7/7] perf unwind-libunwind: Add RISC-V libunwind support"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.26 seconds
Result: PASS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants