|
90 | 90 | [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] |
91 | 91 | private void Dummy1() |
92 | 92 | { |
93 | | - dummyVar++;@DummyUnroll@ |
| 93 | + @DummyUnroll@ |
94 | 94 | } |
95 | 95 |
|
96 | 96 | [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] |
97 | 97 | private void Dummy2() |
98 | 98 | { |
99 | | - dummyVar++;@DummyUnroll@ |
| 99 | + @DummyUnroll@ |
100 | 100 | } |
101 | 101 |
|
102 | 102 | [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] |
103 | 103 | private void Dummy3() |
104 | 104 | { |
105 | | - dummyVar++;@DummyUnroll@ |
| 105 | + @DummyUnroll@ |
106 | 106 | } |
107 | 107 |
|
108 | 108 | private $OverheadMethodReturnTypeName$ __Overhead($ArgumentsDefinition$) // __ is to avoid possible name conflict |
|
122 | 122 |
|
123 | 123 | partial void __SetContinuation() => continuation = __Continuation; |
124 | 124 |
|
| 125 | +#if NETCOREAPP3_0_OR_GREATER |
| 126 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 127 | +#endif |
125 | 128 | // Awaits are not unrolled. |
126 | 129 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> OverheadActionUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
127 | 130 | { |
128 | 131 | return OverheadActionImpl(invokeCount, clock); |
129 | 132 | } |
130 | 133 |
|
| 134 | +#if NETCOREAPP3_0_OR_GREATER |
| 135 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 136 | +#endif |
131 | 137 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> OverheadActionNoUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
132 | 138 | { |
133 | 139 | return OverheadActionImpl(invokeCount, clock); |
134 | 140 | } |
135 | 141 |
|
| 142 | +#if NETCOREAPP3_0_OR_GREATER |
| 143 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 144 | +#endif |
136 | 145 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> OverheadActionImpl(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
137 | 146 | { |
138 | 147 | repeatsRemaining = invokeCount; |
|
154 | 163 | return new System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan>(startedClock.GetElapsed()); |
155 | 164 | } |
156 | 165 |
|
| 166 | +#if NETCOREAPP3_0_OR_GREATER |
| 167 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 168 | +#endif |
157 | 169 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> WorkloadActionUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
158 | 170 | { |
159 | 171 | return WorkloadActionImpl(invokeCount, clock); |
160 | 172 | } |
161 | 173 |
|
| 174 | +#if NETCOREAPP3_0_OR_GREATER |
| 175 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 176 | +#endif |
162 | 177 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> WorkloadActionNoUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
163 | 178 | { |
164 | 179 | return WorkloadActionImpl(invokeCount, clock); |
165 | 180 | } |
166 | 181 |
|
| 182 | +#if NETCOREAPP3_0_OR_GREATER |
| 183 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 184 | +#endif |
167 | 185 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> WorkloadActionImpl(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
168 | 186 | { |
169 | 187 | repeatsRemaining = invokeCount; |
|
172 | 190 | return new System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan>(valueTaskSource, valueTaskSource.Version); |
173 | 191 | } |
174 | 192 |
|
| 193 | +#if NETCOREAPP3_0_OR_GREATER |
| 194 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 195 | +#endif |
175 | 196 | private void __RunTask() |
176 | 197 | { |
177 | 198 | try |
|
199 | 220 | valueTaskSource.SetResult(clockspan); |
200 | 221 | } |
201 | 222 |
|
| 223 | +#if NETCOREAPP3_0_OR_GREATER |
| 224 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 225 | +#endif |
202 | 226 | private void __Continuation() |
203 | 227 | { |
204 | 228 | try |
|
236 | 260 |
|
237 | 261 | private BenchmarkDotNet.Engines.Consumer consumer = new BenchmarkDotNet.Engines.Consumer(); |
238 | 262 |
|
| 263 | +#if NETCOREAPP3_0_OR_GREATER |
| 264 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 265 | +#endif |
239 | 266 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> OverheadActionUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
240 | 267 | { |
241 | 268 | $LoadArguments$ |
|
247 | 274 | return new System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan>(startedClock.GetElapsed()); |
248 | 275 | } |
249 | 276 |
|
| 277 | +#if NETCOREAPP3_0_OR_GREATER |
| 278 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 279 | +#endif |
250 | 280 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> OverheadActionNoUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
251 | 281 | { |
252 | 282 | $LoadArguments$ |
|
258 | 288 | return new System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan>(startedClock.GetElapsed()); |
259 | 289 | } |
260 | 290 |
|
| 291 | +#if NETCOREAPP3_0_OR_GREATER |
| 292 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 293 | +#endif |
261 | 294 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> WorkloadActionUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
262 | 295 | { |
263 | 296 | $LoadArguments$ |
|
269 | 302 | return new System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan>(startedClock.GetElapsed()); |
270 | 303 | } |
271 | 304 |
|
| 305 | +#if NETCOREAPP3_0_OR_GREATER |
| 306 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 307 | +#endif |
272 | 308 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> WorkloadActionNoUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
273 | 309 | { |
274 | 310 | $LoadArguments$ |
|
294 | 330 |
|
295 | 331 | #elif RETURNS_NON_CONSUMABLE_STRUCT_$ID$ |
296 | 332 |
|
| 333 | +#if NETCOREAPP3_0_OR_GREATER |
| 334 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 335 | +#endif |
297 | 336 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> OverheadActionUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
298 | 337 | { |
299 | 338 | $LoadArguments$ |
|
307 | 346 | return new System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan>(startedClock.GetElapsed()); |
308 | 347 | } |
309 | 348 |
|
| 349 | +#if NETCOREAPP3_0_OR_GREATER |
| 350 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 351 | +#endif |
310 | 352 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> OverheadActionNoUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
311 | 353 | { |
312 | 354 | $LoadArguments$ |
|
320 | 362 | return new System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan>(startedClock.GetElapsed()); |
321 | 363 | } |
322 | 364 |
|
| 365 | +#if NETCOREAPP3_0_OR_GREATER |
| 366 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 367 | +#endif |
323 | 368 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> WorkloadActionUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
324 | 369 | { |
325 | 370 | $LoadArguments$ |
|
333 | 378 | return new System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan>(startedClock.GetElapsed()); |
334 | 379 | } |
335 | 380 |
|
| 381 | +#if NETCOREAPP3_0_OR_GREATER |
| 382 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 383 | +#endif |
336 | 384 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> WorkloadActionNoUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
337 | 385 | { |
338 | 386 | $LoadArguments$ |
|
365 | 413 |
|
366 | 414 | #elif RETURNS_BYREF_$ID$ |
367 | 415 |
|
| 416 | +#if NETCOREAPP3_0_OR_GREATER |
| 417 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 418 | +#endif |
368 | 419 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> OverheadActionUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
369 | 420 | { |
370 | 421 | $LoadArguments$ |
|
378 | 429 | return new System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan>(startedClock.GetElapsed()); |
379 | 430 | } |
380 | 431 |
|
| 432 | +#if NETCOREAPP3_0_OR_GREATER |
| 433 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 434 | +#endif |
381 | 435 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> OverheadActionNoUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
382 | 436 | { |
383 | 437 | $LoadArguments$ |
|
393 | 447 |
|
394 | 448 | private $WorkloadMethodReturnType$ workloadDefaultValueHolder = default($WorkloadMethodReturnType$); |
395 | 449 |
|
| 450 | +#if NETCOREAPP3_0_OR_GREATER |
| 451 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 452 | +#endif |
396 | 453 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> WorkloadActionUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
397 | 454 | { |
398 | 455 | $LoadArguments$ |
|
405 | 462 | BenchmarkDotNet.Engines.DeadCodeEliminationHelper.KeepAliveWithoutBoxing(ref alias); |
406 | 463 | return new System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan>(startedClock.GetElapsed()); |
407 | 464 | } |
408 | | - |
| 465 | + |
| 466 | +#if NETCOREAPP3_0_OR_GREATER |
| 467 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 468 | +#endif |
409 | 469 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> WorkloadActionNoUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
410 | 470 | { |
411 | 471 | $LoadArguments$ |
|
432 | 492 | } |
433 | 493 | #elif RETURNS_BYREF_READONLY_$ID$ |
434 | 494 |
|
| 495 | +#if NETCOREAPP3_0_OR_GREATER |
| 496 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 497 | +#endif |
435 | 498 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> OverheadActionUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
436 | 499 | { |
437 | 500 | $LoadArguments$ |
|
445 | 508 | return new System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan>(startedClock.GetElapsed()); |
446 | 509 | } |
447 | 510 |
|
| 511 | +#if NETCOREAPP3_0_OR_GREATER |
| 512 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 513 | +#endif |
448 | 514 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> OverheadActionNoUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
449 | 515 | { |
450 | 516 | $LoadArguments$ |
|
460 | 526 |
|
461 | 527 | private $WorkloadMethodReturnType$ workloadDefaultValueHolder = default($WorkloadMethodReturnType$); |
462 | 528 |
|
| 529 | +#if NETCOREAPP3_0_OR_GREATER |
| 530 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 531 | +#endif |
463 | 532 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> WorkloadActionUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
464 | 533 | { |
465 | 534 | $LoadArguments$ |
|
472 | 541 | BenchmarkDotNet.Engines.DeadCodeEliminationHelper.KeepAliveWithoutBoxingReadonly(alias); |
473 | 542 | return new System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan>(startedClock.GetElapsed()); |
474 | 543 | } |
475 | | - |
| 544 | + |
| 545 | +#if NETCOREAPP3_0_OR_GREATER |
| 546 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 547 | +#endif |
476 | 548 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> WorkloadActionNoUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
477 | 549 | { |
478 | 550 | $LoadArguments$ |
|
499 | 571 | } |
500 | 572 | #elif RETURNS_VOID_$ID$ |
501 | 573 |
|
| 574 | +#if NETCOREAPP3_0_OR_GREATER |
| 575 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 576 | +#endif |
502 | 577 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> OverheadActionUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
503 | 578 | { |
504 | 579 | $LoadArguments$ |
|
510 | 585 | return new System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan>(startedClock.GetElapsed()); |
511 | 586 | } |
512 | 587 |
|
| 588 | +#if NETCOREAPP3_0_OR_GREATER |
| 589 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 590 | +#endif |
513 | 591 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> OverheadActionNoUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
514 | 592 | { |
515 | 593 | $LoadArguments$ |
|
521 | 599 | return new System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan>(startedClock.GetElapsed()); |
522 | 600 | } |
523 | 601 |
|
| 602 | +#if NETCOREAPP3_0_OR_GREATER |
| 603 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 604 | +#endif |
524 | 605 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> WorkloadActionUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
525 | 606 | { |
526 | 607 | $LoadArguments$ |
|
532 | 613 | return new System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan>(startedClock.GetElapsed()); |
533 | 614 | } |
534 | 615 |
|
| 616 | +#if NETCOREAPP3_0_OR_GREATER |
| 617 | + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveOptimization)] |
| 618 | +#endif |
535 | 619 | private System.Threading.Tasks.ValueTask<Perfolizer.Horology.ClockSpan> WorkloadActionNoUnroll(System.Int64 invokeCount, Perfolizer.Horology.IClock clock) |
536 | 620 | { |
537 | 621 | $LoadArguments$ |
|
552 | 636 | $WorkloadMethodCall$; |
553 | 637 | } |
554 | 638 | } |
555 | | -#endif |
| 639 | +#endif // RETURNS |
556 | 640 | } |
0 commit comments