Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GR-56599] Create type units for types during debuginfo generation for referencing across multiple debug info files. #9802

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

graalvmbot
Copy link
Collaborator

Each type is currently generated within a compilation unit, with no way to reference it from outside the .debug_info section. During debuginfo generation at image runtime, we have to create a separate debuginfo file that references types generated during image build. This would require to reproduce debuginfo for types that was already created at image build.

One way to reference types in different objectfiles is to put them into so-called type units and create type signatures that can be used as references. Each type is placed in its own type unit and type references will be changed to refer to the type units. During the runtime debuginfo generation, we can then reference existing types by the type signature.

Type units were introduced in DWARF 4 in their own debugging section (.debug_types) and moved to the .debug_info section in DWARF 5 to reduce overhead. As a change to DWARF 5 requires little changes and makes creating type units more convenient, we will also update the DWARF version of the .debug_info section to DWARF 5.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 2, 2024
@graalvmbot graalvmbot force-pushed the doma/GR-56599 branch 3 times, most recently from 6e1b849 to 12ee8a5 Compare October 22, 2024 08:20
@olpaw
Copy link
Member

olpaw commented Nov 27, 2024

Hi @dominikmascherbauer

the PR is in good shape already. I only have a few questions before we can merge this:

  • Did you check if this causes any regressions in debuginfo generation time of the image builder?
  • Is it guaranteed that the classloader contributes to the type signatures for everything except primitive types?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants