Skip to content

Commit e715d5b

Browse files
authored
improve JitStatsDiagnoser based on feedback from @kouvel (#2246)
1 parent 0c26996 commit e715d5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BenchmarkDotNet.Diagnostics.Windows/JitStatsDiagnoser.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ protected override void AttachToEvents(TraceEventSession session, BenchmarkCase
4848
}
4949
};
5050

51-
session.Source.Clr.TieredCompilationBackgroundJitStart += tieredData =>
51+
session.Source.Clr.TieredCompilationBackgroundJitStop += tieredData =>
5252
{
5353
if (StatsPerProcess.TryGetValue(tieredData.ProcessID, out JitStats jitStats))
5454
{
55-
Interlocked.Increment(ref jitStats.MethodsTiered);
55+
Interlocked.Add(ref jitStats.MethodsTiered, tieredData.JittedMethodCount);
5656
}
5757
};
5858
}

0 commit comments

Comments
 (0)