Skip to content

tools: Fix rtla and rv problems (found) with clang

Daniel Bristot de Oliveira linux-trace-kernel lkml llvm stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6tools/rtla: Fix Makefile compiler options for clangtools/tracing/rtla/Makefile+6 -12 replies
2/6tools/rtla: Fix uninitialized bucket/data->bucket_size warningtools/tracing/rtla/src/osnoise_hist.c tools/tracing/rtla/src/timerlat_hist.c+2 -40 replies
3/6tools/rtla: Fix clang warning about mount_point var sizetools/tracing/rtla/src/utils.c+1 -10 replies
4/6tools/rtla: Remove unused sched_getattr() functiontools/tracing/rtla/src/utils.c+0 -60 replies
5/6tools/rv: Fix Makefile compiler options for clangtools/verification/rv/Makefile+6 -10 replies
6/6tools/rv: Fix curr_reactor uninitialized variabletools/verification/rv/src/in_kernel.c+1 -10 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/6] tools: Fix rtla and rv problems (found) with clang

RHEL people reported some errors when compiling rtla and rv with clang. The command line used to compile the tools is:

$ make HOSTCC=clang CC=clang LLVM_IAS=1

The first problem is two unsupported flags passed to the compiler:
-ffat-lto-objects and -Wno-maybe-uninitialized. They will be removed if the compile is clang.

Also, the clang linker does not automatically recognize the -flto=auto option used at compilation time, so it is explicitly set.

With the compiler working, it starts pointing to some warnings and errors about uninitialized variables, variable size, and an unused function. These problems are also fixed.

Daniel Bristot de Oliveira (6):
tools/rtla: Fix Makefile compiler options for clang tools/rtla: Fix uninitialized bucket/data->bucket_size warning tools/rtla: Fix clang warning about mount_point var size tools/rtla: Remove unused sched_getattr() function tools/rv: Fix Makefile compiler options for clang tools/rv: Fix curr_reactor uninitialized variable

 tools/tracing/rtla/Makefile            | 7 ++++++-
 tools/tracing/rtla/src/osnoise_hist.c  | 3 +--
 tools/tracing/rtla/src/timerlat_hist.c | 3 +--
 tools/tracing/rtla/src/utils.c         | 8 +-------
 tools/verification/rv/Makefile         | 7 ++++++-
 tools/verification/rv/src/in_kernel.c  | 2 +-
 6 files changed, 16 insertions(+), 14 deletions(-)
Signature · 1 line
2.43.0