Skip to content

[Native] Make GetTypeInfo Iterative to Prevent Native Stack Exhaustion#8708

Merged
link04 merged 2 commits into
masterfrom
maximo/apms-19659-gettypeinfo-depth-cap
Jun 5, 2026
Merged

[Native] Make GetTypeInfo Iterative to Prevent Native Stack Exhaustion#8708
link04 merged 2 commits into
masterfrom
maximo/apms-19659-gettypeinfo-depth-cap

Conversation

@link04

@link04 link04 commented May 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes a native stack exhaustion in Datadog.Tracer.Native.dll on 32-bit IIS worker processes.

PR #4415 added a recursion depth cap for mdtTypeSpec / ELEMENT_TYPE_GENERICINST cycles in GetTypeInfo, but the other recursive paths were still uncapped:

  • type_extends, which walks the inheritance chain
  • parent_type_token, which walks the nested class hierarchy

During ReJIT, rejit_preprocessor enumerates every TypeDef in an assembly and calls GetTypeInfo for Derived/Interface integrations. Customer assemblies with deeply chained non-generic inheritance (or deep nesting) can recurse far enough to use up the ~256 KB default thread stack on x86 (each GetTypeInfo frame takes about 2 KB for type_name), which faults the process.

Instead of capping the depth, which would silently stop resolving legitimately deep hierarchies that used to work, this PR converts the recursion into an iterative, queue-based traversal. That removes the stack pressure without putting any limit on how deep we go.

Here's what changed:

  • Added ResolveTypeInfoLeaf, which reads a single token's immediate metadata (name, flags, direct type_extends, direct parent_type_token) without recursing into base or enclosing types. When it unwraps a TypeSpec generic instantiation it only tracks the TypeSpecs seen on the current unwrap path, so sibling branches can't cause false cycle detection.
  • GetTypeInfo now runs in three phases. First it does a breadth-first walk over a std::deque work queue, reading each reachable token's leaf exactly once and adding any newly found base or enclosing tokens to the queue. Then it builds one TypeInfo node per token (valueType comes from the base leaf's name, which is already resolved). Finally it links each node's extend_from and parent_type to the nodes it built.
  • Since each token is resolved at most once, malformed cyclic metadata can no longer loop forever. Before this, it would have overflowed the stack.
  • GetSigTypeTokName is left exactly as it is on master. Its recursion is bounded by how deeply a signature is nested rather than by type chains, it now calls the iterative GetTypeInfo, and its TypeSpec cycle was already handled by [BugFix] Break recursion in GetTypeInfo #4415.

Testing

What we built locally (removed before push)

File / area Purpose Why removed
Samples.DeepTypeHierarchy/DeepNonGenericChains.cs 100-level non-generic inheritance chain plus 50-level nested classes to trigger GetTypeInfo recursion Would add ~150 new types and a new test assembly to the repo
Samples.DeepTypeHierarchy/Samples.DeepTypeHierarchy.csproj Builds the above as metadata input for native tests Same, scope beyond the fix
clr_helper_deep_hierarchy_test.cpp Native gtest that loads that DLL, enumerates all TypeDefs and calls GetTypeInfo (mirrors rejit_preprocessor) Depends on the test assembly above
Datadog.Tracer.Native.Tests.vcxproj changes Project ref to Samples.DeepTypeHierarchy and StackReserveSize=262144 on x86 Release to match the IIS w3wp stack Only needed for the automated regression
regression/DeepNestedHierarchy/DeepNonGenericChains.cs Managed smoke-test sample for the IIS/profiler path Blocked on full monitoring-home setup, and the native metadata test was enough to validate the root cause

We first added the deep types to Samples.ExampleLibrary, which broke 3 existing native tests (EnumeratesTypeDefs, GetsTypeInfoFromTypeDefs, GetsTypeInfoFromMethods) because their expected type lists no longer matched. Moving the types to a dedicated assembly fixed that, but it still added a lot of test infrastructure, so we dropped it for this PR.

How we verified the fix: with that native gtest in place and the test executable forced to a 256 KB stack using editbin /STACK:262144 (the default test-host stack is around 1 MB and hides the problem), the deep-hierarchy test crashed with a stack overflow before the change and passed after it. The existing native suite (89 tests, x86 Release) also passes with the change.

Follow-up (optional): land the Samples.DeepTypeHierarchy sample, the native gtest, and the x86 StackReserveSize=262144 in a separate PR so CI catches this automatically, the same way PR #4415 added TypeSpec coverage.

