[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAM9d7cjgpXwC6D7F1DMrMw1j1k=o7oDw94Ofb_Xiyt_s7t5gJA@mail.gmail.com>
Date: Thu, 12 Oct 2023 10:23:51 -0700
From: Namhyung Kim <namhyung@...nel.org>
To: Ian Rogers <irogers@...gle.com>
Cc: Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Tom Rix <trix@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Yang Jihong <yangjihong1@...wei.com>,
Huacai Chen <chenhuacai@...nel.org>,
Ming Wang <wangming01@...ngson.cn>,
Kan Liang <kan.liang@...ux.intel.com>,
Ravi Bangoria <ravi.bangoria@....com>, llvm@...ts.linux.dev,
linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
bpf@...r.kernel.org
Subject: Re: [PATCH v3 00/18] clang-tools support in tools
On Mon, Oct 9, 2023 at 10:31 PM Namhyung Kim <namhyung@...nel.org> wrote:
>
> Hi Ian,
>
> On Mon, Oct 9, 2023 at 11:39 AM Ian Rogers <irogers@...gle.com> wrote:
> >
> > Allow the clang-tools scripts to work with builds in tools such as
> > tools/perf and tools/lib/perf. An example use looks like:
> >
> > ```
> > $ cd tools/perf
> > $ make CC=clang CXX=clang++
> > $ ../../scripts/clang-tools/gen_compile_commands.py
> > $ ../../scripts/clang-tools/run-clang-tools.py clang-tidy compile_commands.json -checks=-*,readability-named-parameter
> > Skipping non-C file: 'tools/perf/bench/mem-memcpy-x86-64-asm.S'
> > Skipping non-C file: 'tools/perf/bench/mem-memset-x86-64-asm.S'
> > Skipping non-C file: 'tools/perf/arch/x86/tests/regs_load.S'
> > 8 warnings generated.
> > Suppressed 8 warnings (8 in non-user code).
> > Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
> > 2 warnings generated.
> > 4 warnings generated.
> > Suppressed 4 warnings (4 in non-user code).
> > Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
> > 2 warnings generated.
> > 4 warnings generated.
> > Suppressed 4 warnings (4 in non-user code).
> > Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
> > 3 warnings generated.
> > tools/perf/util/parse-events-flex.c:546:27: warning: all parameters should be named in a function [readability-named-parameter]
> > void *yyalloc ( yy_size_t , yyscan_t yyscanner );
> > ^
> > /*size*/
> > ...
> > ```
> >
> > Fix a number of the more serious low-hanging issues in perf found by
> > clang-tidy.
> >
> > This support isn't complete, in particular it doesn't support output
> > directories properly and so fails for tools/lib/bpf, tools/bpf/bpftool
> > and if an output directory is used.
> >
> > v3. Add Nick Desaulniers reviewed-by to patch 3. For Namhyung, drop
> > "perf hisi-ptt: Fix potential memory leak", split lock change out
> > of "perf svghelper: Avoid memory leak" and address comments in
> > "perf header: Fix various error path memory leaks".
> > v2: Address comments by Nick Desaulniers in patch 3, and add their
> > Reviewed-by to patches 1 and 2.
> >
> > Ian Rogers (18):
> > gen_compile_commands: Allow the line prefix to still be cmd_
> > gen_compile_commands: Sort output compile commands by file name
> > run-clang-tools: Add pass through checks and header-filter arguments
> > perf bench uprobe: Fix potential use of memory after free
> > perf buildid-cache: Fix use of uninitialized value
> > perf env: Remove unnecessary NULL tests
> > perf jitdump: Avoid memory leak
> > perf mem-events: Avoid uninitialized read
> > perf dlfilter: Be defensive against potential NULL dereference
> > perf hists browser: Reorder variables to reduce padding
> > perf hists browser: Avoid potential NULL dereference
> > perf svghelper: Avoid memory leak
> > perf lock: Fix a memory leak on an error path
> > perf parse-events: Fix unlikely memory leak when cloning terms
> > tools api: Avoid potential double free
> > perf trace-event-info: Avoid passing NULL value to closedir
> > perf header: Fix various error path memory leaks
> > perf bpf_counter: Fix a few memory leaks
>
> I agree with your comment on v2 that it needs more work
> to clean the code up. Anyway I'm ok with v3 now.
>
> For ther perf part (patch 4 to 18),
> Acked-by: Namhyung Kim <namhyung@...nel.org>
Applied to perf-tools-next, thanks!
Powered by blists - more mailing lists