File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/BenchmarkDotNet/Engines Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -91,15 +91,19 @@ private IEnumerator<IterationData> EnumerateIterations()
9191 // Attempt to promote methods to tier1, but don't spend too much time in jit stage.
9292 StartedClock startedClock = parameters . TargetJob . ResolveValue ( InfrastructureMode . ClockCharacteristic , parameters . Resolver ) . Start ( ) ;
9393
94- for ( int tierCount = JitInfo . IsDPGO ? 2 : 1 ; tierCount >= 0 ; -- tierCount )
94+ int remainingTiers = JitInfo . IsDPGO ? 2 : 1 ;
95+ while ( remainingTiers > 0 )
9596 {
96- for ( int callCount = JitInfo . TieredCallCountThreshold ; callCount >= 0 ; -- callCount )
97+ -- remainingTiers ;
98+ int remainingCalls = JitInfo . TieredCallCountThreshold ;
99+ while ( remainingCalls > 0 )
97100 {
101+ -- remainingCalls ;
98102 ++ iterationIndex ;
99103 yield return GetOverheadIterationData ( ) ;
100104 yield return GetWorkloadIterationData ( ) ;
101105
102- if ( ( tierCount + callCount ) > 0
106+ if ( ( remainingTiers + remainingCalls ) > 0
103107 && startedClock . GetElapsed ( ) . GetTimeValue ( ) >= MaxTieringTime )
104108 {
105109 didStopEarly = true ;
You can’t perform that action at this time.
0 commit comments