All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: acme@kernel.org, james.clark@linaro.org, 9erthalion6@gmail.com,
	adrian.hunter@intel.com, alex@ghiti.fr,
	alexandre.chartre@oracle.com, andrii@kernel.org,
	ankur.a.arora@oracle.com, aou@eecs.berkeley.edu,
	bpf@vger.kernel.org, collin.funk1@gmail.com,
	costa.shul@redhat.com, daniel@iogearbox.net,
	dapeng1.mi@linux.intel.com, dsterba@suse.com, eddyz87@gmail.com,
	howardchu95@gmail.com, jolsa@kernel.org, leo.yan@arm.com,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	martin.lau@linux.dev, memxor@gmail.com, mingo@redhat.com,
	mmayer@broadcom.com, nathan@kernel.org, palmer@dabbelt.com,
	peterz@infradead.org, pjw@kernel.org, qmo@kernel.org,
	ricky.ringler@proton.me, song@kernel.org, swapnil.sapkal@amd.com,
	terrelln@fb.com, tglozar@redhat.com, thomas.falcon@intel.com,
	yonghong.song@linux.dev
Subject: Re: [PATCH v3 00/17] perf build: Reduce build time by nearly half
Date: Fri, 15 May 2026 11:20:35 -0700	[thread overview]
Message-ID: <agdj81gaSSWyJkQI@google.com> (raw)
In-Reply-To: <CAP-5=fUJFRcXFdpSy_X23NSU7zMp9SVZEqX+cEBsKP9YARGRvA@mail.gmail.com>

On Thu, May 14, 2026 at 03:23:34PM -0700, Ian Rogers wrote:
> On Thu, May 14, 2026 at 3:06 PM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > On Thu, May 14, 2026 at 09:33:52AM -0700, Ian Rogers wrote:
> > > This patch series refactors Kbuild internals, BPF skeleton generation,
> > > Python AST pre-computation, and foundational tooling dependencies across
> > > the perf tool build system. By eliminating umbrella target synchronization
> > > barriers, decoupling static library prerequisites, parallelizing single-core
> > > script generators, and eradicating redundant feature checks, this series
> > > unlocks absolute theoretical peak multi-core concurrency during Kbuild startup.
> > >
> > > On a 28-core build workstation (make -j28 all from scratch), clean build
> > > latency improves by over 49%:
> > >
> > >   Before:
> > >     real    0m29.006s
> > >     user    2m46.019s
> > >     sys     0m30.610s
> > >
> > >   After:
> > >     real    0m14.782s
> > >     user    2m39.527s
> > >     sys     0m22.938s
> > >
> > > Saving 14.2 full seconds time per clean build. Furthermore, nothing to
> > > build incremental builds are improved by nearly 7x:
> > >
> > >   Before:
> > >     real    0m11.528s
> > >     user    0m9.633s
> > >     sys     0m6.965s
> > >
> > >   After:
> > >     real    0m1.729s
> > >     user    0m1.600s
> > >     sys     0m0.884s
> >
> > I've quickly checked it with latency profiling like below:
> >
> >   $ perf record --latency -- make -C tools/perf
> >
> >   $ perf report --latency -s comm
> >
> > The result looks like this.
> >
> > Before:
> >   #
> >   # Samples: 715K of event 'cpu/cycles/Pu'
> >   # Event count (approx.): 422452811481
> >   #
> >   #  Latency  Overhead  Command
> >   # ........  ........  ...............
> >   #
> >       45.28%    71.33%  cc1
> >       34.48%    16.92%  python3
> >       11.15%     2.21%  ld
> >        2.58%     1.51%  x86_64-linux-gn
> >        2.22%     0.99%  cc1plus
> >        0.71%     0.63%  sh
> >        0.69%     0.14%  llvm-config
> >        0.62%     0.56%  clang
> >        0.57%     4.40%  shellcheck
> >        0.44%     0.12%  perl
> >
> > After:
> >   #
> >   # Samples: 709K of event 'cpu/cycles/Pu'
> >   # Event count (approx.): 416654798495
> >   #
> >   #  Latency  Overhead  Command
> >   # ........  ........  ...............
> >   #
> >       64.99%    71.16%  cc1
> >       15.07%     1.81%  ld
> >        7.14%    17.59%  python3
> >        3.66%     1.53%  x86_64-linux-gn
> >        3.48%     0.75%  cc1plus
> >        1.11%     4.43%  shellcheck
> >        1.09%     0.74%  sh
> >        0.86%     0.59%  clang
> >        0.77%     0.12%  perl
> >        0.45%     0.23%  make
> >
> > Now I see a big drop in the latency from python.  And the llvm-config
> > doesn't show up in the top 10.
> 
> This looks good. What is "x86_64-linux-gn", and since we default off
> LIBPERL, why does perl show up in the commands?

