Skip to content

Update vendored System.Reflection.Metadata#8455

Merged
andrewlock merged 12 commits intomasterfrom
andrew/update-vendors-2
Apr 22, 2026
Merged

Update vendored System.Reflection.Metadata#8455
andrewlock merged 12 commits intomasterfrom
andrew/update-vendors-2

Conversation

@andrewlock
Copy link
Copy Markdown
Member

Summary of changes

  • Remove some unused types from System.Reflection.Metadata (mostly around builder/writer infrastructure that was unused)
  • Update the vendored version of System.Reflection.Metadata to use the runtime repo directly, and bump to latest patch version

Reason for change

We want to update our vendored .NET library versions.

Implementation details

  • Make the vendoring repeatable
  • Run the tool, check for errors, tweak, rinse and repeat
  • After running the tool, used 🤖 to identify segments of code that weren't used, so we could strip them out

Test coverage

This is the test, if it compiles and tests pass, we should be ok 🤞

Other details

https://datadoghq.atlassian.net/browse/APMLP-1207

Part of a stack updating our vendored system code

@andrewlock andrewlock requested review from a team as code owners April 14, 2026 12:59
@andrewlock andrewlock added the area:vendors Code from other vendors label Apr 14, 2026
Copy link
Copy Markdown

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

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: d76ae4cf88

ℹ️ 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.Trace/Vendors/System.Reflection.Metadata/System.Reflection.cs Outdated
@andrewlock andrewlock force-pushed the andrew/update-vendors-2 branch from d76ae4c to 4820815 Compare April 14, 2026 13:39
@dd-trace-dotnet-ci-bot
Copy link
Copy Markdown

