Enable COMPlus_JitDisasmWithGC by default#45991
Closed
BruceForstall wants to merge 1 commit intodotnet:masterfrom
Closed
Enable COMPlus_JitDisasmWithGC by default#45991BruceForstall wants to merge 1 commit intodotnet:masterfrom
BruceForstall wants to merge 1 commit intodotnet:masterfrom
Conversation
Change the default disassembly output to include interleaved GC info
using the `COMPlus_JitDisasmWithGC` mechanism. With this, asm diffs
will automatically include GC info diffs. You can revert to the previous behavior
(no interleaved GC info) by setting `COMPlus_JitDisasmWithGC=0`.
Note that `COMPlus_JitDisasmWithGC` uses codegen GC tracking info to
display GC info; it does not decode the actual generated GC info or the
emitter-level GC tracking info, so there can still be GC info bugs not
shown with this display.
The motivation behind this change to make GC info tracking more visible
for all JIT changes.
The output is roughly like the SOS `u -gcinfo` display.
Example (with lots of GC info):
```
call System.Collections.Immutable.ImmutableArray:ToImmutableArray(System.Collections.Generic.IEnumerable`1[__Canon]):System.Collections.Immutable.ImmutableArray`1[__Canon]
; gcrRegs -[rdx rdi] +[rax]
; gcr arg pop 0
mov gword ptr [rbp-80H], rax
; GC ptr vars +{V25}
mov rdx, r14
; gcrRegs +[rdx]
mov rcx, 0xD1FFAB1E
; GC ptr vars -{V25}
call System.Collections.Immutable.ImmutableArray:ToImmutableArray(System.Collections.Generic.IEnumerable`1[__Canon]):System.Collections.Immutable.ImmutableArray`1[__Canon]
; gcrRegs -[rdx r14]
; gcr arg pop 0
mov gword ptr [rbp-88H], rax
; GC ptr vars +{V26}
```
Related: dotnet#41647
Contributor
Author
|
@dotnet/jit-contrib PTAL Comments on this change? |
Member
|
I guess I'd prefer not to have it on by default... but perhaps PMI/SPMI can turn it on when they generate ASM? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change the default disassembly output to include interleaved GC info
using the
COMPlus_JitDisasmWithGCmechanism. With this, asm diffswill automatically include GC info diffs. You can revert to the previous behavior
(no interleaved GC info) by setting
COMPlus_JitDisasmWithGC=0.Note that
COMPlus_JitDisasmWithGCuses codegen GC tracking info todisplay GC info; it does not decode the actual generated GC info or the
emitter-level GC tracking info, so there can still be GC info bugs not
shown with this display.
The motivation behind this change to make GC info tracking more visible
for all JIT changes.
The output is roughly like the SOS
u -gcinfodisplay.Example (with lots of GC info):
Related: #41647