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: Jiri Olsa <jolsa@kernel.org>,
	Clark Williams <williams@redhat.com>,
	Kate Carcia <kcarcia@redhat.com>,
	dwarves@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH 1/3] dwarf_loader: Initial support for DW_TAG_variant_part
Date: Thu, 18 Jun 2026 10:51:10 -0300	[thread overview]
Message-ID: <ajP3zsT0rub9kEKt@x1> (raw)
In-Reply-To: <adaSEUa3QbcL26JT@x1>

On Wed, Apr 08, 2026 at 02:36:17PM -0300, Arnaldo Carvalho de Melo wrote:
> On Wed, Apr 08, 2026 at 03:05:35PM +0100, Alan Maguire wrote:
> > On 23/03/2026 21:15, Arnaldo Carvalho de Melo wrote:
> > > +void type__add_variant_part(struct type *type, struct variant_part *vpart);
 
> > >  struct class_member *
> > >  	type__find_first_biggest_size_base_type_member(struct type *type,
  
> > do we also need some cleanup for the variant parts in type__delete() something like:
> > 
> > 	list_for_each_entry_safe(pos, n, type->variant_parts, node) {
> > 		list_del_int(&pos->node);
> > 		free(pos);
> > 	}
 
> Right, I'll fix it in v2, there are some other issues that Claude
> detected that I'll address in the enumeration case, one of them can be
> seen here:

Done with:

static void type__delete_variant_parts(struct type *type, struct cu *cu)
{
        struct variant_part *pos, *next;

        type__for_each_variant_part_safe_reverse(type, pos, next) {
                list_del_init(&pos->tag.node);
                variant_part__delete(pos, cu);
        }
}

Called from type__delete(), as you suggested.
 
> ⬢ [acme@toolbx pahole]$ pahole -C ProgramKind /tmp/build/perf-tools-next/tests/workloads/code_with_type.a
> enum ProgramKind {
> 	PathLookup = 0,
> 	Relative   = 1,
> 	Absolute   = 2,
> 	�3"��     = 140698500347136,
> } __attribute__((__packed__));
> 
> ⬢ [acme@toolbx pahole]$
> 
> Namely this Rust enum has a DW_TAG_subprogram, that
> enumeration__fprintf() doesn't know about, fixing it now.

Finally got back to working on this:

⬢ [acme@toolbx pahole]$ pahole -C ProgramKind /tmp/build/perf-tools-next/tests/workloads/code_with_type.a
enum ProgramKind {
	PathLookup = 0,
	Relative   = 1,
	Absolute   = 2,
	enum ProgramKind new(struct &std::ffi::os_str::OsStr),
} __attribute__((__packed__));

⬢ [acme@toolbx pahole]$

Will submit a v2 series,

- Arnaldo

  reply	other threads:[~2026-06-18 13:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23 21:15 [PATCH 0/3] Initial support for some Rust tags + way to ask for CU merging at load time Arnaldo Carvalho de Melo
2026-03-23 21:15 ` [PATCH 1/3] dwarf_loader: Initial support for DW_TAG_variant_part Arnaldo Carvalho de Melo
2026-04-08 14:05   ` Alan Maguire
2026-04-08 17:36     ` Arnaldo Carvalho de Melo
2026-06-18 13:51       ` Arnaldo Carvalho de Melo [this message]
2026-03-23 21:15 ` [PATCH 2/3] dwarf_loader: Initial support for DW_TAG_subprogram in DW_TAG_enumeration Arnaldo Carvalho de Melo
2026-03-30  9:05   ` Alan Maguire
2026-03-30 22:39     ` Arnaldo Carvalho de Melo
2026-03-23 21:15 ` [PATCH 3/3] dwarf_loader: Allow forcing the merge of CUs for solving inter CU tag references Arnaldo Carvalho de Melo
2026-03-30  8:58   ` Alan Maguire
2026-06-18 13:57     ` Arnaldo Carvalho de Melo

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=ajP3zsT0rub9kEKt@x1 \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=alan.maguire@oracle.com \
    --cc=dwarves@vger.kernel.org \
    --cc=jolsa@kernel.org \
    --cc=kcarcia@redhat.com \
    --cc=williams@redhat.com \
    /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.