dd-trace-dotnet-ci-bot Bot commented Apr 14, 2026

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8455) 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
duration70.89 ± (70.89 - 71.19) ms71.74 ± (71.75 - 72.11) ms+1.2%✅⬆️
.NET Framework 4.8 - Bailout
duration75.97 ± (75.83 - 76.24) ms76.35 ± (76.27 - 76.60) ms+0.5%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1057.73 ± (1058.79 - 1064.77) ms1056.93 ± (1056.80 - 1062.97) ms-0.1%
.NET Core 3.1 - Baseline
process.internal_duration_ms22.30 ± (22.26 - 22.33) ms22.31 ± (22.28 - 22.34) ms+0.1%✅⬆️
process.time_to_main_ms83.51 ± (83.30 - 83.71) ms83.17 ± (82.98 - 83.36) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.92 ± (10.92 - 10.93) MB10.91 ± (10.90 - 10.91) MB-0.2%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.33 ± (22.29 - 22.37) ms22.42 ± (22.38 - 22.45) ms+0.4%✅⬆️
process.time_to_main_ms85.37 ± (85.15 - 85.59) ms84.79 ± (84.59 - 84.99) ms-0.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.95 ± (10.94 - 10.95) MB10.94 ± (10.94 - 10.95) MB-0.0%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms228.23 ± (226.93 - 229.53) ms209.64 ± (208.51 - 210.77) ms-8.1%
process.time_to_main_ms520.02 ± (518.74 - 521.29) ms519.39 ± (518.06 - 520.72) ms-0.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.47 ± (48.43 - 48.50) MB47.71 ± (47.67 - 47.75) MB-1.6%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%
.NET 6 - Baseline
process.internal_duration_ms21.00 ± (20.96 - 21.03) ms21.08 ± (21.05 - 21.12) ms+0.4%✅⬆️
process.time_to_main_ms72.47 ± (72.32 - 72.62) ms72.39 ± (72.20 - 72.58) ms-0.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.59 ± (10.59 - 10.60) MB10.62 ± (10.62 - 10.63) MB+0.3%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.88 ± (20.85 - 20.92) ms21.09 ± (21.05 - 21.12) ms+1.0%✅⬆️
process.time_to_main_ms73.03 ± (72.86 - 73.20) ms73.65 ± (73.47 - 73.83) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.71 ± (10.70 - 10.71) MB10.73 ± (10.73 - 10.74) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms382.96 ± (380.32 - 385.60) ms380.66 ± (378.64 - 382.67) ms-0.6%
process.time_to_main_ms519.27 ± (518.28 - 520.26) ms525.31 ± (524.25 - 526.38) ms+1.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.02 ± (49.99 - 50.04) MB49.26 ± (49.23 - 49.29) MB-1.5%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.5%
.NET 8 - Baseline
process.internal_duration_ms19.30 ± (19.25 - 19.34) ms19.31 ± (19.27 - 19.34) ms+0.1%✅⬆️
process.time_to_main_ms71.33 ± (71.13 - 71.53) ms72.20 ± (72.05 - 72.36) ms+1.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.67 ± (7.67 - 7.68) MB7.66 ± (7.65 - 7.67) MB-0.2%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.28 ± (19.25 - 19.31) ms19.33 ± (19.30 - 19.36) ms+0.2%✅⬆️
process.time_to_main_ms72.59 ± (72.42 - 72.76) ms73.04 ± (72.89 - 73.19) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.72 ± (7.71 - 7.72) MB7.71 ± (7.71 - 7.71) MB-0.1%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms308.38 ± (305.68 - 311.07) ms306.52 ± (304.21 - 308.82) ms-0.6%
process.time_to_main_ms480.19 ± (479.41 - 480.98) ms483.15 ± (482.26 - 484.04) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed37.09 ± (37.07 - 37.11) MB36.48 ± (36.45 - 36.50) MB-1.7%
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)+0.3%✅⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration205.88 ± (205.69 - 206.64) ms210.51 ± (210.25 - 211.08) ms+2.2%✅⬆️
.NET Framework 4.8 - Bailout
duration209.45 ± (209.20 - 209.82) ms214.64 ± (214.34 - 215.21) ms+2.5%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1205.92 ± (1204.43 - 1210.16) ms1218.36 ± (1218.95 - 1225.08) ms+1.0%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms200.48 ± (200.06 - 200.89) ms205.14 ± (204.73 - 205.55) ms+2.3%✅⬆️
process.time_to_main_ms87.38 ± (87.10 - 87.65) ms90.33 ± (90.01 - 90.64) ms+3.4%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.04 ± (16.02 - 16.06) MB15.96 ± (15.94 - 15.98) MB-0.5%
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (19 - 20)+0.0%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms201.23 ± (200.81 - 201.65) ms205.26 ± (204.84 - 205.69) ms+2.0%✅⬆️
process.time_to_main_ms89.20 ± (88.98 - 89.41) ms91.90 ± (91.66 - 92.14) ms+3.0%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.96 ± (15.93 - 15.98) MB15.93 ± (15.91 - 15.95) MB-0.2%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)+1.0%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms414.12 ± (413.03 - 415.20) ms401.49 ± (400.11 - 402.87) ms-3.0%
process.time_to_main_ms544.49 ± (542.86 - 546.12) ms553.37 ± (552.18 - 554.55) ms+1.6%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed59.36 ± (59.32 - 59.40) MB58.45 ± (58.38 - 58.51) MB-1.5%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+1.4%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms206.31 ± (205.93 - 206.69) ms210.97 ± (210.56 - 211.39) ms+2.3%✅⬆️
process.time_to_main_ms76.22 ± (75.96 - 76.48) ms78.87 ± (78.60 - 79.14) ms+3.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.23 ± (16.20 - 16.25) MB16.17 ± (16.14 - 16.19) MB-0.4%
runtime.dotnet.threads.count19 ± (19 - 20)20 ± (19 - 20)+0.4%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms206.20 ± (205.87 - 206.54) ms210.19 ± (209.78 - 210.61) ms+1.9%✅⬆️
process.time_to_main_ms77.72 ± (77.48 - 77.96) ms79.69 ± (79.48 - 79.90) ms+2.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.24 ± (16.21 - 16.26) MB16.16 ± (16.13 - 16.18) MB-0.5%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.9%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms595.92 ± (593.29 - 598.54) ms602.14 ± (599.32 - 604.95) ms+1.0%✅⬆️
process.time_to_main_ms539.98 ± (538.87 - 541.09) ms548.30 ± (546.95 - 549.65) ms+1.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.52 ± (61.41 - 61.63) MB61.13 ± (61.03 - 61.22) MB-0.6%
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)+0.9%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms203.23 ± (202.75 - 203.70) ms208.80 ± (208.35 - 209.25) ms+2.7%✅⬆️
process.time_to_main_ms75.43 ± (75.17 - 75.69) ms77.70 ± (77.46 - 77.94) ms+3.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.62 ± (11.60 - 11.64) MB11.56 ± (11.54 - 11.58) MB-0.6%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.4%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms203.09 ± (202.69 - 203.49) ms208.29 ± (207.91 - 208.66) ms+2.6%✅⬆️
process.time_to_main_ms76.37 ± (76.13 - 76.60) ms78.82 ± (78.62 - 79.03) ms+3.2%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.68 ± (11.66 - 11.70) MB11.63 ± (11.61 - 11.65) MB-0.4%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+1.4%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms525.68 ± (520.62 - 530.73) ms538.29 ± (531.57 - 545.01) ms+2.4%✅⬆️
process.time_to_main_ms501.21 ± (500.34 - 502.09) ms511.72 ± (510.75 - 512.69) ms+2.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.70 ± (50.64 - 50.75) MB50.30 ± (50.21 - 50.39) MB-0.8%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.5%✅⬆️
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 (8455) - mean (72ms)  : 69, 75
    master - mean (71ms)  : 69, 73

    section Bailout
    This PR (8455) - mean (76ms)  : 75, 78
    master - mean (76ms)  : 73, 79

    section CallTarget+Inlining+NGEN
    This PR (8455) - mean (1,060ms)  : 1015, 1105
    master - mean (1,062ms)  : 1019, 1105

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 (8455) - mean (112ms)  : 109, 116
    master - mean (112ms)  : 109, 116

    section Bailout
    This PR (8455) - mean (114ms)  : 112, 116
    master - mean (114ms)  : 112, 117

    section CallTarget+Inlining+NGEN
    This PR (8455) - mean (765ms)  : 745, 785
    master - mean (784ms)  : 761, 807

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8455) - mean (100ms)  : 95, 104
    master - mean (100ms)  : 96, 103

    section Bailout
    This PR (8455) - mean (101ms)  : 98, 104
    master - mean (100ms)  : 97, 102

    section CallTarget+Inlining+NGEN
    This PR (8455) - mean (934ms)  : 908, 960
    master - mean (930ms)  : 890, 971

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8455) - mean (99ms)  : 97, 101
    master - mean (98ms)  : 94, 102

    section Bailout
    This PR (8455) - mean (100ms)  : 97, 103
    master - mean (99ms)  : 96, 103

    section CallTarget+Inlining+NGEN
    This PR (8455) - mean (819ms)  : 778, 860
    master - mean (819ms)  : 780, 859

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 (8455) - mean (211ms)  : 206, 215
    master - mean (206ms)  : 201, 211

    section Bailout
    This PR (8455) - mean (215ms)  : 210, 219
    master - mean (210ms)  : 206, 213

    section CallTarget+Inlining+NGEN
    This PR (8455) - mean (1,222ms)  : 1178, 1266
    master - mean (1,207ms)  : 1169, 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 (8455) - mean (305ms)  : 297, 312
    master - mean (297ms)  : 289, 305

    section Bailout
    This PR (8455) - mean (306ms)  : 300, 312
    master - mean (299ms)  : 293, 306

    section CallTarget+Inlining+NGEN
    This PR (8455) - mean (997ms)  : 963, 1030
    master - mean (1,002ms)  : 964, 1040

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8455) - mean (298ms)  : 292, 305
    master - mean (292ms)  : 286, 297

    section Bailout
    This PR (8455) - mean (299ms)  : 294, 304
    master - mean (293ms)  : 288, 297

    section CallTarget+Inlining+NGEN
    This PR (8455) - mean (1,182ms)  : 1153, 1211
    master - mean (1,167ms)  : 1124, 1210

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8455) - mean (297ms)  : 292, 303
    master - mean (289ms)  : 283, 296

    section Bailout
    This PR (8455) - mean (298ms)  : 292, 304
    master - mean (290ms)  : 284, 296

    section CallTarget+Inlining+NGEN
    This PR (8455) - mean (1,091ms)  : 980, 1201
    master - mean (1,067ms)  : 971, 1162