I don't know exactly, but it seems we have some path to run perl during
the build even LIBPERL is off.  This is what `perf report --tasks` shows.

   3577076  3577076  3576925 |    sh
   3577077  3577077  3577076 |     make
   3577078  3577078  3577077 |      sh
   3577079  3577079  3577078 |       gcc
   3577081  3577081  3577079 |        cc1
   3577080  3577080  3577078 |       grep
   3577082  3577082  3577077 |      which
   3577083  3577083  3577077 |      sh
   3577084  3577084  3577083 |       perl
   3577085  3577085  3577077 |      sh
   3577086  3577086  3577085 |       perl
   3577087  3577087  3577086 |        pwd
   3577088  3577088  3577086 |        sh
   3577089  3577089  3577088 |         x86_64-linux-gn
   3577090  3577090  3577089 |          cc1

Thanks,
Namhyung


  parent reply	other threads:[~2026-05-15 18:20 UTC|newest]

Thread overview: 124+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12  5:35 [PATCH v1 00/14] perf build: Reduce build time by one third Ian Rogers
2026-05-12  5:35 ` [PATCH v1 01/14] bpftool build: Restrict feature tests during bootstrap compilation Ian Rogers
2026-05-12  5:35 ` [PATCH v1 02/14] perf trace beauty: Make beauty generated C code standalone .o files Ian Rogers
2026-05-13  5:21   ` sashiko-bot
2026-05-12  5:35 ` [PATCH v1 03/14] perf build: Decouple pmu-events from prepare umbrella target Ian Rogers
2026-05-12  5:35 ` [PATCH v1 04/14] perf build: Remove empty archheaders target Ian Rogers
2026-05-12  5:35 ` [PATCH v1 05/14] perf build: Move BPF skeleton generation out of Makefile.perf Ian Rogers
2026-05-13 19:52   ` sashiko-bot
2026-05-12  5:35 ` [PATCH v1 06/14] perf build: Encapsulate vmlinux.h and bpftool in bpf_skel.mak Ian Rogers
2026-05-13 20:09   ` sashiko-bot
2026-05-12  5:35 ` [PATCH v1 07/14] perf build: Move static libbpf dependency out of prepare step Ian Rogers
2026-05-13 20:36   ` sashiko-bot
2026-05-12  5:35 ` [PATCH v1 08/14] perf build: Pre-generate BPF skeletons during umbrella prepare phase Ian Rogers
2026-05-12  5:35 ` [PATCH v1 09/14] perf build: Move libsymbol dependency out of prepare step Ian Rogers
2026-05-13 21:11   ` sashiko-bot
2026-05-12  5:35 ` [PATCH v1 10/14] perf build: Remove redundant libbpf feature check for static builds Ian Rogers
2026-05-12  5:35 ` [PATCH v1 11/14] tools build: Integrate libdebuginfod into test-all fast path Ian Rogers
2026-05-13 21:40   ` sashiko-bot
2026-05-12  5:35 ` [PATCH v1 12/14] perf pmu-events: Split big_c_string storage into standalone compilation unit Ian Rogers
2026-05-13 21:56   ` sashiko-bot
2026-05-12  5:35 ` [PATCH v1 13/14] perf pmu-events: Parallelize JSON and metric pre-computation in jevents.py Ian Rogers
2026-05-13 22:18   ` sashiko-bot
2026-05-12  5:35 ` [PATCH v1 14/14] perf build: Prefix SCRIPTS with output directory to fix continuous rebuilds Ian Rogers
2026-05-12 17:46   ` [PATCH v2 00/18] perf build: Reduce build time by nearly half Ian Rogers
2026-05-12 17:46     ` [PATCH v2 01/18] bpftool build: Restrict feature tests during bootstrap compilation Ian Rogers
2026-05-12 17:46     ` [PATCH v2 02/18] tools build: Integrate libdebuginfod into test-all fast path Ian Rogers
2026-05-13 23:59       ` sashiko-bot
2026-05-12 17:46     ` [PATCH v2 03/18] tools build: Fix test-clang-bpf-co-re.bin to generate target file Ian Rogers
2026-05-14  0:15       ` sashiko-bot
2026-05-12 17:46     ` [PATCH v2 04/18] tools scripts: Short-circuit CC_NO_CLANG compiler probe in Makefile.include Ian Rogers
2026-05-14  0:28       ` sashiko-bot
2026-05-12 17:46     ` [PATCH v2 05/18] perf trace beauty: Make beauty generated C code standalone .o files Ian Rogers
2026-05-14  0:50       ` sashiko-bot
2026-05-12 17:46     ` [PATCH v2 06/18] perf build: Decouple pmu-events from prepare umbrella target Ian Rogers
2026-05-12 17:46     ` [PATCH v2 07/18] perf build: Remove empty archheaders target Ian Rogers
2026-05-12 17:46     ` [PATCH v2 08/18] perf build: Move BPF skeleton generation out of Makefile.perf Ian Rogers
2026-05-14  1:55       ` sashiko-bot
2026-05-12 17:46     ` [PATCH v2 09/18] perf build: Encapsulate vmlinux.h and bpftool in bpf_skel.mak Ian Rogers
2026-05-12 17:46     ` [PATCH v2 10/18] perf build: Move static libbpf dependency out of prepare step Ian Rogers
2026-05-14  3:02       ` sashiko-bot
2026-05-12 17:46     ` [PATCH v2 11/18] perf build: Pre-generate BPF skeleton tooling during umbrella prepare phase Ian Rogers
2026-05-14  3:39       ` sashiko-bot
2026-05-12 17:46     ` [PATCH v2 12/18] perf build: Move libsymbol dependency out of prepare step Ian Rogers
2026-05-12 17:46     ` [PATCH v2 13/18] perf build: Remove redundant libbpf feature check for static builds Ian Rogers
2026-05-12 17:46     ` [PATCH v2 14/18] perf pmu-events: Split big_c_string storage into standalone compilation unit Ian Rogers
2026-05-14  4:35       ` sashiko-bot
2026-05-12 17:46     ` [PATCH v2 15/18] perf pmu-events: Parallelize JSON and metric pre-computation in jevents.py Ian Rogers
2026-05-14  5:06       ` sashiko-bot
2026-05-12 17:46     ` [PATCH v2 16/18] perf build: Prefix SCRIPTS with output directory to fix continuous rebuilds Ian Rogers
2026-05-12 17:46     ` [PATCH v2 17/18] perf pmu-events: Convert recursive shell assignments and macros to Make built-ins Ian Rogers
2026-05-12 17:46     ` [PATCH v2 18/18] perf build: Convert llvm-config shell queries to simply expanded variables Ian Rogers
2026-05-14 16:33     ` [PATCH v3 00/17] perf build: Reduce build time by nearly half Ian Rogers
2026-05-14 16:33       ` [PATCH v3 01/17] bpftool build: Restrict feature tests during bootstrap compilation Ian Rogers
2026-05-14 16:33       ` [PATCH v3 02/17] tools build: Integrate libdebuginfod into test-all fast path Ian Rogers
2026-05-14 20:55         ` sashiko-bot
2026-05-14 16:33       ` [PATCH v3 03/17] tools build: Fix test-clang-bpf-co-re.bin to generate target file Ian Rogers
2026-05-14 21:10         ` sashiko-bot
2026-05-14 16:33       ` [PATCH v3 04/17] perf trace beauty: Make beauty generated C code standalone .o files Ian Rogers
2026-05-14 16:33       ` [PATCH v3 05/17] perf build: Decouple pmu-events from prepare umbrella target Ian Rogers
2026-05-14 16:33       ` [PATCH v3 06/17] perf build: Remove empty archheaders target Ian Rogers
2026-05-14 16:33       ` [PATCH v3 07/17] perf build: Move BPF skeleton generation out of Makefile.perf Ian Rogers
2026-05-14 16:34       ` [PATCH v3 08/17] perf build: Encapsulate vmlinux.h and bpftool in bpf_skel.mak Ian Rogers
2026-05-14 16:34       ` [PATCH v3 09/17] perf build: Move static libbpf dependency out of prepare step Ian Rogers
2026-05-14 23:35         ` sashiko-bot
2026-05-14 16:34       ` [PATCH v3 10/17] perf build: Pre-generate BPF skeleton tooling during umbrella prepare phase Ian Rogers
2026-05-14 23:45         ` sashiko-bot
2026-05-14 16:34       ` [PATCH v3 11/17] perf build: Move libsymbol dependency out of prepare step Ian Rogers
2026-05-14 16:34       ` [PATCH v3 12/17] perf build: Remove redundant libbpf feature check for static builds Ian Rogers
2026-05-14 16:34       ` [PATCH v3 13/17] perf pmu-events: Split big_c_string storage into standalone compilation unit Ian Rogers
2026-05-15  0:39         ` sashiko-bot
2026-05-14 16:34       ` [PATCH v3 14/17] perf pmu-events: Parallelize JSON and metric pre-computation in jevents.py Ian Rogers
2026-05-15  1:00         ` sashiko-bot
2026-05-14 16:34       ` [PATCH v3 15/17] perf build: Prefix SCRIPTS with output directory to fix continuous rebuilds Ian Rogers
2026-05-14 16:34       ` [PATCH v3 16/17] perf pmu-events: Convert recursive shell assignments and macros to Make built-ins Ian Rogers
2026-05-14 16:34       ` [PATCH v3 17/17] perf build: Convert llvm-config shell queries to simply expanded variables Ian Rogers
2026-05-14 22:06       ` [PATCH v3 00/17] perf build: Reduce build time by nearly half Namhyung Kim
2026-05-14 22:23         ` Ian Rogers
2026-05-15 16:20           ` Ian Rogers
2026-05-15 17:38             ` [PATCH v4 00/14] " Ian Rogers
2026-05-15 17:38               ` [PATCH v4 01/14] tools build: Fix feature checks to touch target files on success Ian Rogers
2026-05-15 18:04                 ` sashiko-bot
2026-05-15 17:38               ` [PATCH v4 02/14] perf trace beauty: Make beauty generated C code standalone .o files Ian Rogers
2026-05-15 18:45                 ` Namhyung Kim
2026-05-15 17:38               ` [PATCH v4 03/14] perf build: Decouple pmu-events from prepare umbrella target Ian Rogers
2026-05-15 17:38               ` [PATCH v4 04/14] perf build: Remove empty archheaders target Ian Rogers
2026-05-15 17:38               ` [PATCH v4 05/14] perf build: Move BPF skeleton generation out of Makefile.perf Ian Rogers
2026-05-15 17:38               ` [PATCH v4 06/14] perf build: Encapsulate vmlinux.h and bpftool in bpf_skel.mak Ian Rogers
2026-05-15 17:38               ` [PATCH v4 07/14] perf build: Pre-generate BPF skeleton tooling during umbrella prepare phase Ian Rogers
2026-05-15 17:38               ` [PATCH v4 08/14] perf build: Move libsymbol dependency out of prepare step Ian Rogers
2026-05-15 18:30                 ` sashiko-bot
2026-05-15 17:38               ` [PATCH v4 09/14] perf build: Remove redundant libbpf feature check for static builds Ian Rogers
2026-05-15 17:38               ` [PATCH v4 10/14] perf pmu-events: Split big_c_string storage into standalone compilation unit Ian Rogers
2026-05-15 18:09                 ` sashiko-bot
2026-05-15 17:38               ` [PATCH v4 11/14] perf pmu-events: Parallelize JSON and metric pre-computation in jevents.py Ian Rogers
2026-05-15 18:32                 ` sashiko-bot
2026-05-15 19:41                 ` Namhyung Kim
2026-05-15 23:05                   ` Ian Rogers
2026-05-15 17:38               ` [PATCH v4 12/14] perf build: Prefix SCRIPTS with output directory to fix continuous rebuilds Ian Rogers
2026-05-15 19:48                 ` Namhyung Kim
2026-05-15 17:38               ` [PATCH v4 13/14] perf pmu-events: Convert recursive shell assignments and macros to Make built-ins Ian Rogers
2026-05-15 17:38               ` [PATCH v4 14/14] perf build: Convert llvm-config shell queries to simply expanded variables Ian Rogers
2026-05-15 19:33               ` [PATCH v5 00/14] perf build: Reduce build time by nearly half Ian Rogers
2026-05-15 19:33                 ` [PATCH v5 01/14] tools build: Fix feature checks to touch target files on success Ian Rogers
2026-05-15 19:33                 ` [PATCH v5 02/14] perf trace beauty: Make beauty generated C code standalone .o files Ian Rogers
2026-05-15 19:33                 ` [PATCH v5 03/14] perf build: Decouple pmu-events from prepare umbrella target Ian Rogers
2026-05-15 19:33                 ` [PATCH v5 04/14] perf build: Remove empty archheaders target Ian Rogers
2026-05-15 19:33                 ` [PATCH v5 05/14] perf build: Move BPF skeleton generation out of Makefile.perf Ian Rogers
2026-05-15 19:33                 ` [PATCH v5 06/14] perf build: Encapsulate vmlinux.h and bpftool in bpf_skel.mak Ian Rogers
2026-05-15 19:33                 ` [PATCH v5 07/14] perf build: Pre-generate BPF skeleton tooling during umbrella prepare phase Ian Rogers
2026-05-15 19:33                 ` [PATCH v5 08/14] perf build: Move libsymbol dependency out of prepare step Ian Rogers
2026-05-15 19:53                   ` sashiko-bot
2026-05-15 23:27                     ` Ian Rogers
2026-05-15 19:33                 ` [PATCH v5 09/14] perf build: Remove redundant libbpf feature check for static builds Ian Rogers
2026-05-15 19:33                 ` [PATCH v5 10/14] perf pmu-events: Split big_c_string storage into standalone compilation unit Ian Rogers
2026-05-15 19:58                   ` sashiko-bot
2026-05-15 23:25                     ` Ian Rogers
2026-05-15 19:33                 ` [PATCH v5 11/14] perf pmu-events: Parallelize JSON and metric pre-computation in jevents.py Ian Rogers
2026-05-15 20:22                   ` sashiko-bot
2026-05-15 19:33                 ` [PATCH v5 12/14] perf build: Prefix SCRIPTS with output directory to fix continuous rebuilds Ian Rogers
2026-05-15 19:33                 ` [PATCH v5 13/14] perf pmu-events: Convert recursive shell assignments and macros to Make built-ins Ian Rogers
2026-05-15 19:33                 ` [PATCH v5 14/14] perf build: Convert llvm-config shell queries to simply expanded variables Ian Rogers
2026-05-15 23:32                 ` [PATCH v5 00/14] perf build: Reduce build time by nearly half Ian Rogers
2026-05-15 18:20           ` Namhyung Kim [this message]
2026-05-12  9:36 ` [PATCH v1 00/14] perf build: Reduce build time by one third James Clark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=agdj81gaSSWyJkQI@google.com \
    --to=namhyung@kernel.org \
    --cc=9erthalion6@gmail.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alex@ghiti.fr \
    --cc=alexandre.chartre@oracle.com \
    --cc=andrii@kernel.org \
    --cc=ankur.a.arora@oracle.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=bpf@vger.kernel.org \
    --cc=collin.funk1@gmail.com \
    --cc=costa.shul@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=dapeng1.mi@linux.intel.com \
    --cc=dsterba@suse.com \
    --cc=eddyz87@gmail.com \
    --cc=howardchu95@gmail.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=leo.yan@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=mingo@redhat.com \
    --cc=mmayer@broadcom.com \
    --cc=nathan@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=peterz@infradead.org \
    --cc=pjw@kernel.org \
    --cc=qmo@kernel.org \
    --cc=ricky.ringler@proton.me \
    --cc=song@kernel.org \
    --cc=swapnil.sapkal@amd.com \
    --cc=terrelln@fb.com \
    --cc=tglozar@redhat.com \
    --cc=thomas.falcon@intel.com \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.