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()
91
91
// Attempt to promote methods to tier1, but don't spend too much time in jit stage.
92
92
StartedClock startedClock = parameters . TargetJob . ResolveValue ( InfrastructureMode . ClockCharacteristic , parameters . Resolver ) . Start ( ) ;
93
93
94
- for ( int tierCount = JitInfo . IsDPGO ? 2 : 1 ; tierCount >= 0 ; -- tierCount )
94
+ int remainingTiers = JitInfo . IsDPGO ? 2 : 1 ;
95
+ while ( remainingTiers > 0 )
95
96
{
96
- for ( int callCount = JitInfo . TieredCallCountThreshold ; callCount >= 0 ; -- callCount )
97
+ -- remainingTiers ;
98
+ int remainingCalls = JitInfo . TieredCallCountThreshold ;
99
+ while ( remainingCalls > 0 )
97
100
{
101
+ -- remainingCalls ;
98
102
++ iterationIndex ;
99
103
yield return GetOverheadIterationData ( ) ;
100
104
yield return GetWorkloadIterationData ( ) ;
101
105
102
- if ( ( tierCount + callCount ) > 0
106
+ if ( ( remainingTiers + remainingCalls ) > 0
103
107
&& startedClock . GetElapsed ( ) . GetTimeValue ( ) >= MaxTieringTime )
104
108
{
105
109
didStopEarly = true ;
You can’t perform that action at this time.
0 commit comments