From: Eduard Zingerman <eddyz87@gmail.com>
To: Alan Maguire <alan.maguire@oracle.com>,
dwarves@vger.kernel.org, arnaldo.melo@gmail.com
Cc: bpf@vger.kernel.org, kernel-team@fb.com, ast@kernel.org,
daniel@iogearbox.net, andrii@kernel.org, yhs@fb.com,
jose.marchesi@oracle.com, david.faust@oracle.com
Subject: Re: [PATCH dwarves 1/1] dwarf_loader: Support for btf:type_tag
Date: Tue, 14 Mar 2023 13:21:43 +0200 [thread overview]
Message-ID: <1cb31e59286d33620e33d478fc8e948593e121ce.camel@gmail.com> (raw)
In-Reply-To: <cd8636e4-0d76-b26d-7ddf-b28d2896b05a@oracle.com>
On Tue, 2023-03-14 at 10:30 +0000, Alan Maguire wrote:
[...]
> > See also:
> > [1] Mailing list discussion regarding `btf:type_tag`
> > https://lore.kernel.org/bpf/87r0w9jjoq.fsf@oracle.com/
> >
>
> I know there's a v2 coming but one suggestion and one other issue below..
>
> this is a great explanation, thanks for the details! one other thing that might help
> here is specifying that the solution adopted is option 2 described in that discussion
> (at least I think it is?).
Hi Alan,
Yes, it's option #2, sorry should have noted it in the original message.
[...]
> > -static void ftype__recode_dwarf_types(struct tag *tag, struct cu *cu);
> > +/** Add @tuple to @ctx->mappings array, extend it if necessary. */
> > +static int push_btf_type_tag_mapping(struct btf_type_tag_mapping *tuple,
> > + struct recode_context *ctx)
> > +{
> > + if (ctx->nr_allocated == ctx->nr_entries) {
> > + uint32_t new_nr = ctx->nr_allocated * 2;
> > + void *new_array = reallocarray(ctx->mappings, new_nr,
> > + sizeof(ctx->mappings[0]));
>
> older libcs won't have reallocarray; might be good to either replace with realloc
> or define our own variant in dutil.h like was done with libbpf_reallocarray()?
Will use `realloc()`, thank you for the heads-up.
Thanks,
Eduard
next prev parent reply other threads:[~2023-03-14 11:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-13 2:17 [PATCH dwarves 0/1] Support for new btf_type_tag encoding Eduard Zingerman
2023-03-13 2:17 ` [PATCH dwarves 1/1] dwarf_loader: Support for btf:type_tag Eduard Zingerman
2023-03-14 10:30 ` Alan Maguire
2023-03-14 11:21 ` Eduard Zingerman [this message]
2023-03-13 20:32 ` [PATCH dwarves 0/1] Support for new btf_type_tag encoding Arnaldo Carvalho de Melo
2023-03-13 23:35 ` Eduard Zingerman
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=1cb31e59286d33620e33d478fc8e948593e121ce.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=alan.maguire@oracle.com \
--cc=andrii@kernel.org \
--cc=arnaldo.melo@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=david.faust@oracle.com \
--cc=dwarves@vger.kernel.org \
--cc=jose.marchesi@oracle.com \
--cc=kernel-team@fb.com \
--cc=yhs@fb.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox