Linux Perf Users
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ian Rogers <irogers@google.com>, Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	James Clark <james.clark@linaro.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 1/3] perf trace: Include copied headers in the beauty directory
Date: Mon, 25 May 2026 19:14:42 -0500	[thread overview]
Message-ID: <ahTl8o0B3eLZpZu6@google.com> (raw)
In-Reply-To: <ahQ2iko9pk1VDkdx@x1>

On Mon, May 25, 2026 at 08:46:18AM -0300, Arnaldo Carvalho de Melo wrote:
> On Sun, May 24, 2026 at 06:11:31PM -0700, Namhyung Kim wrote:
> > We keep uptodate copied of the kernel headers, let's use it directly and
> > don't worry about missing definitions.
> 
> Using it directly with the latest header, when reasonable, is indeed
> better than having those conditional defines.
> 
> Sometimes it is warranted as having the latest headers may involve
> dragging many files (header dependencies) into the tools/include/ copy
> of kernel headers we try to keep in sync.
> 
> > +++ b/tools/perf/trace/beauty/fcntl.c
> > @@ -5,25 +5,10 @@
> >   *  Copyright (C) 2017, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
> >   */
> 
> <SNIP>
> 
> > -#ifndef F_GET_FILE_RW_HINT
> > -#define F_GET_FILE_RW_HINT	(F_LINUX_SPECIFIC_BASE + 13)
> > -#endif
> > +#include "trace/beauty/beauty.h"
> > +#include "trace/beauty/include/uapi/linux/fcntl.h"
> 
> The intention isn't documented anywhere, but files in
> trace/beauty/include/uapi were not intended to be used in compiling,
> just scraping, i.e. it didn't need to be compileable, no need to have
> things it includes in turn nor have defines in Makefiles, it would just
> be used by the scripts to extract info from it, info that otherwise
> isn't available as enums (which they should, but that is a digression)
> or as BTF (which would be even better).
> 
> Things for compiling would remain in tools/include/, as other tools may
> need them and then the maintainainace of these headers would be shared
> to some degree.
> 
> Otherwise each and every tools/ living code that needed copies of header
> files would end up with its own copy, which seems excessive.
> 
> What do you think?

Yep, makes sense.  I'll try to find a way to use them without including.

Thanks,
Namhyung


      reply	other threads:[~2026-05-26  0:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-25  1:11 [PATCH 1/3] perf trace: Include copied headers in the beauty directory Namhyung Kim
2026-05-25  1:11 ` [PATCH 2/3] perf trace: Copy uapi/linux/eventfd.h for beautifier Namhyung Kim
2026-05-25  1:11 ` [PATCH 3/3] perf trace: Copy uapi/linux/futex.h " Namhyung Kim
2026-05-25  1:31 ` [PATCH 1/3] perf trace: Include copied headers in the beauty directory sashiko-bot
2026-05-25 15:45   ` Arnaldo Carvalho de Melo
2026-05-25 11:46 ` Arnaldo Carvalho de Melo
2026-05-26  0:14   ` Namhyung Kim [this message]

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=ahTl8o0B3eLZpZu6@google.com \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox