All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Ian Rogers <irogers@google.com>,
	Kan Liang <kan.liang@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-perf-users@vger.kernel.org
Subject: Re: [PATCHSET 0/9] Sync tools headers with the kernel source
Date: Mon, 8 Apr 2024 16:13:36 -0300	[thread overview]
Message-ID: <ZhRB4BULj1Y1f1TN@x1> (raw)
In-Reply-To: <20240408185520.1550865-1-namhyung@kernel.org>

On Mon, Apr 08, 2024 at 11:55:11AM -0700, Namhyung Kim wrote:
> Hello,
> 
> I'm gonna carry these changes on the perf tools tree.  I'll update the
> vhost.h once it lands on the mainline.

Humm, maybe its not a good idea to do that this cycle? I mean some of
these were moved from tools/{include,arch} to tools/perf/trace/beauty/{include,arch},
like tools/perf/trace/beauty/arch/x86/include/asm/irq_vectors.h.

But having said that, probably isn't a problem, when you get this pulled
upstream I'll do a merge with perf-tools-next and this should be
trivially resolved, I think.

Using the above example:

⬢[acme@toolbox perf-tools-next]$ git log tools/perf/trace/beauty/arch/x86/include/asm/irq_vectors.h
commit c8bfe3fad4f86a029da7157bae9699c816f0c309
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
Date:   Mon Mar 11 17:07:33 2024 -0300

    perf beauty: Move arch/x86/include/asm/irq_vectors.h copy out of the directory used to build perf
    
    It is used only to generate string tables, not to build perf, so move it
    to the tools/perf/trace/beauty/include/ hierarchy, that is used just for
    scraping.
    
    This is a something that should've have happened, as happened with the
    linux/socket.h scrapper, do it now as Ian suggested while doing an
    audit/refactor session in the headers used by perf.
    
    No other tools/ living code uses it.
    
    Suggested-by: Ian Rogers <irogers@google.com>
    Reviewed-by: Ian Rogers <irogers@google.com>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Link: https://lore.kernel.org/lkml/CAP-5=fWZVrpRufO4w-S4EcSi9STXcTAN2ERLwTSN7yrSSA-otQ@mail.gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

- Arnaldo
 
