Perf build support for -Wshorten-64-to-32
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest47 patches 10 repliesIn review
- v148 patches 21 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/47 | perf build: Avoid building libbpf/bpftool with LIBBPF_DYNAMICtools/ | +12 | 0 replies | |
| 2/47 | perf tests: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ +10 more | +34 | 0 replies | |
| 3/47 | perf ui: Silence -Wshorten-64-to-32 warningstools/ tools/ | +10 | 0 replies | |
| 4/47 | perf bench: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ +10 more | +43 | 9 replies | |
| 5/47 | arm64: cputype: Silence -Wshorten-64-to-32 warningstools/ | +1 | 1 reply | |
| 6/47 | x86/insn: Silence -Wshorten-64-to-32 warningstools/ | +1 | 0 replies | |
| 7/47 | tools lib: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ +1 more | +9 | 0 replies | |
| 8/47 | libperf: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ +10 more | +46 | 0 replies | |
| 9/47 | tools subcmd: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ | +24 | 0 replies | |
| 10/47 | perf arch x86: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ +10 more | +54 | 0 replies | |
| 11/47 | perf arm-spe: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ | +15 | 0 replies | |
| 12/47 | perf trace: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ +24 more | +94 | 0 replies | |
| 13/47 | perf trace-event: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ +3 more | +24 | 0 replies | |
| 14/47 | perf jvmti: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ | +17 | 0 replies | |
| 15/47 | perf pmu: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ +1 more | +17 | 0 replies | |
| 16/47 | perf annotate powerpc: Silence -Wshorten-64-to-32 warningstools/ | +1 | 0 replies | |
| 17/47 | perf s390: Silence -Wshorten-64-to-32 warningstools/ | +2 | 0 replies | |
| 18/47 | perf cs-etm: Silence -Wshorten-64-to-32 warningstools/ | +2 | 0 replies | |
| 19/47 | perf stat: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ | +15 | 0 replies | |
| 20/47 | perf dlfilter: Silence -Wshorten-64-to-32 warningstools/ tools/ | +7 | 0 replies | |
| 21/47 | perf demangle: Silence -Wshorten-64-to-32 warningstools/ tools/ | +3 | 0 replies | |
| 22/47 | perf annotate: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ | +19 | 0 replies | |
| 23/47 | perf report: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ +2 more | +13 | 0 replies | |
| 24/47 | perf help: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ | +19 | 0 replies | |
| 25/47 | perf hisi-ptt: Silence -Wshorten-64-to-32 warningstools/ | +4 | 0 replies | |
| 26/47 | perf probe: Silence -Wshorten-64-to-32 warningstools/ tools/ | +14 | 0 replies | |
| 27/47 | perf kwork: Silence -Wshorten-64-to-32 warningstools/ tools/ | +6 | 0 replies | |
| 28/47 | perf buildid: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ | +3 | 0 replies | |
| 29/47 | perf lock: Silence -Wshorten-64-to-32 warningstools/ tools/ | +17 | 0 replies | |
| 30/47 | perf mem: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ +2 more | +38 | 0 replies | |
| 31/47 | perf script: Silence -Wshorten-64-to-32 warningstools/ tools/ | +27 | 0 replies | |
| 32/47 | perf evlist: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ | +30 | 0 replies | |
| 33/47 | perf bpf_counter: Silence -Wshorten-64-to-32 warningstools/ tools/ | +4 | 0 replies | |
| 34/47 | perf ftrace: Silence -Wshorten-64-to-32 warningstools/ tools/ | +13 | 0 replies | |
| 35/47 | perf record: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ +3 more | +55 | 0 replies | |
| 36/47 | perf inject: Silence -Wshorten-64-to-32 warningstools/ | +14 | 0 replies | |
| 37/47 | perf sched: Silence -Wshorten-64-to-32 warningstools/ | +28 | 0 replies | |
| 38/47 | perf timechart: Silence -Wshorten-64-to-32 warningstools/ | +32 | 0 replies | |
| 39/47 | perf list: Silence -Wshorten-64-to-32 warningstools/ | +2 | 0 replies | |
| 40/47 | perf kvm: Silence -Wshorten-64-to-32 warningstools/ | +4 | 0 replies | |
| 41/47 | perf diff: Silence -Wshorten-64-to-32 warningstools/ | +5 | 0 replies | |
| 42/47 | perf daemon: Silence -Wshorten-64-to-32 warningstools/ | +3 | 0 replies | |
| 43/47 | perf zlib: Silence -Wshorten-64-to-32 warningstools/ | +1 | 0 replies | |
| 44/47 | perf symbol: Silence -Wshorten-64-to-32 warningstools/ tools/ | +22 | 0 replies | |
| 45/47 | perf util: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ +12 more | +50 | 0 replies | |
| 46/47 | perf hashmap: Silence -Wshorten-64-to-32 warningstools/ | +5 | 0 replies | |
| 47/47 | perf: Silence -Wshorten-64-to-32 warningstools/ tools/ tools/ +16 more | +104 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 00/47] Perf build support for -Wshorten-64-to-32
The clang warning -Wshorten-64-to-32 can be useful to catch inadvertent truncation. In some instances this truncation can lead to changing the sign of a result, for example, truncation to return an int to fit a sort routine. Leo Yan found an issue here:
https://lore.kernel.org/lkml/[email protected]/
and so it is worthwhile doing a round to clean up all these warnings.
So that libbpf and bpftool aren't also cleaned up the first patch makes these more optional within the build. The rest of the patches try to do the right thing in silencing the warning, generally making the implicit casts explicit. Some issues similar to Leo's were discovered in this process.
v2: Move the truncation error fixes to patches 2 and 3 in the series
(Leo Yan). Rebase and fix issues with the changed files. Drop the linux header patches that are now their own series (Yury Norov) and we can pick those fixes up when the kernel changes land.
https://lore.kernel.org/lkml/[email protected]/
Ian Rogers (47):
perf build: Avoid building libbpf/bpftool with LIBBPF_DYNAMIC perf tests: Silence -Wshorten-64-to-32 warnings perf ui: Silence -Wshorten-64-to-32 warnings
perf bench: Silence -Wshorten-64-to-32 warnings
arm64: cputype: Silence -Wshorten-64-to-32 warnings x86/insn: Silence -Wshorten-64-to-32 warnings
tools lib: Silence -Wshorten-64-to-32 warnings
libperf: Silence -Wshorten-64-to-32 warnings
tools subcmd: Silence -Wshorten-64-to-32 warnings perf arch x86: Silence -Wshorten-64-to-32 warnings perf arm-spe: Silence -Wshorten-64-to-32 warnings perf trace: Silence -Wshorten-64-to-32 warnings perf trace-event: Silence -Wshorten-64-to-32 warnings perf jvmti: Silence -Wshorten-64-to-32 warnings perf pmu: Silence -Wshorten-64-to-32 warnings
perf annotate powerpc: Silence -Wshorten-64-to-32 warnings perf s390: Silence -Wshorten-64-to-32 warnings
perf cs-etm: Silence -Wshorten-64-to-32 warnings perf stat: Silence -Wshorten-64-to-32 warnings
perf dlfilter: Silence -Wshorten-64-to-32 warnings perf demangle: Silence -Wshorten-64-to-32 warnings perf annotate: Silence -Wshorten-64-to-32 warnings perf report: Silence -Wshorten-64-to-32 warnings perf help: Silence -Wshorten-64-to-32 warnings
perf hisi-ptt: Silence -Wshorten-64-to-32 warnings perf probe: Silence -Wshorten-64-to-32 warnings perf kwork: Silence -Wshorten-64-to-32 warnings perf buildid: Silence -Wshorten-64-to-32 warnings perf lock: Silence -Wshorten-64-to-32 warnings
perf mem: Silence -Wshorten-64-to-32 warnings
perf script: Silence -Wshorten-64-to-32 warnings perf evlist: Silence -Wshorten-64-to-32 warnings perf bpf_counter: Silence -Wshorten-64-to-32 warnings perf ftrace: Silence -Wshorten-64-to-32 warnings perf record: Silence -Wshorten-64-to-32 warnings perf inject: Silence -Wshorten-64-to-32 warnings perf sched: Silence -Wshorten-64-to-32 warnings perf timechart: Silence -Wshorten-64-to-32 warnings perf list: Silence -Wshorten-64-to-32 warnings
perf kvm: Silence -Wshorten-64-to-32 warnings
perf diff: Silence -Wshorten-64-to-32 warnings
perf daemon: Silence -Wshorten-64-to-32 warnings perf zlib: Silence -Wshorten-64-to-32 warnings
perf symbol: Silence -Wshorten-64-to-32 warnings perf util: Silence -Wshorten-64-to-32 warnings
perf hashmap: Silence -Wshorten-64-to-32 warnings
perf: Silence -Wshorten-64-to-32 warnings
tools/arch/arm64/include/asm/cputype.h | 2 +- tools/arch/x86/lib/insn.c | 2 +- tools/lib/api/fs/fs.c | 4 +- tools/lib/bitmap.c | 2 +- tools/lib/perf/cpumap.c | 18 ++-- tools/lib/perf/evsel.c | 40 +++----- tools/lib/perf/include/internal/cpumap.h | 2 +- tools/lib/perf/include/internal/evsel.h | 2 +- tools/lib/perf/include/internal/lib.h | 2 +- tools/lib/perf/include/internal/mmap.h | 4 +- tools/lib/perf/include/internal/threadmap.h | 2 +- tools/lib/perf/include/internal/xyarray.h | 8 +- tools/lib/perf/include/perf/cpumap.h | 3 +- tools/lib/perf/lib.c | 2 +- tools/lib/perf/mmap.c | 13 ++- tools/lib/perf/threadmap.c | 4 +- tools/lib/perf/xyarray.c | 2 +- tools/lib/string.c | 6 +- tools/lib/subcmd/help.c | 28 +++--- tools/lib/subcmd/help.h | 6 -- tools/lib/subcmd/parse-options.c | 16 +-- tools/lib/vsprintf.c | 6 +- tools/perf/Makefile.perf | 13 ++- .../perf/arch/powerpc/annotate/instructions.c | 2 +- tools/perf/arch/x86/tests/bp-modify.c | 2 +- tools/perf/arch/x86/util/intel-bts.c | 4 +- tools/perf/arch/x86/util/intel-pt.c | 10 +- tools/perf/arch/x86/util/iostat.c | 2 +- tools/perf/arch/x86/util/kvm-stat.c | 6 +- tools/perf/arch/x86/util/perf_regs.c | 3 +- tools/perf/arch/x86/util/topdown.c | 2 +- tools/perf/bench/breakpoint.c | 8 +- tools/perf/bench/epoll-wait.c | 3 +- tools/perf/bench/evlist-open-close.c | 8 +- tools/perf/bench/find-bit-bench.c | 5 +- tools/perf/bench/futex.h | 4 +- tools/perf/bench/inject-buildid.c | 8 +- tools/perf/bench/mem-functions.c | 2 +- tools/perf/bench/pmu-scan.c | 12 +-- tools/perf/bench/sched-messaging.c | 4 +- tools/perf/bench/sched-pipe.c | 15 +-- tools/perf/bench/sched-seccomp-notify.c | 2 +- tools/perf/bench/synthesize.c | 6 +- tools/perf/builtin-annotate.c | 4 +- tools/perf/builtin-bench.c | 2 +- tools/perf/builtin-buildid-cache.c | 2 +- tools/perf/builtin-buildid-list.c | 2 +- tools/perf/builtin-c2c.c | 21 ++-- tools/perf/builtin-daemon.c | 5 +- tools/perf/builtin-diff.c | 10 +- tools/perf/builtin-evlist.c | 2 +- tools/perf/builtin-ftrace.c | 17 ++-- tools/perf/builtin-help.c | 4 +- tools/perf/builtin-inject.c | 28 +++--- tools/perf/builtin-kmem.c | 39 ++++---- tools/perf/builtin-kvm.c | 8 +- tools/perf/builtin-kwork.c | 11 +-- tools/perf/builtin-list.c | 4 +- tools/perf/builtin-lock.c | 16 +-- tools/perf/builtin-mem.c | 2 +- tools/perf/builtin-record.c | 66 +++++++------ tools/perf/builtin-report.c | 4 +- tools/perf/builtin-sched.c | 56 +++++------ tools/perf/builtin-script.c | 39 ++++---- tools/perf/builtin-stat.c | 6 +- tools/perf/builtin-timechart.c | 60 ++++++------ tools/perf/builtin-top.c | 4 +- tools/perf/builtin-trace.c | 98 ++++++++++--------- tools/perf/dlfilters/dlfilter-test-api-v0.c | 4 +- tools/perf/jvmti/jvmti_agent.c | 6 +- tools/perf/perf-sys.h | 3 +- tools/perf/perf.c | 2 +- tools/perf/tests/api-io.c | 2 +- tools/perf/tests/bp_signal.c | 6 +- tools/perf/tests/bp_signal_overflow.c | 6 +- tools/perf/tests/builtin-test.c | 9 +- tools/perf/tests/code-reading.c | 4 +- tools/perf/tests/dso-data.c | 10 +- tools/perf/tests/mmap-thread-lookup.c | 2 +- tools/perf/tests/openat-syscall-tp-fields.c | 2 +- tools/perf/tests/pmu-events.c | 2 +- tools/perf/tests/sigtrap.c | 4 +- tools/perf/tests/switch-tracking.c | 11 ++- tools/perf/tests/vmlinux-kallsyms.c | 4 +- tools/perf/tests/wp.c | 4 +- tools/perf/trace/beauty/arch_prctl.c | 2 +- tools/perf/trace/beauty/eventfd.c | 2 +- tools/perf/trace/beauty/fcntl.c | 5 +- tools/perf/trace/beauty/flock.c | 2 +- tools/perf/trace/beauty/fs_at_flags.c | 4 +- tools/perf/trace/beauty/futex_op.c | 2 +- tools/perf/trace/beauty/futex_val3.c | 2 +- tools/perf/trace/beauty/ioctl.c | 2 +- tools/perf/trace/beauty/kcmp.c | 8 +- tools/perf/trace/beauty/mmap.c | 2 +- tools/perf/trace/beauty/mode_t.c | 2 +- tools/perf/trace/beauty/msg_flags.c | 2 +- tools/perf/trace/beauty/open_flags.c | 2 +- tools/perf/trace/beauty/perf_event_open.c | 4 +- tools/perf/trace/beauty/pid.c | 2 +- tools/perf/trace/beauty/pkey_alloc.c | 2 +- tools/perf/trace/beauty/prctl.c | 10 +- tools/perf/trace/beauty/sched_policy.c | 2 +- tools/perf/trace/beauty/seccomp.c | 4 +- tools/perf/trace/beauty/signum.c | 2 +- tools/perf/trace/beauty/socket.c | 6 +- tools/perf/trace/beauty/socket_type.c | 2 +- tools/perf/trace/beauty/statx.c | 2 +- .../beauty/tracepoints/x86_irq_vectors.c | 3 +- tools/perf/trace/beauty/tracepoints/x86_msr.c | 3 +- tools/perf/trace/beauty/waitid_options.c | 2 +- tools/perf/ui/hist.c | 18 ++-- tools/perf/ui/stdio/hist.c | 5 +- tools/perf/util/annotate.c | 22 ++--- .../util/arm-spe-decoder/arm-spe-decoder.c | 4 +- .../arm-spe-decoder/arm-spe-pkt-decoder.c | 2 +- tools/perf/util/arm-spe.c | 24 ++--- tools/perf/util/auxtrace.c | 8 +- tools/perf/util/bpf-event.c | 2 +- tools/perf/util/bpf-filter.c | 20 ++-- tools/perf/util/bpf_counter.c | 6 +- tools/perf/util/bpf_counter_cgroup.c | 2 +- tools/perf/util/bpf_ftrace.c | 4 +- tools/perf/util/bpf_kwork_top.c | 2 +- tools/perf/util/bpf_lock_contention.c | 17 ++-- tools/perf/util/bpf_off_cpu.c | 4 +- tools/perf/util/build-id.c | 2 +- tools/perf/util/cacheline.c | 5 +- tools/perf/util/callchain.c | 12 +-- tools/perf/util/callchain.h | 2 +- tools/perf/util/cgroup.c | 4 +- tools/perf/util/comm.c | 2 +- tools/perf/util/config.c | 6 +- tools/perf/util/cpumap.c | 4 +- tools/perf/util/cs-etm-base.c | 4 +- tools/perf/util/debug.c | 7 +- tools/perf/util/demangle-java.c | 4 +- tools/perf/util/demangle-ocaml.c | 3 +- tools/perf/util/disasm.c | 11 ++- tools/perf/util/dlfilter.c | 10 +- tools/perf/util/env.c | 2 +- tools/perf/util/event.c | 4 +- tools/perf/util/evlist.c | 29 +++--- tools/perf/util/evsel.c | 35 +++---- tools/perf/util/genelf.c | 2 +- tools/perf/util/hashmap.c | 10 +- tools/perf/util/header.c | 54 +++++----- tools/perf/util/help-unknown-cmd.c | 14 +-- tools/perf/util/hisi-ptt.c | 8 +- tools/perf/util/hist.c | 7 +- tools/perf/util/hwmon_pmu.c | 8 +- tools/perf/util/intel-bts.c | 4 +- .../util/intel-pt-decoder/intel-pt-decoder.c | 30 +++--- .../intel-pt-decoder/intel-pt-insn-decoder.c | 2 +- .../perf/util/intel-pt-decoder/intel-pt-log.c | 2 +- .../intel-pt-decoder/intel-pt-pkt-decoder.c | 2 +- tools/perf/util/intel-pt.c | 38 +++---- tools/perf/util/jitdump.c | 24 ++--- tools/perf/util/levenshtein.c | 18 ++-- tools/perf/util/machine.c | 14 +-- tools/perf/util/map.c | 4 +- tools/perf/util/maps.c | 6 +- tools/perf/util/mem-events.c | 12 +-- tools/perf/util/mem2node.c | 2 +- tools/perf/util/memswap.c | 4 +- tools/perf/util/memswap.h | 4 +- tools/perf/util/metricgroup.c | 15 ++- tools/perf/util/mmap.c | 6 +- tools/perf/util/parse-events.c | 16 +-- tools/perf/util/pmu.c | 9 +- tools/perf/util/pmus.c | 16 +-- tools/perf/util/print_binary.c | 13 ++- tools/perf/util/probe-event.c | 13 +-- tools/perf/util/probe-file.c | 12 ++- tools/perf/util/python.c | 4 +- tools/perf/util/s390-sample-raw.c | 4 +- .../scripting-engines/trace-event-python.c | 13 +-- tools/perf/util/session.c | 29 +++--- tools/perf/util/sort.c | 20 ++-- tools/perf/util/srccode.c | 6 +- tools/perf/util/srcline.c | 2 +- tools/perf/util/stat-display.c | 10 +- tools/perf/util/strfilter.c | 2 +- tools/perf/util/string.c | 11 ++- tools/perf/util/svghelper.c | 23 ++--- tools/perf/util/symbol-elf.c | 33 ++++--- tools/perf/util/symbol.c | 10 +- tools/perf/util/synthetic-events.c | 22 ++--- tools/perf/util/target.c | 2 +- tools/perf/util/thread-stack.c | 2 +- tools/perf/util/thread.c | 4 +- tools/perf/util/thread_map.c | 6 +- tools/perf/util/time-utils.c | 9 +- tools/perf/util/tool.c | 2 +- tools/perf/util/tool_pmu.c | 2 +- tools/perf/util/trace-event-info.c | 3 +- tools/perf/util/trace-event-parse.c | 2 +- tools/perf/util/trace-event-read.c | 23 +++-- tools/perf/util/trace-event-scripting.c | 2 +- tools/perf/util/util.c | 9 +- tools/perf/util/util.h | 2 +- tools/perf/util/values.c | 4 +- tools/perf/util/zlib.c | 2 +- 203 files changed, 963 insertions(+), 922 deletions(-)
Signature · 1 line
2.49.0.906.g1f30a19c02-goog