Skip to content

Commit 8505c55

Browse files
rmacnak-googleCommit Queue
authored andcommitted
[vm] Evaluate abstract origin DIE offsets sooner in DWARF assembly output.
This greatly improves assembler performance in XCode 16, presumably by convincing the assembler it doesn't need to keep track of relocations for abstract origin labels. TEST=ci Bug: #43299 Bug: b/410018517 Change-Id: I68c6783d76bdf3c818c460c9a2cf559b88544993 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/422540 Commit-Queue: Ryan Macnak <[email protected]> Reviewed-by: Alexander Aprelev <[email protected]>
1 parent 8fb4afa commit 8505c55

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

runtime/vm/image_snapshot.cc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,15 +1076,11 @@ class DwarfAssemblyStream : public DwarfWriteStream {
10761076
void InitializeAbstractOrigins(intptr_t size) {}
10771077
void RegisterAbstractOrigin(intptr_t index) {
10781078
// Label for DW_AT_abstract_origin references
1079-
stream_->Printf(".Lfunc%" Pd ":\n", index);
1079+
stream_->Printf("Lfunc%" Pd " = .-%s\n", index, kDebugInfoLabel);
10801080
}
10811081
void AbstractOrigin(intptr_t index) {
1082-
// Assignment to temp works around buggy Mac assembler.
1083-
stream_->Printf("Ltemp%" Pd " = .Lfunc%" Pd " - %s\n", temp_, index,
1084-
kDebugInfoLabel);
1085-
stream_->Printf("%s Ltemp%" Pd "\n", kSizeDirectives[kInt32SizeLog2],
1086-
temp_);
1087-
temp_++;
1082+
stream_->Printf("%s Lfunc%" Pd "\n", kSizeDirectives[kInt32SizeLog2],
1083+
index);
10881084
}
10891085

10901086
// Methods for writing the assembly prologues for various DWARF sections.

0 commit comments

Comments
 (0)