> This is the full explanation from Arnaldo:
> 
> There used to be no copies, with tools/ code using kernel headers
> directly. From time to time tools/perf/ broke due to legitimate kernel
> hacking. At some point Linus complained about such direct usage. Then we
> adopted the current model.
> 
> The way these headers are used in perf are not restricted to just
> including them to compile something.
> 
> There are sometimes used in scripts that convert defines into string
> tables, etc, so some change may break one of these scripts, or new MSRs
> may use some different #define pattern, etc.
> 
> E.g.:
> 
>   $ ls -1 tools/perf/trace/beauty/*.sh | head -5
>   tools/perf/trace/beauty/arch_errno_names.sh
>   tools/perf/trace/beauty/drm_ioctl.sh
>   tools/perf/trace/beauty/fadvise.sh
>   tools/perf/trace/beauty/fsconfig.sh
>   tools/perf/trace/beauty/fsmount.sh
>   $
>   $ tools/perf/trace/beauty/fadvise.sh
>   static const char *fadvise_advices[] = {
>         [0] = "NORMAL",
>         [1] = "RANDOM",
>         [2] = "SEQUENTIAL",
>         [3] = "WILLNEED",
>         [4] = "DONTNEED",
>         [5] = "NOREUSE",
>   };
>   $
> 
> The tools/perf/check-headers.sh script, part of the tools/ build
> process, points out changes in the original files.
> 
> So its important not to touch the copies in tools/ when doing changes in
> the original kernel headers, that will be done later, when
> check-headers.sh inform about the change to the perf tools hackers.
> 
> 
> Thanks,
> Namhyung
> 
> 
> Namhyung Kim (9):
>   tools/include: Sync uapi/drm/i915_drm.h with the kernel sources
>   tools/include: Sync uapi/linux/fs.h with the kernel sources
>   tools/include: Sync uapi/linux/kvm.h and asm/kvm.h with the kernel
>     sources
>   tools/include: Sync uapi/sound/asound.h with the kernel sources
>   tools/include: Sync x86 CPU feature headers with the kernel sources
>   tools/include: Sync x86 asm/irq_vectors.h with the kernel sources
>   tools/include: Sync x86 asm/msr-index.h with the kernel sources
>   tools/include: Sync asm-generic/bitops/fls.h with the kernel sources
>   tools/include: Sync arm64 asm/cputype.h with the kernel sources
> 
>  tools/arch/arm64/include/asm/cputype.h        |   4 +
>  tools/arch/arm64/include/uapi/asm/kvm.h       |  15 +-
>  tools/arch/powerpc/include/uapi/asm/kvm.h     |  45 +-
>  tools/arch/s390/include/uapi/asm/kvm.h        | 315 +++++++-
>  tools/arch/x86/include/asm/cpufeatures.h      |  17 +-
>  .../arch/x86/include/asm/disabled-features.h  |  11 +-
>  tools/arch/x86/include/asm/irq_vectors.h      |   2 -
>  tools/arch/x86/include/asm/msr-index.h        |  74 +-
>  .../arch/x86/include/asm/required-features.h  |   3 +-
>  tools/arch/x86/include/uapi/asm/kvm.h         | 308 +++++++-
>  tools/include/asm-generic/bitops/__fls.h      |   8 +-
>  tools/include/asm-generic/bitops/fls.h        |   8 +-
>  tools/include/uapi/drm/i915_drm.h             |  16 +
>  tools/include/uapi/linux/fs.h                 |  30 +-
>  tools/include/uapi/linux/kvm.h                | 689 +-----------------
>  tools/include/uapi/sound/asound.h             |   4 +-
>  16 files changed, 809 insertions(+), 740 deletions(-)
> 
> 
> base-commit: 25e973a0e077da585e472b4cadb1d2f4c1113285
> -- 
> 2.44.0.478.gd926399ef9-goog

  parent reply	other threads:[~2024-04-08 19:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08 18:55 [PATCHSET 0/9] Sync tools headers with the kernel source Namhyung Kim
2024-04-08 18:55 ` [PATCH 1/9] tools/include: Sync uapi/drm/i915_drm.h with the kernel sources Namhyung Kim
2024-04-09  7:26   ` Jani Nikula
2024-04-09  7:37     ` Ingo Molnar
2024-04-09 10:14       ` Jani Nikula
2024-04-09 15:58         ` Namhyung Kim
2024-04-09 17:00           ` Arnaldo Carvalho de Melo
2024-04-08 18:55 ` [PATCH 2/9] tools/include: Sync uapi/linux/fs.h " Namhyung Kim
2024-04-09 10:04   ` Jan Kara
2024-04-09 10:10     ` Christian Brauner
2024-04-08 18:55 ` [PATCH 3/9] tools/include: Sync uapi/linux/kvm.h and asm/kvm.h " Namhyung Kim
2024-04-08 18:55 ` [PATCH 4/9] tools/include: Sync uapi/sound/asound.h " Namhyung Kim
2024-04-08 18:55 ` [PATCH 5/9] tools/include: Sync x86 CPU feature headers " Namhyung Kim
2024-04-08 18:55 ` [PATCH 6/9] tools/include: Sync x86 asm/irq_vectors.h " Namhyung Kim
2024-04-08 18:55 ` [PATCH 7/9] tools/include: Sync x86 asm/msr-index.h " Namhyung Kim
2024-04-08 18:55 ` [PATCH 8/9] tools/include: Sync asm-generic/bitops/fls.h " Namhyung Kim
2024-04-08 18:55 ` [PATCH 9/9] tools/include: Sync arm64 asm/cputype.h " Namhyung Kim
2024-04-08 18:55   ` Namhyung Kim
2024-04-08 19:13 ` Arnaldo Carvalho de Melo [this message]
2024-04-09  7:40   ` [PATCHSET 0/9] Sync tools headers with the kernel source Ingo Molnar
2024-04-09 13:58     ` Arnaldo Carvalho de Melo
2024-04-09 15:51       ` Namhyung Kim
2024-04-09  7:15 ` Geert Uytterhoeven
2024-04-09 13:47   ` Arnaldo Carvalho de Melo
2024-04-09 15:54     ` Namhyung Kim

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=ZhRB4BULj1Y1f1TN@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /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.