From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: dwarves@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
bpf@vger.kernel.org, Alan Maguire <alan.maguire@oracle.com>,
Jiri Olsa <jolsa@kernel.org>, Jan Engelhardt <jengelh@inai.de>,
Matthias Schwarzott <zzam@gentoo.org>,
Viktor Malik <vmalik@redhat.com>,
Eduard Zingerman <eddyz87@gmail.com>,
Jan Alexander Steffens <heftig@archlinux.org>,
Domenico Andreoli <cavok@debian.org>,
Dominique Leuenberger <dimstar@opensuse.org>,
Daniel Xu <dxu@dxuuu.xyz>,
Yonghong Song <yonghong.song@linux.dev>,
llvm@lists.linux.dev
Subject: [PATCH fyi 1/1] dwarf_loader: Add missing cus__add(cus, cu) to cus__merge_and_process_cu()
Date: Tue, 18 Jun 2024 11:30:07 -0300 [thread overview]
Message-ID: <ZnGZ71a4E29kPrvS@x1> (raw)
In-Reply-To: <ZnGQ8CDRaMBIj5R5@x1>
Just FYI, I added this on top of the previous one initializing cu->node.
Tested with that cast_common.ko and the vmlinux you made available.
- Arnaldo
---
In cus__finalize() if cu__finalize() returns LSK__DELETE, i.e. if the
tool processing the cu is done with it, we will assume that it is in the
cus list of cu instances, remove it and then delete it.
This was not being done by cus__merge_and_process_cu(), used when
merging all DWARF CUs into a single 'struct cu', such as when processing
binaries generated by clang using LTO. Add the missing cus__add() to
keep cus->nr_entries consistent.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
dwarf_loader.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dwarf_loader.c b/dwarf_loader.c
index b832c93cc2194eaf..3caf32457f42ec2e 100644
--- a/dwarf_loader.c
+++ b/dwarf_loader.c
@@ -3452,6 +3452,7 @@ static int cus__merge_and_process_cu(struct cus *cus, struct conf_load *conf,
cu->priv = dcu;
cu->dfops = &dwarf__ops;
cu->language = attr_numeric(cu_die, DW_AT_language);
+ cus__add(cus, cu);
}
Dwarf_Die child;
--
2.45.0
next prev parent reply other threads:[~2024-06-18 14:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ZmjBHWw-Q5hKBiwA@x1>
2024-06-13 21:40 ` ANNOUNCE: pahole v1.27 (reproducible builds, BTF kfuncs) Nathan Chancellor
2024-06-17 19:39 ` Arnaldo Carvalho de Melo
2024-06-17 20:02 ` [PATCH/RFT] " Arnaldo Carvalho de Melo
2024-06-17 21:08 ` Nathan Chancellor
2024-06-18 13:51 ` Arnaldo Carvalho de Melo
2024-06-18 14:30 ` Arnaldo Carvalho de Melo [this message]
2024-07-10 19:31 ` Nathan Chancellor
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=ZnGZ71a4E29kPrvS@x1 \
--to=acme@kernel.org \
--cc=alan.maguire@oracle.com \
--cc=bpf@vger.kernel.org \
--cc=cavok@debian.org \
--cc=dimstar@opensuse.org \
--cc=dwarves@vger.kernel.org \
--cc=dxu@dxuuu.xyz \
--cc=eddyz87@gmail.com \
--cc=heftig@archlinux.org \
--cc=jengelh@inai.de \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=vmalik@redhat.com \
--cc=yonghong.song@linux.dev \
--cc=zzam@gentoo.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;
as well as URLs for NNTP newsgroup(s).