• Jakob Gruber's avatar
    [code] Move the unwinding info into metadata area · c5379162
    Jakob Gruber authored
    Semantically, the unwinding info is a variable-size metadata table
    with untagged (i.e. no relocation needed) contents, packed inside Code
    objects. This is just like other metadata tables (safepoint table,
    handler table, constant pool, code comments); but for historical
    reasons it's been treated differently so far. Unlike these other
    tables, the unwinding info was located *after* InstructionEnd, and its
    size was written to the first 8 bytes after InstructionEnd.
    
    This CL makes unwinding info handling more consistent with other
    metadata tables by writing its offset into a dedicated
    kUnwindingInfoOffsetOffset header slot, and by moving the actual data
    inside the [InstructionStart,InstructionEnd[ area. In follow-up CLs,
    this area will be split into dedicated instruction- and metadata
    areas.
    
    A picture is worth 1000 words, before:
    
     +--------------------------+  <-- raw_instruction_start()
     |       instructions       |
     |           ...            |
     +--------------------------+
     |     embedded metadata    |  <-- safepoint_table_offset()
     |           ...            |  <-- handler_table_offset()
     |                          |  <-- constant_pool_offset()
     |                          |  <-- code_comments_offset()
     |    padding to the next   |
     |  8-byte aligned address  |
     +--------------------------+  <-- raw_instruction_end()
     |   [unwinding_info_size]  |
     |        as uint64_t       |
     +--------------------------+  <-- unwinding_info_start()
     |       unwinding info     |
     |            ...           |
     +--------------------------+  <-- unwinding_info_end()
    
    After:
    
     +--------------------------+  <-- raw_instruction_start()
     |       instructions       |
     |           ...            |
     +--------------------------+
     |     embedded metadata    |  <-- safepoint_table_offset()
     |           ...            |  <-- handler_table_offset()
     |                          |  <-- constant_pool_offset()
     |                          |  <-- code_comments_offset()
     |                          |  <-- unwinding_info_offset()
     |                          |
     +--------------------------+  <-- raw_instruction_end()
    
    Bug: v8:11036
    Change-Id: I649708821acc5365186ca2c9cff2669fc3e91fd3
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2484795Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
    Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70640}
    c5379162
Name
Last commit
Last update
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.flake8 Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
COMMON_OWNERS Loading commit data...
DEPS Loading commit data...
ENG_REVIEW_OWNERS Loading commit data...
INFRA_OWNERS Loading commit data...
INTL_OWNERS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
MIPS_OWNERS Loading commit data...
OWNERS Loading commit data...
PPC_OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
S390_OWNERS Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...