File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
src/BenchmarkDotNet/Engines Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -89,23 +89,30 @@ private IEnumerator<IterationData> EnumerateIterations()
89
89
MaybeSleep ( JitInfo . TieredDelay ) ;
90
90
91
91
// Attempt to promote methods to tier1, but don't spend too much time in jit stage.
92
+ int tierCount = JitInfo . IsDPGO ? 2 : 1 ;
93
+ ++ iterationIndex ;
94
+
92
95
StartedClock startedClock = parameters . TargetJob . ResolveValue ( InfrastructureMode . ClockCharacteristic , parameters . Resolver ) . Start ( ) ;
96
+ yield return GetOverheadIterationData ( ) ;
97
+ yield return GetWorkloadIterationData ( ) ;
93
98
94
- int tierCount = JitInfo . IsDPGO ? 2 : 1 ;
95
- for ( int i = 0 ; i < tierCount ; ++ i )
99
+ int callCount = JitInfo . TieredCallCountThreshold - 1 ;
100
+ for ( ; tierCount > = 0 ; -- tierCount )
96
101
{
97
- for ( int j = 0 ; j < JitInfo . TieredCallCountThreshold ; ++ j )
102
+ for ( ; callCount > = 0 ; -- callCount )
98
103
{
99
- ++ iterationIndex ;
100
- yield return GetOverheadIterationData ( ) ;
101
- yield return GetWorkloadIterationData ( ) ;
102
-
103
104
if ( startedClock . GetElapsed ( ) . GetTimeValue ( ) >= MaxTieringTime )
104
105
{
105
106
didStopEarly = true ;
106
107
yield break ;
107
108
}
109
+
110
+ ++ iterationIndex ;
111
+ yield return GetOverheadIterationData ( ) ;
112
+ yield return GetWorkloadIterationData ( ) ;
108
113
}
114
+
115
+ callCount = JitInfo . TieredCallCountThreshold ;
109
116
}
110
117
}
111
118
You can’t perform that action at this time.
0 commit comments