Skip to content

Commit

Permalink
Couple of debug info test fixes (#62199)
Browse files Browse the repository at this point in the history
It looks like in CI we are seeing a null method ID in some cases when
this test is run under R2R and GC stress. Add a check for this, and also
mark the test as stress incompatible like other ETW tests, since it runs
very slowly under stress modes.

Fix #62118
  • Loading branch information
jakobbotsch authored Dec 1, 2021
1 parent 7ffc96e commit cc2cb04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tests/JIT/Directed/debugging/debuginfo/tester.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ private static Func<int> ValidateMappings(EventPipeEventSource source)
source.Clr.MethodLoadVerbose += e => methodTier[e.MethodID] = e.OptimizationTier;
source.Clr.MethodILToNativeMap += e =>
{
if (e.MethodID == 0)
return;

var mappings = new (int, int)[e.CountOfMapEntries];
for (int i = 0; i < mappings.Length; i++)
mappings[i] = (e.ILOffset(i), e.NativeOffset(i));
Expand Down
2 changes: 2 additions & 0 deletions src/tests/JIT/Directed/debugging/debuginfo/tester.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<DebugType>PdbOnly</DebugType>
<Optimize>True</Optimize>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<UnloadabilityIncompatible>true</UnloadabilityIncompatible>
<GCStressIncompatible>true</GCStressIncompatible>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="tests_d.ilproj" Aliases="tests_d" />
Expand Down

0 comments on commit cc2cb04

Please sign in to comment.