Open
Description
From dotnet/coreclr#27238 (comment)
Repro:
using System;
using System.Runtime.CompilerServices;
using System.Threading;
static class PerfViewTierEventsTest
{
private static void Main()
{
var t = new Thread(Run);
t.IsBackground = true;
t.Start();
Thread.Sleep(2000);
Console.Write("Enter to stop: ");
Console.ReadLine();
}
[MethodImpl(MethodImplOptions.NoInlining)]
private static void Run()
{
while (true)
++s_value;
}
private static int s_value;
}
From command prompt:
set COMPlus_TieredCompilation=0
- Build and run the repro
- After
"Enter to stop:"
is printed, start profiling in PerfView - After a few seconds, press enter on the app and wait for it to shut down
- Stop profiling in PerfView
CPU stacks:
Name Exc % Exc Inc % Inc Fold When First Last
?!0x7ffe959f9216 93.6 3,568 93.7 3,572 0 _69999999999999999990___________ 250.452 3,858.991
Expected behavior is that the frame with the highest number of samples is correctly named and it is possible to drill into the source code to see sample counts by line.
Event stats:
Name | Count | AverageSize | StackCount |
---|---|---|---|
Microsoft-Windows-DotNETRuntimeRundown/Method/DCStopVerbose | 68513 | 337 | 0 |
Microsoft-Windows-DotNETRuntimeRundown/Method/ILToNativeMapDCStop | 61645 | 107 | 0 |
Although counts are shown for the events, they are not listed in the Events view when PerfView is started with -KeepAllEvents
.
Also not sure why there would be so many of these events, looks like the counts may be incorrect as well.