[RISC-V] Enable instruction printing for the Generate code phase in JIT dumps#122485
[RISC-V] Enable instruction printing for the Generate code phase in JIT dumps#122485SkyShield wants to merge 23 commits intodotnet:mainfrom
Generate code phase in JIT dumps#122485Conversation
|
@dotnet-policy-service agree |
PHASE Generate code of JIT dumpPHASE Generate code in JIT dump
tomeksowi
left a comment
There was a problem hiding this comment.
Can you run some asmdiffs to make sure these changes don't affect the actual codegen?
|
No differences were found when compared with Diffs are based on 87,412 contexts (85,743 MinOpts, 1,669 FullOpts). Overall (+0 bytes)
MinOpts (+0 bytes)
FullOpts (+0 bytes)
Example diffsSystem.mch+0 (0.00%) : 29.dasm - System.Diagnostics.Tracing.EventSource:InitializeDefaultEventSources() (FullOpts)No diffs found? +0 (0.00%) : 33.dasm - System.AppContext:TryGetSwitch(System.String,byref):bool (FullOpts)No diffs found? +0 (0.00%) : 109.dasm - System.RuntimeType+RuntimeTypeCache+MemberInfoCache`1[System.__Canon]:Populate(System.String,int,int):System.__Canon[]:this (FullOpts)No diffs found? +0 (0.00%) : 87356.dasm - System.Net.Http.HPack.HPackEncoder:EncodeLiteralHeaderFieldWithoutIndexingNewNameToAllocatedArray(System.String):byte[] (MinOpts)No diffs found? +0 (0.00%) : 87352.dasm - System.Net.Http.HPack.HPackEncoder:EncodeValueStringPart(System.String,System.Span`1[byte]) (MinOpts)No diffs found? +0 (0.00%) : 87348.dasm - System.Net.Http.HPack.HPackEncoder:EncodeLiteralHeaderFieldWithoutIndexing(int,System.Span`1[byte],byref):bool (MinOpts)No diffs found? DetailsSize improvements/regressions per collection
PerfScore improvements/regressions per collection
Context information
jit-analyze output |
|
After the change, asmdiffs showed no differences compared to Diffs are based on 87,627 contexts (85,970 MinOpts, 1,657 FullOpts). Overall (+0 bytes)
MinOpts (+0 bytes)
FullOpts (+0 bytes)
Example diffsSystem.mch+0 (0.00%) : 1409.dasm - System.Diagnostics.Process:GetNextArgument(System.String,byref):System.String (MinOpts)No diffs found? +0 (0.00%) : 1985.dasm - System.ModuleHandle:ResolveTypeHandle(int,System.RuntimeTypeHandle[],System.RuntimeTypeHandle[]):System.RuntimeTypeHandle:this (FullOpts)No diffs found? +0 (0.00%) : 3841.dasm - System.Timers.Timer:.ctor():this (MinOpts)No diffs found? +0 (0.00%) : 79424.dasm - System.Threading.RateLimiting.DefaultPartitionedRateLimiter`2+d__20[System.__Canon,long]:MoveNext():this (MinOpts)No diffs found? +0 (0.00%) : 78464.dasm - System.Net.Security.SslApplicationProtocol:.cctor() (MinOpts)No diffs found? +0 (0.00%) : 77568.dasm - System.Text.Encodings.Web.OptimizedInboxTextEncoder+AsciiPreescapedData:PopulatePreescapedData(byref,System.Text.Encodings.Web.ScalarEscaperBase):this (MinOpts)No diffs found? DetailsSize improvements/regressions per collection
PerfScore improvements/regressions per collection
Context information
jit-analyze output |
|
@jakobbotsch, PTAL. |
PHASE Generate code in JIT dumpGenerate code phase in JIT dumps
|
/ba-g Infra issues |
|
@SkyShield sorry for the delay here, can you please resolve the conflicts? |
|
No problem at all. |
|
Fixed the merge with main. Diffs are based on 155,724 contexts (119,056 MinOpts, 36,668 FullOpts). Base JIT options: JitDump=Main Diff JIT options: JitDump=Main Overall (+0 bytes)
MinOpts (+0 bytes)
FullOpts (+0 bytes)
Example diffsSystem.mch+0 (0.00%) : 193.dasm - System.Globalization.CultureData:GetLocaleName(System.String,byref):bool (FullOpts)No diffs found? +0 (0.00%) : 449.dasm - System.Text.Ascii:ChangeCase[ushort,ushort,System.Text.Ascii+ToLowerConversion](ptr,ptr,nuint):nuint (FullOpts)No diffs found? +0 (0.00%) : 769.dasm - System.Text.RegularExpressions.RegexPrefixAnalyzer:FindFixedDistanceSets(System.Text.RegularExpressions.RegexNode,bool):System.Collections.Generic.List`1[System.Text.RegularExpressions.RegexFindOptimizations+FixedDistanceSet] (MinOpts)No diffs found? +0 (0.00%) : 154496.dasm - System.Reflection.Metadata.TypeDefinition:GetProjectedFlags():int:this (MinOpts)No diffs found? +0 (0.00%) : 153664.dasm - System.Reflection.Metadata.EventDefinition:GetAccessors():System.Reflection.Metadata.EventAccessors:this (MinOpts)No diffs found? +0 (0.00%) : 153600.dasm - System.Reflection.Metadata.BlobReader:TryReadCompressedSignedInteger(byref):bool:this (MinOpts)No diffs found? DetailsSize improvements/regressions per collection
PerfScore improvements/regressions per collection
Context information
jit-analyze output |
RISC-V instructions were not printed during
PHASE Generate code, which made debugging inconvenient.This PR enables printing RISC-V instructions when
JitDumpis set:Before (
PHASE Generate code):After (
PHASE Generate code):Limitation
In the current RISC-V implementation, it's difficult to compute the actual jump offset during CodeGen. Thus, a placeholder "??" is printed instead.
@clamp03 @tomeksowi @namu-lee @credo-quia-absurdum
part of #84834, cc @dotnet/samsung