Loading

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Apr 14, 2026

Benchmarks

Benchmark execution time: 2026-04-22 15:58:06

Comparing candidate commit ac67d3f in PR branch andrew/update-vendors-2 with baseline commit 34902b0 in branch master.

Found 0 performance improvements and 1 performance regressions! Performance is the same for 26 metrics, 0 unstable metrics, 61 known flaky benchmarks, 26 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.Trace.HttpClientBenchmark.SendAsync net472

  • 🟥 throughput [-6884.985op/s; -6133.658op/s] or [-7.860%; -7.002%]

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 net6.0

  • 🟩 throughput [+8693.469op/s; +10865.272op/s] or [+7.307%; +9.133%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+305.655ms; +307.453ms] or [+151.677%; +152.569%]

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

  • 🟥 execution_time [+385.607ms; +387.141ms] or [+304.653%; +305.865%]

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

  • 🟥 execution_time [+400.999ms; +403.164ms] or [+354.869%; +356.785%]

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

  • 🟥 allocated_mem [+1.308KB; +1.308KB] or [+27.529%; +27.541%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+9.977%; +9.987%]
  • 🟩 execution_time [-16.134ms; -11.948ms] or [-7.535%; -5.580%]

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

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

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

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.746%; +105.759%]
  • 🟥 throughput [-250961.382op/s; -247448.398op/s] or [-25.624%; -25.266%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+38.558%; +38.566%]
  • 🟩 execution_time [-25.816ms; -20.962ms] or [-11.513%; -9.348%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.292%; +105.304%]
  • 🟥 throughput [-130006.416op/s; -113776.980op/s] or [-18.679%; -16.348%]

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

  • 🟩 throughput [+10669.436op/s; +13597.798op/s] or [+6.789%; +8.652%]

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

  • 🟩 throughput [+7772.539op/s; +10419.162op/s] or [+6.192%; +8.300%]

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

  • 🟩 throughput [+375695.164op/s; +411191.794op/s] or [+12.527%; +13.711%]

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

  • 🟩 execution_time [-18.665ms; -14.283ms] or [-8.604%; -6.584%]
  • 🟩 throughput [+193731.727op/s; +248069.091op/s] or [+7.690%; +9.847%]

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

  • 🟥 execution_time [+299.574ms; +300.087ms] or [+149.687%; +149.943%]

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

  • 🟥 execution_time [+299.453ms; +309.976ms] or [+151.015%; +156.321%]

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

  • 🟥 execution_time [+299.435ms; +301.999ms] or [+150.832%; +152.124%]

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

  • 🟥 execution_time [+297.313ms; +298.070ms] or [+146.029%; +146.400%]

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

  • 🟥 execution_time [+292.582ms; +296.885ms] or [+143.033%; +145.136%]

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

  • 🟥 execution_time [+301.137ms; +302.606ms] or [+150.508%; +151.242%]

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

  • 🟥 execution_time [+23.328µs; +46.912µs] or [+7.447%; +14.976%]
  • 🟥 throughput [-436.008op/s; -237.552op/s] or [-13.592%; -7.405%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.727ms; +300.380ms] or [+149.595%; +149.920%]

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

  • unstable execution_time [+366.574ms; +403.936ms] or [+398.298%; +438.893%]
  • 🟩 throughput [+1050.535op/s; +1174.666op/s] or [+8.632%; +9.652%]

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

  • unstable execution_time [+305.813ms; +343.340ms] or [+232.201%; +260.695%]
  • 🟩 throughput [+628.095op/s; +829.437op/s] or [+6.080%; +8.029%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+313.726ms; +410.996ms] or [+144.248%; +188.972%]
  • 🟥 throughput [-542.510op/s; -475.933op/s] or [-49.157%; -43.124%]

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

  • unstable execution_time [+203.185ms; +336.407ms] or [+86.589%; +143.363%]
  • 🟥 throughput [-741.673op/s; -658.243op/s] or [-49.470%; -43.905%]

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

  • 🟥 execution_time [+342.975ms; +351.856ms] or [+205.139%; +210.451%]
  • 🟥 throughput [-408.198op/s; -372.706op/s] or [-28.422%; -25.951%]

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

  • 🟩 execution_time [-175.405µs; -127.206µs] or [-8.885%; -6.444%]
  • 🟩 throughput [+37.832op/s; +50.585op/s] or [+7.468%; +9.986%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice netcoreapp3.1

  • unstable throughput [+14.581op/s; +40.331op/s] or [+5.750%; +15.904%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+303.238ms; +304.348ms] or [+152.705%; +153.264%]

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

  • 🟥 execution_time [+302.870ms; +304.449ms] or [+151.769%; +152.560%]

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

  • 🟥 execution_time [+301.605ms; +304.645ms] or [+151.513%; +153.041%]
  • 🟩 throughput [+28136.111op/s; +35478.358op/s] or [+5.927%; +7.474%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+299.328ms; +300.926ms] or [+150.313%; +151.115%]

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

  • 🟥 execution_time [+298.438ms; +300.278ms] or [+147.564%; +148.474%]

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

  • 🟥 execution_time [+301.886ms; +305.378ms] or [+153.009%; +154.779%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+302.688ms; +305.445ms] or [+151.922%; +153.306%]

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

  • 🟥 execution_time [+300.287ms; +302.684ms] or [+149.665%; +150.860%]
  • 🟩 throughput [+56713.487op/s; +60987.498op/s] or [+11.261%; +12.110%]

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

  • 🟥 execution_time [+299.932ms; +302.786ms] or [+149.213%; +150.633%]

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

  • 🟩 execution_time [-16.528ms; -12.876ms] or [-7.686%; -5.987%]
  • 🟩 throughput [+21945.095op/s; +29410.448op/s] or [+6.020%; +8.068%]

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

  • unstable execution_time [+14.990µs; +55.667µs] or [+3.703%; +13.750%]

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

  • 🟩 allocated_mem [-20.052KB; -20.032KB] or [-7.315%; -7.307%]
  • unstable execution_time [-52.922µs; -2.033µs] or [-10.460%; -0.402%]

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

  • 🟥 allocated_mem [+62.559KB; +62.577KB] or [+22.806%; +22.812%]
  • unstable execution_time [+4.223µs; +125.514µs] or [+0.732%; +21.751%]
  • unstable throughput [-133.558op/s; +69.783op/s] or [-7.630%; +3.987%]

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

  • 🟥 execution_time [+9.019µs; +13.234µs] or [+21.318%; +31.281%]
  • 🟥 throughput [-5709.007op/s; -3911.473op/s] or [-24.033%; -16.466%]

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

  • unstable execution_time [-13.344µs; -6.172µs] or [-20.702%; -9.576%]
  • 🟩 throughput [+1517.790op/s; +3011.119op/s] or [+9.312%; +18.474%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+301.606ms; +302.883ms] or [+152.449%; +153.094%]

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

  • 🟥 execution_time [+302.964ms; +305.198ms] or [+154.208%; +155.345%]

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

  • 🟥 execution_time [+299.380ms; +301.289ms] or [+149.877%; +150.832%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0

  • 🟩 throughput [+36079.781op/s; +38649.507op/s] or [+6.829%; +7.316%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.488ms; +302.082ms] or [+149.766%; +150.560%]

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

  • 🟥 execution_time [+301.252ms; +302.159ms] or [+151.274%; +151.730%]

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

  • 🟥 execution_time [+302.913ms; +305.591ms] or [+153.618%; +154.976%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.896ms; +300.539ms] or [+149.590%; +149.911%]
  • 🟩 throughput [+61261322.733op/s; +61518376.858op/s] or [+44.614%; +44.801%]

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

  • 🟥 execution_time [+424.068ms; +430.037ms] or [+527.404%; +534.828%]
  • 🟩 throughput [+999.387op/s; +1168.292op/s] or [+7.726%; +9.031%]

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

  • 🟥 execution_time [+299.420ms; +300.329ms] or [+149.344%; +149.797%]
  • 🟩 throughput [+18317840.005op/s; +19261198.374op/s] or [+8.114%; +8.531%]

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

  • 🟩 throughput [+100715.125op/s; +110463.832op/s] or [+9.403%; +10.314%]

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

  • 🟩 throughput [+59009.855op/s; +78676.729op/s] or [+6.830%; +9.107%]

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

  • 🟩 throughput [+96804.938op/s; +126245.574op/s] or [+7.493%; +9.772%]

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

  • 🟩 throughput [+90166.470op/s; +100085.678op/s] or [+8.955%; +9.940%]

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

  • 🟩 throughput [+59059.891op/s; +63391.020op/s] or [+10.724%; +11.511%]

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

  • 🟩 throughput [+23772.204op/s; +33447.632op/s] or [+5.321%; +7.487%]

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

  • 🟩 throughput [+64985.225op/s; +85020.505op/s] or [+7.260%; +9.499%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472
  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild netcoreapp3.1
  • 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 net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
  • 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

@andrewlock andrewlock requested a review from a team as a code owner April 14, 2026 15:13
Copy link
Copy Markdown
Contributor

@dudikeleti dudikeleti left a comment

Choose a reason for hiding this comment

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

🔥

@andrewlock andrewlock force-pushed the andrew/update-vendors-2 branch from 8947b73 to ac67d3f Compare April 22, 2026 14:45
@andrewlock andrewlock enabled auto-merge (squash) April 22, 2026 15:39
@andrewlock andrewlock merged commit 3ee5618 into master Apr 22, 2026
140 of 141 checks passed
@andrewlock andrewlock deleted the andrew/update-vendors-2 branch April 22, 2026 16:44
@github-actions github-actions Bot added this to the vNext-v3 milestone Apr 22, 2026
andrewlock added a commit that referenced this pull request Apr 23, 2026
## Summary of changes

- Update the System.Memory based on NuGet package sources

## Reason for change

We want to update our vendored .NET library versions.

## Implementation details

- Make the vendoring repeatable
- Run the tool, check for errors, tweak, rinse and repeat
- After running the tool, used 🤖 to identify segments of code that
weren't used, so we could strip them out

The updated vendoring is based on the public
[System.Memory](https://www.nuget.org/packages/System.Memory/4.6.3#dependencies-body-tab)
nuget package, so is designed to be used with .NET Framework and .NET
Standard, so makes the most sense to use IMO.

As this package also uses _System.Buffers_ and
_System.Numerics.Vectors_, vendored those pieces we need where
appropriate.

## Test coverage

This is the test, if it compiles and tests pass, we should be ok 🤞

## Other details

https://datadoghq.atlassian.net/browse/APMLP-1207

Note that currently, there's a lot of `Utf8Formatter` code that _isn't_
used, and could be excluded, however, given that theoretically we
could/should use this in the future. I'm torn whether to just leave it
in, or whether to tear it out for now, and restore it if/when we want to
use it later. Any thoughts?

Part of a stack updating our vendored system code

- #8391
- #8454
- #8455
andrewlock added a commit that referenced this pull request Apr 23, 2026
## Summary of changes

Stop vendoring the `SR` + regex files for microsoft code

## Reason for change

Using `ResourceManager` is overkill, as we don't deploy all the
translations etc anyway, and don't want to.

## Implementation details

Replaced all the `SR.` accesses in previous PRs, so this is now dead
code that we can remove.

## Test coverage

If it builds, we're good

## Other details

https://datadoghq.atlassian.net/browse/APMLP-1207

Note that currently, there's a lot of `Utf8Formatter` code that _isn't_
used, and could be excluded, however, given that theoretically we
could/should use this in the future. I'm torn whether to just leave it
in, or whether to tear it out for now, and restore it if/when we want to
use it later. Any thoughts?

Part of a stack updating our vendored system code

- #8391
- #8454
- #8455
- #8459
andrewlock added a commit that referenced this pull request Apr 23, 2026
## Summary of changes

- Create re-usable vendoring process for
System.Runtime.CompilerServices.Unsafe
- Update the vendored code (it's actually unchanged)

## Reason for change

We want to be able to update vendored code as required. For the vendored
[System.Runtime.CompilerServices.Unsafe
package](https://nuget.info/packages/System.Runtime.CompilerServices.Unsafe/6.1.2),
the [source
code](https://github.com/dotnet/maintenance-packages/blob/14e29655e53aec37342e933bfd7ba574167453ff/src/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.il)
is written directly as IL, and [compiled using
Ilasm.exe](https://learn.microsoft.com/en-us/dotnet/framework/tools/ilasm-exe-il-assembler).
So this PR introduces a simple "IL to C#" converter that converts that
file to its C# equivalent, using the same `InlineIL.Fody` approach that
we currently have.

The final result produces a file that is _virtually_ identical to the
existing one (which is good!). The only difference I made was to add the
original IL line as a comment next to the Fody equivalent.

This also shows that the code has not _actually_ changed (and it's
unlikely it _will_ tbh), so this just means we have a repeatable
self-contained approach to regenerate this in the repo as required.

## Implementation details

Told 🤖 to make the IL to C# converter, and it did 😄 I've given the code
it generated a once-over to look for anything terrible, but the key
thing is that the _output_ is sane, and that's visibly basically
unchanged, so I think it's fine.

## Test coverage

@dudikeleti already wrote some extensive tests for the `Unsafe`
implementation back when he originally ported it, which verifies that we
can compile the methods, call them, and that the generated IL is
identical to the "real" versions 🎉

## Other details


https://datadoghq.atlassian.net/browse/APMLP-1207

Part of a stack updating our vendored system code

- #8391
- #8454
- #8455
- #8459
- #8461
andrewlock added a commit that referenced this pull request Apr 24, 2026
#8476)

## Summary of changes

Updates the System.Memory vendoring code to move types like
`ReadOnlySpan<T>`, `Span<T>` into `System` instead of
`Datadog.Trace.VendoredMicrosoftCode.System`

## Reason for change

The compiler has various functionality that relies on the `Span<T>` (and
`ReadOnlySpan<T>`) being available in the `System` namespace. By making
this change, we get the advantage of those types being available.

A separate PR will actually update code to use those types, except where
changes were required to make it compile in this PR.

## Implementation details

Update the vendoring code to stop changing the namespace.

## Test coverage

This is the test, if the tests pass, we should be fine.

## Other details


Depends on a stack updating our vendored system code

- #8391
- #8454
- #8455
- #8459
- #8461
- #8469
andrewlock added a commit that referenced this pull request Apr 24, 2026
## Summary of changes

Remove some branching code that's no longer required after #8476 moved
`Span<T>` to `System` namespace

## Reason for change

This sort of stuff is the _reason_ we made that change, to reduce
maintenance.

## Implementation details

Set 🤖 looking for possible cases, so it's not exhaustive, but gives a
taster. I think most of these make sense. It's nothing outstanding but
it's the little things.

## Test coverage

Just a refactoring, so covered by existing tests.

## Other details

By definition, we don't really expect to see performance improvements
for this, other than potentially some reduced allocation in .NET
Framework. The primary benefits are devx

Depends on the vendoring code stack:


Depends on a stack updating our vendored system code

- #8391
- #8454
- #8455
- #8459
- #8461
- #8469
- #8476

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
andrewlock added a commit that referenced this pull request Apr 24, 2026
#8486)

## Summary of changes

Update the tag list generator to always use `ReadOnlySpan<byte>`
properties instead of `byte[]`

## Reason for change

After moving our vendored `Span<T>` implementation into the `System`
namespace, various optimizations open up to us, including using
`ReadOnlySpan<byte>` properties on .NET Framework instead of `static
readonly byte[]` to avoid startup costs.

## Implementation details

Replace the code generated by the generator, and update the generated
code

## Test coverage

Covered by snapshot tests and behaviour is covered by existing tests.
We'll check the benchmarks to make sure that we _don't_ see any perf
impact (there shouldn't be, impact should just be reduced startup costs)

## Other details

Depends on a stack updating our vendored system code

- #8391
- #8454
- #8455
- #8459
- #8461
- #8469
- #8476
- #8477
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:vendors Code from other vendors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants