Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use native debugging for procdump #5046

Merged
merged 2 commits into from
Jan 12, 2024
Merged

Use native debugging for procdump #5046

merged 2 commits into from
Jan 12, 2024

Conversation

kevingosse
Copy link
Collaborator

@kevingosse kevingosse commented Jan 11, 2024

Summary of changes

  • Disable managed debugging in procdump.
  • Disable procdump on x86

Reason for change

Procdump is having weird problems on x86, and also causing some long-forgotten deadlocks: dotnet/runtime#37571

Enabling the native mode should (hopefully) fix those. The downside is that we won't get memory dumps for managed crashes, but we mostly care about native ones anyway.

Implementation details

Call procdump with the -g flag.

Verified

This commit was signed with the committer’s verified signature.
kevingosse Kevin Gosse
@github-actions github-actions bot added the area:tests unit tests, integration tests label Jan 11, 2024
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Jan 11, 2024

Datadog Report

Branch report: kevin/procdump_native
Commit report: 302c605
Test service: dd-trace-dotnet

✅ 0 Failed, 305924 Passed, 1016 Skipped, 32m 29.17s Wall Time

@andrewlock
Copy link
Member

andrewlock commented Jan 11, 2024

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

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 shown 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).

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5046) - mean (72ms)  : 62, 83
     .   : milestone, 72,
    master - mean (69ms)  : 66, 73
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (5046) - mean (1,031ms)  : 1011, 1051
     .   : milestone, 1031,
    master - mean (1,029ms)  : 1008, 1051
     .   : milestone, 1029,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5046) - mean (105ms)  : 101, 109
     .   : milestone, 105,
    master - mean (105ms)  : 101, 109
     .   : milestone, 105,

    section CallTarget+Inlining+NGEN
    This PR (5046) - mean (735ms)  : 710, 759
     .   : milestone, 735,
    master - mean (730ms)  : 709, 751
     .   : milestone, 730,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5046) - mean (89ms)  : 85, 94
     .   : milestone, 89,
    master - mean (90ms)  : 87, 93
     .   : milestone, 90,

    section CallTarget+Inlining+NGEN
    This PR (5046) - mean (692ms)  : 673, 711
     .   : milestone, 692,
    master - mean (696ms)  : 672, 721
     .   : milestone, 696,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5046) - mean (187ms)  : 185, 190
     .   : milestone, 187,
    master - mean (188ms)  : 185, 191
     .   : milestone, 188,

    section CallTarget+Inlining+NGEN
    This PR (5046) - mean (1,138ms)  : 1120, 1156
     .   : milestone, 1138,
    master - mean (1,137ms)  : 1116, 1158
     .   : milestone, 1137,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5046) - mean (271ms)  : 267, 275
     .   : milestone, 271,
    master - mean (272ms)  : 268, 275
     .   : milestone, 272,

    section CallTarget+Inlining+NGEN
    This PR (5046) - mean (1,093ms)  : 1068, 1119
     .   : milestone, 1093,
    master - mean (1,093ms)  : 1073, 1114
     .   : milestone, 1093,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5046) - mean (260ms)  : 257, 263
     .   : milestone, 260,
    master - mean (262ms)  : 258, 265
     .   : milestone, 262,

    section CallTarget+Inlining+NGEN
    This PR (5046) - mean (1,062ms)  : 1036, 1089
     .   : milestone, 1062,
    master - mean (1,058ms)  : 1026, 1090
     .   : milestone, 1058,

@kevingosse kevingosse marked this pull request as ready for review January 11, 2024 17:19
@kevingosse kevingosse requested a review from a team as a code owner January 11, 2024 17:19
@kevingosse
Copy link
Collaborator Author

kevingosse commented Jan 11, 2024

This should fix the deadlock but I'm still seeing the other error on x86.

@andrewlock
Copy link
Member

andrewlock commented Jan 12, 2024

Throughput/Crank Report:zap:

Throughput results for AspNetCoreSimpleController comparing the following branches/commits:

Cases where throughput results for the PR are worse than latest master (5% drop or greater), results are shown in red.

Note that these results are based on a single point-in-time result for each branch. For full results, see one of the many, many dashboards!

Loading
gantt
    title Throughput Linux x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5046) (11.690M)   : 0, 11690427
    master (11.893M)   : 0, 11892622
    benchmarks/2.9.0 (11.642M)   : 0, 11641842

    section Automatic
    This PR (5046) (8.000M)   : 0, 8000220
    master (8.099M)   : 0, 8098638
    benchmarks/2.9.0 (8.382M)   : 0, 8382125

    section Trace stats
    This PR (5046) (8.285M)   : 0, 8284811
    master (5.895M)   : 0, 5895492

    section Manual
    This PR (5046) (10.202M)   : 0, 10201731
    master (10.361M)   : 0, 10361124

    section Manual + Automatic
    This PR (5046) (7.669M)   : 0, 7668994
    master (7.670M)   : 0, 7670088

    section Version Conflict
    This PR (5046) (6.941M)   : 0, 6940815
    master (6.859M)   : 0, 6859229

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5046) (9.505M)   : 0, 9504825
    master (9.617M)   : 0, 9616856
    benchmarks/2.9.0 (9.719M)   : 0, 9718800

    section Automatic
    This PR (5046) (6.549M)   : 0, 6548647
    master (6.615M)   : 0, 6615394

    section Trace stats
    This PR (5046) (6.835M)   : 0, 6835346
    master (6.934M)   : 0, 6934299

    section Manual
    This PR (5046) (8.240M)   : 0, 8240498
    master (8.540M)   : 0, 8539968

    section Manual + Automatic
    This PR (5046) (6.080M)   : 0, 6079904
    master (6.148M)   : 0, 6147793

    section Version Conflict
    This PR (5046) (5.757M)   : 0, 5756763
    master (5.693M)   : 0, 5693193

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5046) (9.958M)   : 0, 9958383
    benchmarks/2.9.0 (9.943M)   : 0, 9943294

    section Automatic
    This PR (5046) (7.002M)   : 0, 7002158
    benchmarks/2.9.0 (7.260M)   : 0, 7260428

    section Trace stats
    This PR (5046) (7.440M)   : 0, 7440315

    section Manual
    This PR (5046) (8.690M)   : 0, 8690471

    section Manual + Automatic
    This PR (5046) (6.700M)   : 0, 6700072

    section Version Conflict
    This PR (5046) (6.055M)   : 0, 6054502

Loading
gantt
    title Throughput Linux x64 (ASM) (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    master (7.496M)   : 0, 7496114
    benchmarks/2.9.0 (7.836M)   : 0, 7835831

    section No attack
    master (1.764M)   : 0, 1763502
    benchmarks/2.9.0 (3.226M)   : 0, 3226182

    section Attack
    master (1.399M)   : 0, 1399328
    benchmarks/2.9.0 (2.474M)   : 0, 2473872

    section Blocking
    master (3.098M)   : 0, 3097902

    section IAST default
    master (6.459M)   : 0, 6458516

    section IAST full
    master (5.769M)   : 0, 5769139

    section Base vuln
    master (0.971M)   : 0, 970670

    section IAST vuln
    master (0.901M)   : 0, 900962

@andrewlock
Copy link
Member

andrewlock commented Jan 12, 2024

Benchmarks Report 🐌

Benchmarks for #5046 compared to master:

  • 5 benchmarks are faster, with geometric mean 1.251
  • 3 benchmarks are slower, with geometric mean 1.148
  • 1 benchmarks have fewer allocations
  • 1 benchmarks have more allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 8.64μs 46.7ns 268ns 0.0306 0.0131 0 7.48 KB
master StartStopWithChild netcoreapp3.1 10.8μs 60.5ns 378ns 0.0359 0.0154 0 7.58 KB
master StartStopWithChild net472 17.1μs 53.4ns 207ns 1.34 0.362 0.112 7.95 KB
#5046 StartStopWithChild net6.0 8.84μs 50ns 343ns 0.0256 0.0128 0 7.48 KB
#5046 StartStopWithChild netcoreapp3.1 10.8μs 59.5ns 362ns 0.0264 0.0106 0 7.58 KB
#5046 StartStopWithChild net472 17.3μs 45.9ns 178ns 1.34 0.348 0.113 7.95 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 470μs 349ns 1.35μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 636μs 151ns 564ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 828μs 437ns 1.69μs 0.408 0 0 3.3 KB
#5046 WriteAndFlushEnrichedTraces net6.0 493μs 494ns 1.91μs 0 0 0 2.7 KB
#5046 WriteAndFlushEnrichedTraces netcoreapp3.1 641μs 247ns 958ns 0 0 0 2.7 KB
#5046 WriteAndFlushEnrichedTraces net472 784μs 158ns 592ns 0.391 0 0 3.3 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #5046

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody‑net6.0 1.503 4,500.76 2,994.71
Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody‑netcoreapp3.1 1.258 245.72 195.25
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑netcoreapp3.1 1.227 50,486.74 41,147.72
Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody‑net472 1.170 4,493.68 3,840.91

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 38.8μs 17.4ns 60.3ns 0.0194 0 0 1.77 KB
master AllCycleSimpleBody netcoreapp3.1 50.1μs 258ns 1.24μs 0 0 0 1.74 KB
master AllCycleSimpleBody net472 45.7μs 104ns 401ns 0.27 0 0 1.81 KB
master AllCycleMoreComplexBody net6.0 201μs 676ns 2.62μs 0.0997 0 0 9.25 KB
master AllCycleMoreComplexBody netcoreapp3.1 212μs 604ns 5.3μs 0.12 0 0 9.14 KB
master AllCycleMoreComplexBody net472 226μs 94.4ns 340ns 1.47 0 0 9.32 KB
master ObjectExtractorSimpleBody net6.0 142ns 0.21ns 0.785ns 0.00395 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 246ns 0.086ns 0.31ns 0.00362 0 0 272 B
master ObjectExtractorSimpleBody net472 164ns 0.178ns 0.688ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 4.47μs 46.4ns 464ns 0.0532 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 4.07μs 4.89ns 18.9ns 0.0506 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 4.49μs 3.17ns 11.9ns 0.601 0.0045 0 3.8 KB
#5046 AllCycleSimpleBody net6.0 38.8μs 22.2ns 82.9ns 0.0195 0 0 1.77 KB
#5046 AllCycleSimpleBody netcoreapp3.1 41.1μs 30.5ns 114ns 0.0206 0 0 1.74 KB
#5046 AllCycleSimpleBody net472 44μs 9.49ns 34.2ns 0.286 0 0 1.81 KB
#5046 AllCycleMoreComplexBody net6.0 202μs 122ns 471ns 0.101 0 0 9.25 KB
#5046 AllCycleMoreComplexBody netcoreapp3.1 213μs 243ns 941ns 0.106 0 0 9.14 KB
#5046 AllCycleMoreComplexBody net472 225μs 56.2ns 218ns 1.46 0 0 9.32 KB
#5046 ObjectExtractorSimpleBody net6.0 137ns 0.0361ns 0.14ns 0.00397 0 0 280 B
#5046 ObjectExtractorSimpleBody netcoreapp3.1 194ns 0.351ns 1.36ns 0.00368 0 0 272 B
#5046 ObjectExtractorSimpleBody net472 165ns 0.0546ns 0.212ns 0.0446 0 0 281 B
#5046 ObjectExtractorMoreComplexBody net6.0 2.99μs 1.31ns 5.07ns 0.0524 0 0 3.78 KB
#5046 ObjectExtractorMoreComplexBody netcoreapp3.1 4.04μs 1.82ns 6.82ns 0.0506 0 0 3.69 KB
#5046 ObjectExtractorMoreComplexBody net472 3.84μs 2.34ns 9.07ns 0.603 0.00576 0 3.8 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWaf(args=NestedMap (10)) net6.0 51μs 75.6ns 283ns 0.204 0 0 16.06 KB
master RunWaf(args=NestedMap (10)) netcoreapp3.1 69.7μs 401ns 2.97μs 0.204 0 0 16.06 KB
master RunWaf(args=NestedMap (10)) net472 99.7μs 460ns 1.78μs 2.53 0.0956 0 16.14 KB
master RunWafTwice(args=NestedMap (10)) net6.0 55.5μs 299ns 1.72μs 0.239 0 0 16.6 KB
master RunWafTwice(args=NestedMap (10)) netcoreapp3.1 74.3μs 250ns 969ns 0.221 0 0 16.58 KB
master RunWafTwice(args=NestedMap (10)) net472 107μs 89.4ns 346ns 2.61 0.102 0 16.69 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 115μs 173ns 668ns 0.286 0 0 22.41 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 128μs 682ns 3.48μs 0.26 0 0 22.36 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net472 158μs 93.2ns 361ns 3.54 0.157 0 22.7 KB
master RunWaf(args=NestedMap (100)) net6.0 112μs 61.4ns 238ns 0.434 0 0 32.76 KB
master RunWaf(args=NestedMap (100)) netcoreapp3.1 135μs 700ns 3.5μs 0.398 0 0 33.33 KB
master RunWaf(args=NestedMap (100)) net472 190μs 947ns 4.13μs 5.29 0.371 0 33.67 KB
master RunWafTwice(args=NestedMap (100)) net6.0 106μs 528ns 2.48μs 0.467 0 0 33.3 KB
master RunWafTwice(args=NestedMap (100)) netcoreapp3.1 140μs 730ns 3.5μs 0.415 0 0 33.86 KB
master RunWafTwice(args=NestedMap (100)) net472 195μs 133ns 480ns 5.35 0.389 0 34.23 KB
master RunWafWithAttack(args=Neste(...)tack) [23]) net6.0 168μs 76.6ns 297ns 0.503 0 0 39.1 KB
master RunWafWithAttack(args=Neste(...)tack) [23]) netcoreapp3.1 201μs 189ns 682ns 0.502 0 0 39.63 KB
master RunWafWithAttack(args=Neste(...)tack) [23]) net472 258μs 1.36μs 6.66μs 6.39 0.501 0 40.23 KB
master RunWaf(args=NestedMap (20)) net6.0 108μs 58.1ns 225ns 0.434 0 0 32.18 KB
master RunWaf(args=NestedMap (20)) netcoreapp3.1 134μs 584ns 2.26μs 0.443 0 0 32.3 KB
master RunWaf(args=NestedMap (20)) net472 189μs 483ns 1.87μs 5.13 0.367 0 32.63 KB
master RunWafTwice(args=NestedMap (20)) net6.0 103μs 42.7ns 165ns 0.414 0 0 32.72 KB
master RunWafTwice(args=NestedMap (20)) netcoreapp3.1 138μs 711ns 3.18μs 0.414 0 0 32.82 KB
master RunWafTwice(args=NestedMap (20)) net472 193μs 104ns 374ns 5.22 0.386 0 33.19 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 163μs 913ns 6.06μs 0.506 0 0 38.53 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 203μs 1.06μs 5.06μs 0.482 0 0 38.6 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net472 258μs 108ns 419ns 6.15 0.502 0 39.2 KB
#5046 RunWaf(args=NestedMap (10)) net6.0 52.3μs 29.2ns 117ns 0.215 0 0 16.06 KB
#5046 RunWaf(args=NestedMap (10)) netcoreapp3.1 69.3μs 381ns 2.16μs 0.205 0 0 16.06 KB
#5046 RunWaf(args=NestedMap (10)) net472 101μs 46.2ns 173ns 2.55 0.0962 0 16.14 KB
#5046 RunWafTwice(args=NestedMap (10)) net6.0 56.1μs 45.4ns 176ns 0.21 0 0 16.6 KB
#5046 RunWafTwice(args=NestedMap (10)) netcoreapp3.1 73μs 416ns 2.97μs 0.213 0 0 16.58 KB
#5046 RunWafTwice(args=NestedMap (10)) net472 103μs 28.6ns 107ns 2.64 0.103 0 16.69 KB
#5046 RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 112μs 73.4ns 284ns 0.283 0 0 22.41 KB
#5046 RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 124μs 74.6ns 269ns 0.265 0 0 22.36 KB
#5046 RunWafWithAttack(args=Neste(...)tack) [22]) net472 158μs 97.1ns 376ns 3.54 0.157 0 22.7 KB
#5046 RunWaf(args=NestedMap (100)) net6.0 108μs 225ns 870ns 0.437 0 0 32.76 KB
#5046 RunWaf(args=NestedMap (100)) netcoreapp3.1 131μs 220ns 762ns 0.386 0 0 33.33 KB
#5046 RunWaf(args=NestedMap (100)) net472 189μs 887ns 3.44μs 5.32 0.367 0 33.67 KB
#5046 RunWafTwice(args=NestedMap (100)) net6.0 114μs 65.6ns 254ns 0.45 0 0 33.3 KB
#5046 RunWafTwice(args=NestedMap (100)) netcoreapp3.1 134μs 296ns 1.18μs 0.412 0 0 33.86 KB
#5046 RunWafTwice(args=NestedMap (100)) net472 203μs 98.3ns 368ns 5.35 0.389 0 34.22 KB
#5046 RunWafWithAttack(args=Neste(...)tack) [23]) net6.0 164μs 317ns 1.23μs 0.494 0 0 39.1 KB
#5046 RunWafWithAttack(args=Neste(...)tack) [23]) netcoreapp3.1 196μs 1.02μs 4.91μs 0.494 0 0 39.63 KB
#5046 RunWafWithAttack(args=Neste(...)tack) [23]) net472 253μs 115ns 399ns 6.34 0.507 0 40.23 KB
#5046 RunWaf(args=NestedMap (20)) net6.0 105μs 31.3ns 121ns 0.441 0 0 32.18 KB
#5046 RunWaf(args=NestedMap (20)) netcoreapp3.1 137μs 172ns 596ns 0.44 0 0 32.3 KB
#5046 RunWaf(args=NestedMap (20)) net472 184μs 120ns 447ns 5.17 0.369 0 32.63 KB
#5046 RunWafTwice(args=NestedMap (20)) net6.0 103μs 37.8ns 165ns 0.461 0 0 32.72 KB
#5046 RunWafTwice(args=NestedMap (20)) netcoreapp3.1 139μs 750ns 4.31μs 0.423 0 0 32.82 KB
#5046 RunWafTwice(args=NestedMap (20)) net472 191μs 95.7ns 371ns 5.26 0.383 0 33.19 KB
#5046 RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 168μs 906ns 5.05μs 0.469 0 0 38.53 KB
#5046 RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 194μs 410ns 1.59μs 0.489 0 0 38.6 KB
#5046 RunWafWithAttack(args=Neste(...)tack) [22]) net472 252μs 84.9ns 294ns 6.16 0.503 0 39.2 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 170μs 104ns 390ns 0.171 0 0 18.25 KB
master SendRequest netcoreapp3.1 194μs 271ns 1.05μs 0.191 0 0 20.41 KB
master SendRequest net472 0.000666ns 0.000322ns 0.00125ns 0 0 0 0 b
#5046 SendRequest net6.0 173μs 221ns 854ns 0.259 0 0 18.25 KB
#5046 SendRequest netcoreapp3.1 195μs 271ns 1.05μs 0.194 0 0 20.41 KB
#5046 SendRequest net472 0.00111ns 0.000437ns 0.00164ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 541μs 2.13μs 8.26μs 0.546 0 0 41.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 651μs 547ns 2.12μs 0.329 0 0 41.76 KB
master WriteAndFlushEnrichedTraces net472 824μs 3.41μs 13.2μs 8.33 2.5 0.417 53.26 KB
#5046 WriteAndFlushEnrichedTraces net6.0 553μs 388ns 1.5μs 0.553 0 0 41.79 KB
#5046 WriteAndFlushEnrichedTraces netcoreapp3.1 655μs 684ns 2.65μs 0.324 0 0 41.77 KB
#5046 WriteAndFlushEnrichedTraces net472 831μs 3.47μs 13μs 8.28 2.48 0.414 53.23 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.11μs 0.843ns 3.27ns 0.011 0 0 768 B
master ExecuteNonQuery netcoreapp3.1 1.53μs 0.837ns 3.24ns 0.00998 0 0 768 B
master ExecuteNonQuery net472 1.84μs 1.78ns 6.65ns 0.115 0 0 730 B
#5046 ExecuteNonQuery net6.0 1.03μs 0.712ns 2.76ns 0.0104 0 0 768 B
#5046 ExecuteNonQuery netcoreapp3.1 1.49μs 0.485ns 1.88ns 0.0103 0 0 768 B
#5046 ExecuteNonQuery net472 1.84μs 1.74ns 6.26ns 0.116 0 0 730 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.22μs 0.439ns 1.64ns 0.0131 0 0 936 B
master CallElasticsearch netcoreapp3.1 1.49μs 2.48ns 9.61ns 0.0127 0 0 936 B
master CallElasticsearch net472 2.47μs 0.817ns 3.16ns 0.152 0.00123 0 955 B
master CallElasticsearchAsync net6.0 1.41μs 0.571ns 2.14ns 0.013 0 0 912 B
master CallElasticsearchAsync netcoreapp3.1 1.64μs 0.763ns 2.95ns 0.0131 0 0 984 B
master CallElasticsearchAsync net472 2.79μs 0.809ns 3.13ns 0.16 0 0 1.01 KB
#5046 CallElasticsearch net6.0 1.19μs 0.241ns 0.903ns 0.0131 0 0 936 B
#5046 CallElasticsearch netcoreapp3.1 1.55μs 0.395ns 1.48ns 0.0124 0 0 936 B
#5046 CallElasticsearch net472 2.61μs 0.669ns 2.59ns 0.151 0.00131 0 955 B
#5046 CallElasticsearchAsync net6.0 1.35μs 0.373ns 1.4ns 0.0123 0 0 912 B
#5046 CallElasticsearchAsync netcoreapp3.1 1.62μs 0.95ns 3.55ns 0.0135 0 0 984 B
#5046 CallElasticsearchAsync net472 2.67μs 0.858ns 3.32ns 0.161 0 0 1.01 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.27μs 0.852ns 3.19ns 0.0128 0 0 912 B
master ExecuteAsync netcoreapp3.1 1.61μs 0.529ns 1.91ns 0.0121 0 0 912 B
master ExecuteAsync net472 1.86μs 1.03ns 3.84ns 0.138 0 0 875 B
#5046 ExecuteAsync net6.0 1.25μs 0.655ns 2.45ns 0.0126 0 0 912 B
#5046 ExecuteAsync netcoreapp3.1 1.66μs 0.754ns 2.82ns 0.0118 0 0 912 B
#5046 ExecuteAsync net472 1.76μs 1.83ns 7.09ns 0.139 0.000884 0 875 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 4.08μs 1.96ns 7.58ns 0.0284 0 0 2.1 KB
master SendAsync netcoreapp3.1 4.86μs 2.81ns 10.9ns 0.0341 0 0 2.63 KB
master SendAsync net472 7.66μs 5.28ns 20.5ns 0.524 0 0 3.31 KB
#5046 SendAsync net6.0 4.09μs 2.59ns 9.68ns 0.0287 0 0 2.1 KB
#5046 SendAsync netcoreapp3.1 5.05μs 1.68ns 6.5ns 0.0354 0 0 2.63 KB
#5046 SendAsync net472 7.86μs 5.87ns 22ns 0.523 0 0 3.31 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #5046

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark(parameters: System.Collections.Generic.List`1[System.String])‑netcoreapp3.1 1.189 52,900.00 62,900.00 multimodal

More allocations ⚠️ in #5046

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark(parameters: System.Collections.Generic.List`1[System.String])‑net472 55.9 KB 62.29 KB 6.38 KB 11.42%

Fewer allocations 🎉 in #5046

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark(parameters: System.Collections.Generic.List`1[System.String])‑net472 65.54 KB 57.34 KB -8.19 KB -12.50%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark(parameters=Syste(...)ring] [48]) net6.0 59.6μs 699ns 6.95μs 0 0 0 43.44 KB
master StringConcatBenchmark(parameters=Syste(...)ring] [48]) netcoreapp3.1 52.8μs 224ns 839ns 0 0 0 42.64 KB
master StringConcatBenchmark(parameters=Syste(...)ring] [48]) net472 37.8μs 124ns 449ns 0 0 0 55.9 KB
master StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) net6.0 66.2μs 349ns 1.67μs 0 0 0 43.29 KB
master StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) netcoreapp3.1 109μs 3.76μs 37.4μs 0 0 0 42.64 KB
master StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) net472 62.9μs 500ns 4.74μs 0 0 0 65.54 KB
#5046 StringConcatBenchmark(parameters=Syste(...)ring] [48]) net6.0 55.7μs 532ns 4.99μs 0 0 0 43.44 KB
#5046 StringConcatBenchmark(parameters=Syste(...)ring] [48]) netcoreapp3.1 63.8μs 786ns 7.66μs 0 0 0 42.64 KB
#5046 StringConcatBenchmark(parameters=Syste(...)ring] [48]) net472 37.6μs 129ns 482ns 0 0 0 62.29 KB
#5046 StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) net6.0 66.3μs 333ns 1.41μs 0 0 0 43.29 KB
#5046 StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) netcoreapp3.1 99.5μs 2.81μs 27.8μs 0 0 0 42.64 KB
#5046 StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) net472 61.7μs 212ns 820ns 0 0 0 57.34 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.55μs 3.79ns 14.2ns 0.0216 0 0 1.57 KB
master EnrichedLog netcoreapp3.1 2.05μs 1.96ns 7.33ns 0.0214 0 0 1.57 KB
master EnrichedLog net472 2.6μs 1.78ns 6.9ns 0.238 0 0 1.5 KB
#5046 EnrichedLog net6.0 1.6μs 0.594ns 2.22ns 0.0217 0 0 1.57 KB
#5046 EnrichedLog netcoreapp3.1 2.09μs 0.502ns 1.74ns 0.0209 0 0 1.57 KB
#5046 EnrichedLog net472 2.55μs 2.85ns 11ns 0.237 0 0 1.5 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 113μs 88.7ns 344ns 0.0578 0 0 4.21 KB
master EnrichedLog netcoreapp3.1 118μs 207ns 800ns 0 0 0 4.21 KB
master EnrichedLog net472 148μs 65.2ns 253ns 0.663 0.221 0 4.39 KB
#5046 EnrichedLog net6.0 113μs 53ns 205ns 0.0565 0 0 4.21 KB
#5046 EnrichedLog netcoreapp3.1 118μs 105ns 393ns 0.0592 0 0 4.21 KB
#5046 EnrichedLog net472 148μs 106ns 398ns 0.676 0.225 0 4.39 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.99μs 0.816ns 3.05ns 0.0299 0 0 2.13 KB
master EnrichedLog netcoreapp3.1 4.46μs 1.96ns 7.61ns 0.0283 0 0 2.13 KB
master EnrichedLog net472 4.92μs 2.43ns 9.4ns 0.307 0 0 1.95 KB
#5046 EnrichedLog net6.0 2.88μs 1.33ns 5.13ns 0.0291 0 0 2.13 KB
#5046 EnrichedLog netcoreapp3.1 4.18μs 3.17ns 12.3ns 0.029 0 0 2.13 KB
#5046 EnrichedLog net472 4.81μs 2.64ns 10.2ns 0.308 0 0 1.95 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.27μs 0.968ns 3.62ns 0.0152 0 0 1.1 KB
master SendReceive netcoreapp3.1 1.75μs 0.63ns 2.44ns 0.0149 0 0 1.1 KB
master SendReceive net472 2.13μs 2.31ns 8.94ns 0.177 0 0 1.12 KB
#5046 SendReceive net6.0 1.4μs 0.688ns 2.57ns 0.0155 0 0 1.1 KB
#5046 SendReceive netcoreapp3.1 1.71μs 0.464ns 1.67ns 0.0145 0 0 1.1 KB
#5046 SendReceive net472 2.14μs 0.799ns 3.09ns 0.176 0 0 1.12 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.7μs 1.65ns 6.4ns 0.0203 0 0 1.53 KB
master EnrichedLog netcoreapp3.1 3.95μs 2.38ns 9.23ns 0.0198 0 0 1.58 KB
master EnrichedLog net472 4.28μs 3.64ns 14.1ns 0.311 0 0 1.97 KB
#5046 EnrichedLog net6.0 2.86μs 0.868ns 3.25ns 0.0215 0 0 1.53 KB
#5046 EnrichedLog netcoreapp3.1 3.86μs 2.67ns 10.3ns 0.0211 0 0 1.58 KB
#5046 EnrichedLog net472 4.14μs 1.44ns 5.58ns 0.312 0 0 1.97 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #5046

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 1.137 721.06 819.70
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.121 589.96 661.09

Faster 🎉 in #5046

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.127 509.06 451.86

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 508ns 0.661ns 2.56ns 0.00754 0 0 536 B
master StartFinishSpan netcoreapp3.1 689ns 1.24ns 4.78ns 0.00695 0 0 536 B
master StartFinishSpan net472 722ns 0.369ns 1.43ns 0.0852 0 0 538 B
master StartFinishScope net6.0 590ns 0.111ns 0.431ns 0.00923 0 0 656 B
master StartFinishScope netcoreapp3.1 834ns 0.271ns 1.01ns 0.00878 0 0 656 B
master StartFinishScope net472 998ns 1.03ns 4.01ns 0.0981 0 0 618 B
#5046 StartFinishSpan net6.0 452ns 0.155ns 0.601ns 0.00756 0 0 536 B
#5046 StartFinishSpan netcoreapp3.1 706ns 0.195ns 0.754ns 0.00725 0 0 536 B
#5046 StartFinishSpan net472 819ns 0.295ns 1.1ns 0.0853 0 0 538 B
#5046 StartFinishScope net6.0 661ns 0.176ns 0.658ns 0.00922 0 0 656 B
#5046 StartFinishScope netcoreapp3.1 849ns 0.493ns 1.84ns 0.00896 0 0 656 B
#5046 StartFinishScope net472 960ns 1.15ns 4.46ns 0.0978 0 0 618 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 715ns 0.241ns 0.902ns 0.00937 0 0 656 B
master RunOnMethodBegin netcoreapp3.1 974ns 0.337ns 1.26ns 0.00871 0 0 656 B
master RunOnMethodBegin net472 1.11μs 0.519ns 2.01ns 0.0978 0 0 618 B
#5046 RunOnMethodBegin net6.0 719ns 0.496ns 1.92ns 0.00898 0 0 656 B
#5046 RunOnMethodBegin netcoreapp3.1 947ns 0.309ns 1.11ns 0.00883 0 0 656 B
#5046 RunOnMethodBegin net472 1.04μs 0.405ns 1.57ns 0.0981 0 0 618 B

Verified

This commit was signed with the committer’s verified signature.
kevingosse Kevin Gosse
@kevingosse
Copy link
Collaborator Author

I've reported the issue to Microsoft. Until they can fix it, I disable procdump on x86: 302c605

@kevingosse kevingosse merged commit 9a82fdf into master Jan 12, 2024
55 checks passed
@kevingosse kevingosse deleted the kevin/procdump_native branch January 12, 2024 14:52
@github-actions github-actions bot added this to the vNext milestone Jan 12, 2024
kevingosse added a commit that referenced this pull request Aug 20, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
## Summary of changes

Enable ad-hoc memory dumps on Windows x86.
As part of #5046, I
disabled procdump on Windows x86 because it caused issue when monitoring
a process. However, by doing so I also disabled "on-demand" memory dumps
which _should_ work perfectly fine.

## Reason for change

Needed to investigate mysterious timeouts in dd-dotnet tests.

## Implementation details

Added a `_isCrashMonitoringAvailable` flag to distinguish the two
use-cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:tests unit tests, integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants