Open
Description
See #84264 for context
A number of microbenchmarks—particularly those under System.Text.Json
—run out of budget when run with TieredPGO.
- System.Text.Json.Tests.Perf_Get.GetByte and related
- System.Text.Json.Serialization.Tests.WriteJson<ImmutableDictionary<String, String>>.SerializeToWriter(Mode: SourceGen)
- Also, a good example is When calculating xxhash, net7.0 is slower than net6.0 #90090 (with a temp workaround in Mark XxHash64.Complete as noinline #90142) that illustrates the problem.
Suggest that we review RWC/SPMI to see how often this thing comes up outside of microbenchmarks.
Possible fixes
- increase budget (if these cases are rare)
- reduce amount of
AggressiveInlining
inSystem.Text.Json
(if these cases are all json related) - rework inliner to consider candidates in priority order