From: "Jose E. Marchesi" <jose.marchesi@oracle.com>
To: Richard Biener <rguenther@suse.de>
Cc: Indu Bhagat <indu.bhagat@oracle.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH V7 4/7] CTF/BTF debug formats
Date: Fri, 30 Apr 2021 18:11:34 +0200 [thread overview]
Message-ID: <875z03kb0p.fsf@oracle.com> (raw)
In-Reply-To: <nycvar.YFH.7.76.2104300804390.9200@zhemvz.fhfr.qr> (Richard Biener's message of "Fri, 30 Apr 2021 08:17:49 +0200 (CEST)")
>> For a moment, for the sake of this question, if we establish that CTF/BTF
>> generation always feeds off DWARF DIEs (so there is no need to access
>> type/decl tree nodes), what will it take to keep LTO support while keeping
>> ctf_debug_finalize in dwarf2out_finish ?
>
> I don't think it's possible without major surgery. Now, it looks like
> you want to emit .ctf at the LTO compile stage and BTF at the LTRANS
> stage. Note you do not have access to the CTF data produced at the
> LTRANS stage. What DWARF has access to is pointers (symbol name + offset)
> to the early DWARF generated DIEs for GCCs tree decls from what it
> adds DW_AT_abstract_origin references and then amending those entities
> with furthr DWARF attributes.
>
> Now, the "major surgery" could for example entail streaming the CTF
> data you produce from compile through WPA to the LTRANS stage. Or
> alternatively simply reading it from the compile time produced objects
> by means of the DWARF DIE references. I don't know what kind of (if any)
> references you need to produce from BTF to the CTF data (I suppose they
> might share indexes into a same symbol table...).
I am thinking, given that we have both "early DWARF" and "late DWARF",
we may want to have three init/fini hooks for debug formats instead of
two:
DEBUG_FORMAT_initialize (called in dwarf2out_early_finish)
[... traverse early DWARF (DEBUG_FORMAT_do_die) ...]
DEBUG_FORMAT_early_finish (called in dwarf2out_early_finish)
DEBUG_FORMAT_finish (called in dwarf2out_finish)
Note that CTF and BTF share the ctfc internal data structure (which is
built from traversing the early DWARF) but these are otherwise distinct
debug formats: CTF can be completely emitted in ctf_early_finish,
whereas BTF needs additional information that is only available in
ctf_finish.)
next prev parent reply other threads:[~2021-04-30 16:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-29 12:10 Richard Biener
2021-04-29 20:02 ` Indu Bhagat
2021-04-29 22:08 ` Indu Bhagat
2021-04-30 6:17 ` Richard Biener
2021-04-30 16:11 ` Jose E. Marchesi [this message]
2021-04-30 18:53 ` David Faust
2021-05-03 9:01 ` Richard Biener
2021-05-07 17:50 ` Indu Bhagat
-- strict thread matches above, loose matches on Subject: below --
2021-04-19 16:47 [PATCH V7 0/7] Support for the CTF and BTF " Jose E. Marchesi
2021-04-19 16:47 ` [PATCH V7 4/7] CTF/BTF " Jose E. Marchesi
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=875z03kb0p.fsf@oracle.com \
--to=jose.marchesi@oracle.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=indu.bhagat@oracle.com \
--cc=rguenther@suse.de \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).