All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Alan Maguire <alan.maguire@oracle.com>
Cc: Matthew Maurer <mmaurer@google.com>,
	rust-for-linux@vger.kernel.org, dwarves@vger.kernel.org,
	aliceryhl@google.com
Subject: Re: [PATCH] pahole: Apply CU-level filters early in loading
Date: Wed, 31 Jul 2024 15:12:02 -0300	[thread overview]
Message-ID: <Zqp-cqZcOOCzQMEg@x1> (raw)
In-Reply-To: <d4152b9d-2bc4-4458-a1a2-71ebb5932d9c@oracle.com>

On Wed, Jul 31, 2024 at 06:43:51PM +0100, Alan Maguire wrote:
> 
> 
> On 31/07/2024 14:26, Arnaldo Carvalho de Melo wrote:
> > On Wed, Jul 31, 2024 at 09:57:25AM +0100, Alan Maguire wrote:
> >> On 30/07/2024 23:43, Matthew Maurer wrote:
> >>> Without this, even with `--lang_exclude=rust` set, running on `vmlinux`
> >>> with `CONFIG_RUST` enabled will lead to errors like:
> >>> die__process_function: tag not supported 0x2f (template_type_parameter)!
> >>> because the filtering doesn't happen until finalization, but unsupported
> >>> tags are reported during loading.
> >>>
> >>> As an added bonus, this should speed up processing of large objects with
> >>> filtered CUs, as their details will no longer be walked.
> >>>
> >>
> >> One question on this; if we are always doing early filtering like this,
> >> should the explicit cu__filter() call be removed from pahole_stealer()?
> > 
> > When I saw the introduction of an extra callback to be used inside the
> > dwarf_loader I thought that it would be used only for this specific
> > language filtering feature, i.e. a defensive approach at implementing
> > this to avoid unintended side effects of doing all filtering at that
> > point, maybe some other feature somehow depends on the cu__filter()
> > being called where it was so far.
> > 
> > But then it is being used for all filtering, so it seems just a way to
> > reduce the patch size...
> > 
> > So I'd keep the cu->early_cu_filter() but would use it only for the
> > language filtering feature, wdyt?
> 
> So if I understand correctly,
> 
> 	if (languages.exclude)
> 		conf_load.early_cu_filter = cu__filter;
> 
> ? Seems reasonable to me. Thanks!

yeah, you got it. So this new early filtering is done for the feature we
have at hand and if other uses of cu__filter() already in place need, we
can transition to this new mechanism that reuses the cu__filter()
function signature/semantics.

- Arnaldo

  reply	other threads:[~2024-07-31 18:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-30 22:43 [PATCH] pahole: Apply CU-level filters early in loading Matthew Maurer
2024-07-31  8:57 ` Alan Maguire
2024-07-31 13:26   ` Arnaldo Carvalho de Melo
2024-07-31 17:43     ` Alan Maguire
2024-07-31 18:12       ` Arnaldo Carvalho de Melo [this message]
2024-08-01  9:20         ` Alan Maguire

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=Zqp-cqZcOOCzQMEg@x1 \
    --to=acme@kernel.org \
    --cc=alan.maguire@oracle.com \
    --cc=aliceryhl@google.com \
    --cc=dwarves@vger.kernel.org \
    --cc=mmaurer@google.com \
    --cc=rust-for-linux@vger.kernel.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.