Local validation (Windows)

  • VS 2022 Preview, required for native builds (VsDevCmd.bat)
  • Windows SDK 10.0.19041, installed via winget (unblocked CompileNativeLoaderWindows)
  • IIS, W3SVC running. We didn't use it for the final validation because the native metadata test hits the same code path more directly.
  • Debugging Tools, cdb.exe available under C:\Program Files (x86)\Windows Kits\10\Debuggers\ after the SDK install. Customer dumps aren't in the workspace, so nothing was symbolicated in this PR.

APMS-19659: extend the depth limit from PR #4415 to type_extends, nested types, and GetSigTypeTokName so ReJIT TypeDef enumeration cannot exhaust the 32-bit IIS worker thread stack.
@link04
link04 requested a review from a team as a code owner May 28, 2026 22:17
@datadog-datadog-prod-us1-2

This comment has been minimized.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 77aea0c7a8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tracer/src/Datadog.Tracer.Native/clr_helpers.cpp Outdated
@pr-commenter

pr-commenter Bot commented May 28, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-05-29 16:41:02

Comparing candidate commit 491dad5 in PR branch maximo/apms-19659-gettypeinfo-depth-cap with baseline commit fcebc68 in branch master.

Found 0 performance improvements and 1 performance regressions! Performance is the same for 71 metrics, 0 unstable metrics, 62 known flaky benchmarks, 64 flaky benchmarks without significant changes.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartSpan_SetActive net472

  • 🟥 throughput [-10932.412op/s; -9198.833op/s] or [-6.367%; -5.357%]

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-7660.487op/s; -7131.411op/s] or [-9.083%; -8.456%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild netcoreapp3.1

  • 🟥 throughput [-8247.667op/s; -6905.894op/s] or [-8.386%; -7.022%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+315.548ms; +322.228ms] or [+156.586%; +159.901%]
  • 🟥 throughput [-41.128op/s; -37.463op/s] or [-7.400%; -6.740%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • 🟥 execution_time [+375.527ms; +380.398ms] or [+296.690%; +300.537%]
  • 🟩 throughput [+90.002op/s; +92.960op/s] or [+11.866%; +12.256%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 execution_time [+392.930ms; +398.337ms] or [+347.728%; +352.513%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net472

  • 🟥 allocated_mem [+1.308KB; +1.308KB] or [+27.528%; +27.540%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net6.0

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+9.976%; +9.987%]
  • 🟩 execution_time [-16.037ms; -11.849ms] or [-7.490%; -5.534%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody netcoreapp3.1

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.500%; +27.510%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net472

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.743%; +105.758%]
  • 🟥 throughput [-271499.592op/s; -267196.694op/s] or [-27.721%; -27.282%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net6.0

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+38.557%; +38.566%]
  • 🟩 execution_time [-26.866ms; -21.911ms] or [-11.981%; -9.771%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody netcoreapp3.1

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.288%; +105.304%]
  • 🟥 throughput [-155636.790op/s; -139621.164op/s] or [-22.362%; -20.061%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net6.0

  • 🟩 throughput [+8075.010op/s; +11012.286op/s] or [+5.138%; +7.007%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody netcoreapp3.1

  • 🟩 throughput [+8813.095op/s; +11444.519op/s] or [+7.021%; +9.117%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net6.0

  • 🟩 throughput [+487600.823op/s; +497500.436op/s] or [+16.259%; +16.589%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1

  • 🟩 execution_time [-19.173ms; -14.842ms] or [-8.838%; -6.842%]
  • 🟩 throughput [+178856.569op/s; +233067.784op/s] or [+7.099%; +9.251%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net472

  • 🟥 execution_time [+299.600ms; +300.356ms] or [+149.700%; +150.078%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net6.0

  • 🟥 execution_time [+299.406ms; +303.181ms] or [+150.991%; +152.895%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs netcoreapp3.1

  • 🟥 execution_time [+300.113ms; +302.660ms] or [+151.173%; +152.456%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net472

  • 🟥 execution_time [+297.492ms; +298.462ms] or [+146.116%; +146.592%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net6.0

  • 🟥 execution_time [+293.712ms; +297.968ms] or [+143.585%; +145.666%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1

  • 🟥 execution_time [+301.187ms; +302.754ms] or [+150.533%; +151.316%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net6.0

  • 🟥 execution_time [+21.050µs; +44.647µs] or [+6.720%; +14.254%]
  • 🟥 throughput [-417.437op/s; -218.838op/s] or [-13.013%; -6.822%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.895ms; +300.705ms] or [+149.678%; +150.083%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0

  • 🟥 execution_time [+406.821ms; +414.806ms] or [+442.028%; +450.704%]
  • 🟩 throughput [+648.836op/s; +861.046op/s] or [+5.332%; +7.075%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest netcoreapp3.1

  • unstable execution_time [+300.609ms; +349.138ms] or [+228.250%; +265.097%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+275.110ms; +326.817ms] or [+126.493%; +150.268%]
  • 🟥 throughput [-517.201op/s; -469.178op/s] or [-46.863%; -42.512%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • unstable execution_time [+197.780ms; +331.014ms] or [+84.286%; +141.064%]
  • 🟥 throughput [-675.274op/s; -591.706op/s] or [-45.041%; -39.467%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 execution_time [+344.424ms; +353.579ms] or [+206.006%; +211.482%]
  • 🟥 throughput [-419.039op/s; -381.079op/s] or [-29.177%; -26.534%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0

  • 🟩 execution_time [-89.305µs; -58.982µs] or [-8.282%; -5.470%]
  • 🟩 throughput [+53.708op/s; +90.116op/s] or [+5.791%; +9.716%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net6.0

  • 🟩 execution_time [-177.359µs; -109.379µs] or [-8.984%; -5.541%]
  • 🟩 throughput [+32.809op/s; +50.763op/s] or [+6.477%; +10.021%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+305.354ms; +307.134ms] or [+153.771%; +154.667%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net6.0

  • 🟥 execution_time [+302.843ms; +305.613ms] or [+151.755%; +153.143%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch netcoreapp3.1

  • 🟥 execution_time [+300.537ms; +304.179ms] or [+150.977%; +152.807%]
  • 🟩 throughput [+29270.112op/s; +37272.958op/s] or [+6.166%; +7.852%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+304.217ms; +306.653ms] or [+152.767%; +153.991%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net6.0

  • 🟥 execution_time [+299.722ms; +301.511ms] or [+148.199%; +149.084%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync netcoreapp3.1

  • 🟥 execution_time [+300.591ms; +304.506ms] or [+152.353%; +154.337%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+301.771ms; +303.831ms] or [+151.462%; +152.496%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net6.0

  • 🟥 execution_time [+301.618ms; +304.414ms] or [+150.329%; +151.722%]
  • 🟩 throughput [+52111.384op/s; +56277.529op/s] or [+10.348%; +11.175%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync netcoreapp3.1

  • 🟥 execution_time [+301.589ms; +304.742ms] or [+150.038%; +151.606%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0

  • 🟩 execution_time [-16.531ms; -12.853ms] or [-7.687%; -5.977%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net472

  • unstable execution_time [+1.124µs; +45.558µs] or [+0.278%; +11.253%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net6.0

  • 🟩 allocated_mem [-25.249KB; -25.226KB] or [-9.210%; -9.202%]
  • unstable execution_time [-46.865µs; +9.188µs] or [-9.263%; +1.816%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark netcoreapp3.1

  • unstable execution_time [-35.706µs; +28.605µs] or [-6.188%; +4.957%]
  • unstable throughput [-71.043op/s; +104.879op/s] or [-4.059%; +5.992%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472

  • 🟥 allocated_mem [+8.190KB; +8.196KB] or [+16.663%; +16.675%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net6.0

  • unstable execution_time [+7.075µs; +12.156µs] or [+16.723%; +28.732%]
  • 🟥 throughput [-5226.660op/s; -3242.122op/s] or [-22.003%; -13.648%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark netcoreapp3.1

  • unstable execution_time [-11.671µs; -3.399µs] or [-18.107%; -5.274%]
  • unstable throughput [+734.495op/s; +2505.696op/s] or [+4.506%; +15.373%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.471ms; +304.233ms] or [+152.885%; +153.776%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+303.888ms; +307.563ms] or [+154.678%; +156.548%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 execution_time [+299.319ms; +302.837ms] or [+149.846%; +151.607%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.774ms; +302.829ms] or [+149.909%; +150.933%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+301.416ms; +302.483ms] or [+151.357%; +151.893%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 execution_time [+303.523ms; +306.347ms] or [+153.927%; +155.360%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+300.101ms; +301.077ms] or [+149.692%; +150.179%]
  • 🟩 throughput [+61026541.438op/s; +61401210.115op/s] or [+44.443%; +44.716%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0

  • unstable execution_time [+327.066ms; +398.759ms] or [+406.765%; +495.928%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore netcoreapp3.1

  • 🟥 execution_time [+299.574ms; +300.858ms] or [+149.421%; +150.061%]
  • 🟩 throughput [+17777034.828op/s; +18771190.268op/s] or [+7.874%; +8.314%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net6.0

  • 🟩 throughput [+57203.635op/s; +97424.568op/s] or [+5.341%; +9.096%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1

  • 🟩 throughput [+49442.665op/s; +70679.237op/s] or [+5.723%; +8.181%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0

  • 🟩 throughput [+67134.988op/s; +99759.923op/s] or [+5.196%; +7.722%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan netcoreapp3.1

  • 🟩 throughput [+87065.076op/s; +95048.017op/s] or [+8.647%; +9.440%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net6.0

  • 🟩 throughput [+38888.259op/s; +47823.345op/s] or [+7.061%; +8.684%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes netcoreapp3.1

  • 🟩 throughput [+24187.949op/s; +34131.670op/s] or [+5.414%; +7.640%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0

  • 🟩 throughput [+91180.937op/s; +109166.007op/s] or [+10.187%; +12.197%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog netcoreapp3.1
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented May 28, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8708) and master.

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration72.98 ± (73.04 - 73.34) ms74.17 ± (74.19 - 74.64) ms+1.6%✅⬆️
.NET Framework 4.8 - Bailout
duration78.25 ± (78.30 - 78.90) ms79.79 ± (79.66 - 80.18) ms+2.0%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1109.83 ± (1110.91 - 1117.47) ms1111.19 ± (1108.89 - 1116.19) ms+0.1%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.79 ± (22.73 - 22.85) ms22.94 ± (22.89 - 23.00) ms+0.7%✅⬆️
process.time_to_main_ms85.72 ± (85.47 - 85.98) ms87.98 ± (87.68 - 88.28) ms+2.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.90 ± (10.90 - 10.91) MB10.94 ± (10.94 - 10.94) MB+0.3%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.77 ± (22.72 - 22.82) ms22.53 ± (22.49 - 22.58) ms-1.0%
process.time_to_main_ms88.15 ± (87.88 - 88.41) ms87.19 ± (86.96 - 87.41) ms-1.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.94 ± (10.94 - 10.94) MB10.96 ± (10.96 - 10.97) MB+0.2%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms215.29 ± (214.44 - 216.13) ms216.98 ± (215.87 - 218.09) ms+0.8%✅⬆️
process.time_to_main_ms546.17 ± (544.97 - 547.37) ms543.12 ± (541.86 - 544.37) ms-0.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.62 ± (48.60 - 48.65) MB48.67 ± (48.63 - 48.71) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.3%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.32 ± (21.28 - 21.36) ms21.67 ± (21.60 - 21.74) ms+1.6%✅⬆️
process.time_to_main_ms74.00 ± (73.81 - 74.20) ms76.37 ± (76.09 - 76.64) ms+3.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.62 ± (10.62 - 10.62) MB10.66 ± (10.65 - 10.66) MB+0.3%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.67 ± (21.62 - 21.72) ms21.28 ± (21.23 - 21.32) ms-1.8%
process.time_to_main_ms77.88 ± (77.61 - 78.15) ms75.28 ± (75.10 - 75.46) ms-3.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.74 ± (10.74 - 10.74) MB10.77 ± (10.77 - 10.77) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms371.64 ± (369.62 - 373.66) ms369.65 ± (367.61 - 371.69) ms-0.5%
process.time_to_main_ms554.35 ± (552.91 - 555.78) ms552.84 ± (551.58 - 554.11) ms-0.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.12 ± (50.10 - 50.14) MB50.14 ± (50.11 - 50.16) MB+0.0%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.1%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.39 ± (19.35 - 19.42) ms19.62 ± (19.57 - 19.67) ms+1.2%✅⬆️
process.time_to_main_ms73.06 ± (72.87 - 73.26) ms74.26 ± (74.02 - 74.51) ms+1.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.67 ± (7.66 - 7.67) MB7.69 ± (7.69 - 7.70) MB+0.4%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.67 ± (19.62 - 19.73) ms19.66 ± (19.60 - 19.71) ms-0.1%
process.time_to_main_ms76.03 ± (75.70 - 76.36) ms76.15 ± (75.91 - 76.39) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.73 ± (7.72 - 7.73) MB7.75 ± (7.75 - 7.76) MB+0.3%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms298.69 ± (296.43 - 300.94) ms297.11 ± (295.08 - 299.14) ms-0.5%
process.time_to_main_ms501.18 ± (500.00 - 502.36) ms500.05 ± (499.06 - 501.05) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed37.00 ± (36.97 - 37.03) MB37.02 ± (36.99 - 37.05) MB+0.0%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)+0.4%✅⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration197.93 ± (197.67 - 198.53) ms198.24 ± (198.24 - 199.18) ms+0.2%✅⬆️
.NET Framework 4.8 - Bailout
duration200.71 ± (200.46 - 201.39) ms201.75 ± (201.36 - 202.33) ms+0.5%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1192.53 ± (1193.02 - 1199.81) ms1190.59 ± (1189.78 - 1195.74) ms-0.2%
.NET Core 3.1 - Baseline
process.internal_duration_ms192.29 ± (191.83 - 192.75) ms192.19 ± (191.71 - 192.68) ms-0.1%
process.time_to_main_ms83.37 ± (83.07 - 83.67) ms83.23 ± (82.95 - 83.51) ms-0.2%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.15 ± (16.13 - 16.18) MB16.11 ± (16.09 - 16.14) MB-0.3%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.4%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms191.43 ± (190.93 - 191.93) ms192.06 ± (191.62 - 192.51) ms+0.3%✅⬆️
process.time_to_main_ms83.98 ± (83.75 - 84.21) ms84.68 ± (84.41 - 84.94) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.21 ± (16.18 - 16.23) MB16.12 ± (16.09 - 16.14) MB-0.5%
runtime.dotnet.threads.count21 ± (20 - 21)21 ± (20 - 21)+0.0%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms386.55 ± (385.38 - 387.72) ms385.63 ± (384.27 - 387.00) ms-0.2%
process.time_to_main_ms535.65 ± (534.36 - 536.93) ms535.28 ± (533.91 - 536.65) ms-0.1%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.51 ± (57.32 - 57.70) MB57.52 ± (57.32 - 57.73) MB+0.0%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms196.46 ± (195.98 - 196.94) ms195.14 ± (194.66 - 195.62) ms-0.7%
process.time_to_main_ms71.84 ± (71.58 - 72.10) ms71.58 ± (71.35 - 71.81) ms-0.4%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.38 ± (16.36 - 16.40) MB16.36 ± (16.34 - 16.39) MB-0.1%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.7%
.NET 6 - Bailout
process.internal_duration_ms195.54 ± (195.00 - 196.08) ms194.61 ± (194.11 - 195.11) ms-0.5%
process.time_to_main_ms72.63 ± (72.41 - 72.86) ms72.69 ± (72.43 - 72.96) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.32 ± (16.24 - 16.40) MB16.45 ± (16.41 - 16.48) MB+0.8%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.5%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms586.88 ± (584.15 - 589.62) ms586.14 ± (583.83 - 588.45) ms-0.1%
process.time_to_main_ms543.75 ± (542.60 - 544.90) ms542.48 ± (541.34 - 543.62) ms-0.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.26 ± (61.15 - 61.37) MB61.12 ± (61.04 - 61.20) MB-0.2%
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.4%
.NET 8 - Baseline
process.internal_duration_ms195.47 ± (195.05 - 195.89) ms194.65 ± (194.20 - 195.11) ms-0.4%
process.time_to_main_ms71.92 ± (71.65 - 72.19) ms71.38 ± (71.14 - 71.63) ms-0.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.71 ± (11.69 - 11.73) MB11.66 ± (11.63 - 11.68) MB-0.4%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.2%
.NET 8 - Bailout
process.internal_duration_ms193.81 ± (193.38 - 194.23) ms194.69 ± (194.29 - 195.09) ms+0.5%✅⬆️
process.time_to_main_ms72.54 ± (72.32 - 72.75) ms72.68 ± (72.48 - 72.88) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.77 ± (11.74 - 11.80) MB11.74 ± (11.71 - 11.76) MB-0.3%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.1%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms514.25 ± (511.73 - 516.76) ms510.66 ± (508.19 - 513.13) ms-0.7%
process.time_to_main_ms492.48 ± (491.70 - 493.26) ms492.85 ± (492.01 - 493.69) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.65 ± (50.61 - 50.68) MB50.67 ± (50.63 - 50.70) MB+0.0%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 30)30 ± (30 - 30)+0.9%✅⬆️
Comparison explanation

Execution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

Duration charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8708) - mean (74ms)  : 71, 78
    master - mean (73ms)  : 71, 75

    section Bailout
    This PR (8708) - mean (80ms)  : 76, 84
    master - mean (79ms)  : 74, 83

    section CallTarget+Inlining+NGEN
    This PR (8708) - mean (1,113ms)  : 1059, 1166
    master - mean (1,114ms)  : 1067, 1161

Loading
FakeDbCommand (.NET Core 3.1)
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8708) - mean (119ms)  : 113, 124
    master - mean (116ms)  : 111, 120

    section Bailout
    This PR (8708) - mean (117ms)  : 113, 120
    master - mean (118ms)  : 113, 123

    section CallTarget+Inlining+NGEN
    This PR (8708) - mean (797ms)  : 779, 815
    master - mean (798ms)  : 769, 827

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8708) - mean (105ms)  : 99, 111
    master - mean (102ms)  : 97, 107

    section Bailout
    This PR (8708) - mean (103ms)  : 99, 107
    master - mean (106ms)  : 102, 111

    section CallTarget+Inlining+NGEN
    This PR (8708) - mean (956ms)  : 925, 988
    master - mean (959ms)  : 912, 1005

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8708) - mean (102ms)  : 97, 107
    master - mean (100ms)  : 97, 104

    section Bailout
    This PR (8708) - mean (104ms)  : 99, 109
    master - mean (104ms)  : 98, 110

    section CallTarget+Inlining+NGEN
    This PR (8708) - mean (829ms)  : 789, 870
    master - mean (831ms)  : 785, 877

Loading
HttpMessageHandler (.NET Framework 4.8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8708) - mean (199ms)  : 192, 205
    master - mean (198ms)  : 193, 204

    section Bailout
    This PR (8708) - mean (202ms)  : 197, 207
    master - mean (201ms)  : 196, 206

    section CallTarget+Inlining+NGEN
    This PR (8708) - mean (1,193ms)  : 1151, 1235
    master - mean (1,196ms)  : 1147, 1246

Loading
HttpMessageHandler (.NET Core 3.1)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8708) - mean (284ms)  : 277, 290
    master - mean (285ms)  : 277, 292

    section Bailout
    This PR (8708) - mean (285ms)  : 278, 293
    master - mean (284ms)  : 276, 293

    section CallTarget+Inlining+NGEN
    This PR (8708) - mean (960ms)  : 941, 979
    master - mean (962ms)  : 945, 979

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8708) - mean (275ms)  : 268, 282
    master - mean (277ms)  : 269, 285

    section Bailout
    This PR (8708) - mean (276ms)  : 270, 282
    master - mean (277ms)  : 270, 283

    section CallTarget+Inlining+NGEN
    This PR (8708) - mean (1,157ms)  : 1121, 1192
    master - mean (1,162ms)  : 1132, 1192

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8708) - mean (276ms)  : 271, 282
    master - mean (277ms)  : 272, 283

    section Bailout
    This PR (8708) - mean (277ms)  : 272, 282
    master - mean (276ms)  : 270, 282

    section CallTarget+Inlining+NGEN
    This PR (8708) - mean (1,036ms)  : 999, 1073
    master - mean (1,036ms)  : 989, 1084

Loading

@andrewlock andrewlock added type:bug area:native-library Automatic instrumentation native C++ code (Datadog.Trace.ClrProfiler.Native) identified-by:customer labels May 29, 2026
Comment thread tracer/src/Datadog.Tracer.Native/clr_helpers.cpp Outdated
@link04
link04 requested a review from andrewlock May 29, 2026 15:52
@link04 link04 changed the title [Tracer] Cap GetTypeInfo recursion depth to prevent x86 stack overflow [Native] Make GetTypeInfo Iterative to Prevent Native Stack Exhaustion May 29, 2026
@link04
link04 enabled auto-merge (squash) May 29, 2026 17:09
@bouwkast

bouwkast commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@tonyredondo tonyredondo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems good, maybe we could improve testing, but I guess is a general issue for all our native code.

@link04
link04 merged commit a8066c0 into master Jun 5, 2026
138 checks passed
@link04
link04 deleted the maximo/apms-19659-gettypeinfo-depth-cap branch June 5, 2026 15:21
@github-actions github-actions Bot added this to the vNext-v3 milestone Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:native-library Automatic instrumentation native C++ code (Datadog.Trace.ClrProfiler.Native) identified-by:customer type:bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants