-
Notifications
You must be signed in to change notification settings - Fork 147
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
[Profiler] Fix UBsan Job #6380
[Profiler] Fix UBsan Job #6380
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 453087 Passed, 3201 Skipped, 20h 57m 7.73s Total Time ⌛ Performance Regressions vs Default Branch (2) |
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:
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). gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6380) - mean (69ms) : 66, 72
. : milestone, 69,
master - mean (69ms) : 66, 71
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (6380) - mean (983ms) : 954, 1012
. : milestone, 983,
master - mean (981ms) : 959, 1003
. : milestone, 981,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6380) - mean (108ms) : 105, 111
. : milestone, 108,
master - mean (108ms) : 106, 111
. : milestone, 108,
section CallTarget+Inlining+NGEN
This PR (6380) - mean (681ms) : 664, 698
. : milestone, 681,
master - mean (681ms) : 663, 700
. : milestone, 681,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6380) - mean (91ms) : 89, 93
. : milestone, 91,
master - mean (91ms) : 90, 93
. : milestone, 91,
section CallTarget+Inlining+NGEN
This PR (6380) - mean (631ms) : 617, 645
. : milestone, 631,
master - mean (633ms) : 620, 646
. : milestone, 633,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6380) - mean (190ms) : 184, 197
. : milestone, 190,
master - mean (191ms) : 187, 195
. : milestone, 191,
section CallTarget+Inlining+NGEN
This PR (6380) - mean (1,093ms) : 1067, 1118
. : milestone, 1093,
master - mean (1,095ms) : 1066, 1123
. : milestone, 1095,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6380) - mean (276ms) : 272, 280
. : milestone, 276,
master - mean (277ms) : 272, 282
. : milestone, 277,
section CallTarget+Inlining+NGEN
This PR (6380) - mean (905ms) : 808, 1003
. : milestone, 905,
master - mean (867ms) : 842, 893
. : milestone, 867,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6380) - mean (329ms) : 323, 335
. : milestone, 329,
master - mean (265ms) : 260, 269
. : milestone, 265,
section CallTarget+Inlining+NGEN
This PR (6380) - mean (862ms) : 826, 898
. : milestone, 862,
master - mean (853ms) : 822, 884
. : milestone, 853,
|
Throughput/Crank Report ⚡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! gantt
title Throughput Linux x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6380) (11.287M) : 0, 11286531
master (11.142M) : 0, 11142160
benchmarks/2.9.0 (11.033M) : 0, 11032866
section Automatic
This PR (6380) (7.344M) : 0, 7344454
master (7.363M) : 0, 7363424
benchmarks/2.9.0 (7.786M) : 0, 7785853
section Trace stats
master (7.607M) : 0, 7607008
section Manual
master (11.275M) : 0, 11275455
section Manual + Automatic
This PR (6380) (6.719M) : 0, 6719053
master (6.792M) : 0, 6792352
section DD_TRACE_ENABLED=0
master (10.439M) : 0, 10439037
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6380) (9.758M) : 0, 9757731
master (9.654M) : 0, 9653591
benchmarks/2.9.0 (9.495M) : 0, 9494821
section Automatic
This PR (6380) (6.116M) : 0, 6116050
master (6.390M) : 0, 6389835
section Trace stats
master (6.750M) : 0, 6750226
section Manual
master (9.569M) : 0, 9568710
section Manual + Automatic
This PR (6380) (5.960M) : 0, 5960149
master (6.103M) : 0, 6103364
section DD_TRACE_ENABLED=0
master (8.654M) : 0, 8654106
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6380) (9.910M) : 0, 9910221
master (10.012M) : 0, 10011511
benchmarks/2.9.0 (10.020M) : 0, 10019592
section Automatic
This PR (6380) (6.276M) : 0, 6275979
master (6.299M) : 0, 6298610
benchmarks/2.9.0 (7.255M) : 0, 7255257
section Trace stats
master (7.028M) : 0, 7027938
section Manual
master (9.897M) : 0, 9896735
section Manual + Automatic
This PR (6380) (5.782M) : 0, 5782428
master (5.876M) : 0, 5876361
section DD_TRACE_ENABLED=0
master (9.276M) : 0, 9275838
|
10b4827
to
cf4978e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Benchmarks Report for tracer 🐌Benchmarks for #6380 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net472 | 1.118 | 2,479.26 | 2,771.05 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 1.47μs | 2.06ns | 7.97ns | 0.023 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.19μs | 1.73ns | 6.7ns | 0.0218 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
net472 | 2.48μs | 1.15ns | 4.29ns | 0.249 | 0 | 0 | 1.57 KB |
#6380 | EnrichedLog |
net6.0 | 1.46μs | 0.634ns | 2.45ns | 0.0233 | 0 | 0 | 1.64 KB |
#6380 | EnrichedLog |
netcoreapp3.1 | 2.12μs | 0.763ns | 2.95ns | 0.0214 | 0 | 0 | 1.64 KB |
#6380 | EnrichedLog |
net472 | 2.77μs | 1.02ns | 3.81ns | 0.249 | 0 | 0 | 1.57 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 | 120μs | 172ns | 620ns | 0.0606 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
netcoreapp3.1 | 123μs | 226ns | 875ns | 0 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
net472 | 153μs | 85.2ns | 330ns | 0.683 | 0.228 | 0 | 4.46 KB |
#6380 | EnrichedLog |
net6.0 | 119μs | 100ns | 362ns | 0 | 0 | 0 | 4.28 KB |
#6380 | EnrichedLog |
netcoreapp3.1 | 124μs | 116ns | 450ns | 0 | 0 | 0 | 4.28 KB |
#6380 | EnrichedLog |
net472 | 152μs | 171ns | 660ns | 0.681 | 0.227 | 0 | 4.46 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 | 3.09μs | 0.872ns | 3.38ns | 0.031 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.21μs | 3.09ns | 12ns | 0.0293 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
net472 | 4.87μs | 1.41ns | 5.28ns | 0.319 | 0 | 0 | 2.02 KB |
#6380 | EnrichedLog |
net6.0 | 3.06μs | 3.3ns | 12.8ns | 0.0303 | 0 | 0 | 2.2 KB |
#6380 | EnrichedLog |
netcoreapp3.1 | 4.08μs | 1.16ns | 4.49ns | 0.0285 | 0 | 0 | 2.2 KB |
#6380 | EnrichedLog |
net472 | 4.75μs | 1.57ns | 6.07ns | 0.319 | 0 | 0 | 2.02 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.33μs | 0.963ns | 3.73ns | 0.0159 | 0 | 0 | 1.14 KB |
master | SendReceive |
netcoreapp3.1 | 1.73μs | 0.295ns | 1.1ns | 0.0156 | 0 | 0 | 1.14 KB |
master | SendReceive |
net472 | 2.09μs | 1.09ns | 4.24ns | 0.184 | 0 | 0 | 1.16 KB |
#6380 | SendReceive |
net6.0 | 1.37μs | 0.617ns | 2.39ns | 0.0164 | 0 | 0 | 1.14 KB |
#6380 | SendReceive |
netcoreapp3.1 | 1.82μs | 0.885ns | 3.43ns | 0.0155 | 0 | 0 | 1.14 KB |
#6380 | SendReceive |
net472 | 2.04μs | 1.38ns | 5.33ns | 0.183 | 0 | 0 | 1.16 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.78μs | 1.05ns | 4.07ns | 0.0221 | 0 | 0 | 1.6 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.84μs | 8.26ns | 32ns | 0.0227 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
net472 | 4.39μs | 3.6ns | 13.9ns | 0.322 | 0 | 0 | 2.04 KB |
#6380 | EnrichedLog |
net6.0 | 2.84μs | 0.618ns | 2.31ns | 0.0226 | 0 | 0 | 1.6 KB |
#6380 | EnrichedLog |
netcoreapp3.1 | 4.01μs | 1.72ns | 6.68ns | 0.022 | 0 | 0 | 1.65 KB |
#6380 | EnrichedLog |
net472 | 4.39μs | 1.78ns | 6.67ns | 0.323 | 0 | 0 | 2.04 KB |
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #6380
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0
1.149
396.12
455.16
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.149 | 396.12 | 455.16 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 396ns | 0.253ns | 0.979ns | 0.00807 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 636ns | 0.527ns | 2.04ns | 0.00747 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 609ns | 0.368ns | 1.43ns | 0.0918 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 503ns | 0.279ns | 1.08ns | 0.00961 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 768ns | 0.609ns | 2.36ns | 0.00953 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 831ns | 1.18ns | 4.59ns | 0.104 | 0 | 0 | 658 B |
#6380 | StartFinishSpan |
net6.0 | 455ns | 0.254ns | 0.984ns | 0.00804 | 0 | 0 | 576 B |
#6380 | StartFinishSpan |
netcoreapp3.1 | 613ns | 0.766ns | 2.87ns | 0.00773 | 0 | 0 | 576 B |
#6380 | StartFinishSpan |
net472 | 667ns | 0.687ns | 2.66ns | 0.0916 | 0 | 0 | 578 B |
#6380 | StartFinishScope |
net6.0 | 485ns | 0.364ns | 1.41ns | 0.00973 | 0 | 0 | 696 B |
#6380 | StartFinishScope |
netcoreapp3.1 | 750ns | 0.477ns | 1.72ns | 0.0093 | 0 | 0 | 696 B |
#6380 | StartFinishScope |
net472 | 905ns | 0.558ns | 2.09ns | 0.104 | 0 | 0 | 658 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 | 641ns | 0.381ns | 1.47ns | 0.00968 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 881ns | 0.657ns | 2.54ns | 0.00925 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.07μs | 0.673ns | 2.61ns | 0.104 | 0 | 0 | 658 B |
#6380 | RunOnMethodBegin |
net6.0 | 688ns | 0.667ns | 2.58ns | 0.01 | 0 | 0 | 696 B |
#6380 | RunOnMethodBegin |
netcoreapp3.1 | 880ns | 0.565ns | 2.19ns | 0.00931 | 0 | 0 | 696 B |
#6380 | RunOnMethodBegin |
net472 | 1.12μs | 0.381ns | 1.47ns | 0.104 | 0 | 0 | 658 B |
cf4978e
to
713700b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ty!
## Summary of changes Fix the UBSAN job. ## Reason for change A recent unit test was added. This test builds events by writing the field in raw memory (like the CLR does). But the alignment is not taken care of (like the CLR) and UBSAN shouts about. ## Implementation details Since it's a test, we just disable UBSAN on the function (in the test) that creates the event.
Summary of changes
Fix the UBSAN job.
Reason for change
A recent unit test was added. This test builds events by writing the field in raw memory (like the CLR does). But the alignment is not taken care of (like the CLR) and UBSAN shouts about.
Implementation details
Since it's a test, we just disable UBSAN on the function (in the test) that creates the event.