-
Notifications
You must be signed in to change notification settings - Fork 140
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
[IAST] Add a mark to the modified instructions in IL dumps (#5854 -> v2) #5860
Conversation
## Summary of changes Add a marker * after the IL instruction OFFSET in Dataflow IL dumps ![image](https://github.com/user-attachments/assets/6cd6c007-5e48-4ce8-99a0-6b1d1d00d24e) Also, some not used code and useless logs have been removed ## Reason for change Sometimes modified instructions were difficult to locate in dumps present in the logs. ## Implementation details Identified new instructions with a flag instead of relaying on a negative offset as before, as this was lost in `rejit` situations ## Test coverage ## Other details <!-- Fixes #{issue} --> <!--⚠️ Note: where possible, please obtain 2 approvals prior to merging. Unless CODEOWNERS specifies otherwise, for external teams it is typically best to have one review from a team member, and one review from apm-dotnet. Trivial changes do not require 2 reviews. -->
Datadog ReportBranch report: ✅ 0 Failed, 346915 Passed, 2246 Skipped, 23h 54m 19.62s Total Time ⌛ Performance Regressions vs Default Branch (15)
|
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 (5860) - mean (74ms) : 65, 82
. : milestone, 74,
master - mean (74ms) : 64, 84
. : milestone, 74,
section CallTarget+Inlining+NGEN
This PR (5860) - mean (1,035ms) : 1002, 1068
. : milestone, 1035,
master - mean (1,063ms) : 1041, 1084
. : milestone, 1063,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5860) - mean (109ms) : 105, 114
. : milestone, 109,
master - mean (110ms) : 105, 115
. : milestone, 110,
section CallTarget+Inlining+NGEN
This PR (5860) - mean (722ms) : 700, 744
. : milestone, 722,
master - mean (747ms) : 727, 767
. : milestone, 747,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5860) - mean (93ms) : 89, 97
. : milestone, 93,
master - mean (92ms) : 88, 96
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (5860) - mean (674ms) : 614, 734
. : milestone, 674,
master - mean (703ms) : 684, 721
. : milestone, 703,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5860) - mean (193ms) : 189, 197
. : milestone, 193,
master - mean (192ms) : 189, 196
. : milestone, 192,
section CallTarget+Inlining+NGEN
This PR (5860) - mean (1,127ms) : 1108, 1146
. : milestone, 1127,
master - mean (1,169ms) : 1139, 1200
. : milestone, 1169,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5860) - mean (278ms) : 272, 284
. : milestone, 278,
master - mean (275ms) : 271, 280
. : milestone, 275,
section CallTarget+Inlining+NGEN
This PR (5860) - mean (882ms) : 859, 906
. : milestone, 882,
master - mean (921ms) : 896, 947
. : milestone, 921,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5860) - mean (266ms) : 261, 270
. : milestone, 266,
master - mean (266ms) : 262, 270
. : milestone, 266,
section CallTarget+Inlining+NGEN
This PR (5860) - mean (871ms) : 842, 900
. : milestone, 871,
master - mean (905ms) : 883, 928
. : milestone, 905,
|
Benchmarks Report for appsec 🐌Benchmarks for #5860 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations
|
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 59.06 KB | 59.74 KB | 680 B | 1.15% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StringConcatBenchmark |
net6.0 | 58.9μs | 779ns | 7.67μs | 0 | 0 | 0 | 43.44 KB |
master | StringConcatBenchmark |
netcoreapp3.1 | 61.5μs | 737ns | 7.25μs | 0 | 0 | 0 | 42.64 KB |
master | StringConcatBenchmark |
net472 | 37.5μs | 98.2ns | 354ns | 0 | 0 | 0 | 59.06 KB |
master | StringConcatAspectBenchmark |
net6.0 | 292μs | 5.72μs | 56.9μs | 0 | 0 | 0 | 254.2 KB |
master | StringConcatAspectBenchmark |
netcoreapp3.1 | 310μs | 5.17μs | 51.2μs | 0 | 0 | 0 | 254.01 KB |
master | StringConcatAspectBenchmark |
net472 | 280μs | 6.22μs | 60.6μs | 0 | 0 | 0 | 278.53 KB |
#5860 | StringConcatBenchmark |
net6.0 | 62μs | 814ns | 8.1μs | 0 | 0 | 0 | 43.44 KB |
#5860 | StringConcatBenchmark |
netcoreapp3.1 | 54μs | 262ns | 1.11μs | 0 | 0 | 0 | 42.64 KB |
#5860 | StringConcatBenchmark |
net472 | 37.9μs | 107ns | 399ns | 0 | 0 | 0 | 59.74 KB |
#5860 | StringConcatAspectBenchmark |
net6.0 | 314μs | 6.78μs | 67.5μs | 0 | 0 | 0 | 255.37 KB |
#5860 | StringConcatAspectBenchmark |
netcoreapp3.1 | 333μs | 1.85μs | 11.4μs | 0 | 0 | 0 | 252.82 KB |
#5860 | StringConcatAspectBenchmark |
net472 | 278μs | 4.97μs | 48.4μs | 0 | 0 | 0 | 278.53 KB |
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! gantt
title Throughput Linux x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5860) (11.655M) : 0, 11654584
master (11.540M) : 0, 11539873
benchmarks/2.9.0 (11.513M) : 0, 11512780
section Automatic
This PR (5860) (7.796M) : 0, 7796361
master (7.790M) : 0, 7789973
benchmarks/2.9.0 (8.207M) : 0, 8206882
section Trace stats
master (8.076M) : 0, 8075704
section Manual
This PR (5860) (9.831M) : crit ,0, 9830957
master (11.604M) : 0, 11603917
section Manual + Automatic
This PR (5860) (7.340M) : 0, 7339769
master (7.210M) : 0, 7209845
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5860) (9.605M) : 0, 9605291
benchmarks/2.9.0 (9.495M) : 0, 9494663
section Automatic
This PR (5860) (6.730M) : 0, 6730455
section Manual
This PR (5860) (8.379M) : 0, 8379275
section Manual + Automatic
This PR (5860) (6.234M) : 0, 6234470
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5860) (10.166M) : 0, 10166073
section Automatic
This PR (5860) (7.259M) : 0, 7259050
section Manual
This PR (5860) (8.929M) : 0, 8929461
section Manual + Automatic
This PR (5860) (6.951M) : 0, 6950887
|
Benchmarks Report for tracer 🐌Benchmarks for #5860 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 - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net6.0 | 1.119 | 1,210.56 | 1,354.13 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | ExecuteAsync |
net6.0 | 1.21μs | 0.344ns | 1.29ns | 0.0134 | 0 | 0 | 952 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.57μs | 0.739ns | 2.86ns | 0.0126 | 0 | 0 | 952 B |
master | ExecuteAsync |
net472 | 1.73μs | 0.724ns | 2.71ns | 0.145 | 0 | 0 | 915 B |
#5860 | ExecuteAsync |
net6.0 | 1.35μs | 0.584ns | 2.26ns | 0.0136 | 0 | 0 | 952 B |
#5860 | ExecuteAsync |
netcoreapp3.1 | 1.67μs | 0.761ns | 2.95ns | 0.0128 | 0 | 0 | 952 B |
#5860 | ExecuteAsync |
net472 | 1.76μs | 1.14ns | 4.4ns | 0.145 | 0 | 0 | 915 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.15μs | 1.58ns | 5.9ns | 0.0314 | 0 | 0 | 2.22 KB |
master | SendAsync |
netcoreapp3.1 | 5.03μs | 2.91ns | 10.9ns | 0.0376 | 0 | 0 | 2.76 KB |
master | SendAsync |
net472 | 7.69μs | 6.3ns | 23.6ns | 0.497 | 0 | 0 | 3.15 KB |
#5860 | SendAsync |
net6.0 | 4.17μs | 1.37ns | 5.29ns | 0.0314 | 0 | 0 | 2.22 KB |
#5860 | SendAsync |
netcoreapp3.1 | 5.13μs | 1.78ns | 6.9ns | 0.0358 | 0 | 0 | 2.76 KB |
#5860 | SendAsync |
net472 | 7.73μs | 4.06ns | 15.7ns | 0.496 | 0 | 0 | 3.15 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.48μs | 1.87ns | 6.99ns | 0.0228 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.24μs | 3.04ns | 11.8ns | 0.0223 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
net472 | 2.61μs | 1.34ns | 5.19ns | 0.249 | 0 | 0 | 1.57 KB |
#5860 | EnrichedLog |
net6.0 | 1.52μs | 2.09ns | 8.1ns | 0.0226 | 0 | 0 | 1.64 KB |
#5860 | EnrichedLog |
netcoreapp3.1 | 2.25μs | 1.43ns | 5.53ns | 0.0224 | 0 | 0 | 1.64 KB |
#5860 | EnrichedLog |
net472 | 2.71μs | 1.84ns | 7.14ns | 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 | 114μs | 192ns | 743ns | 0.0573 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
netcoreapp3.1 | 120μs | 143ns | 536ns | 0.0598 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
net472 | 148μs | 246ns | 952ns | 0.661 | 0.22 | 0 | 4.46 KB |
#5860 | EnrichedLog |
net6.0 | 118μs | 175ns | 677ns | 0.0587 | 0 | 0 | 4.28 KB |
#5860 | EnrichedLog |
netcoreapp3.1 | 120μs | 175ns | 654ns | 0 | 0 | 0 | 4.28 KB |
#5860 | EnrichedLog |
net472 | 150μs | 300ns | 1.16μs | 0.672 | 0.224 | 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.28μs | 0.866ns | 3.35ns | 0.0308 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.14μs | 0.966ns | 3.62ns | 0.029 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
net472 | 4.69μs | 2.01ns | 7.79ns | 0.32 | 0 | 0 | 2.02 KB |
#5860 | EnrichedLog |
net6.0 | 2.98μs | 1.38ns | 5.17ns | 0.0299 | 0 | 0 | 2.2 KB |
#5860 | EnrichedLog |
netcoreapp3.1 | 4.07μs | 1.61ns | 6.23ns | 0.0285 | 0 | 0 | 2.2 KB |
#5860 | EnrichedLog |
net472 | 4.71μs | 1.02ns | 3.81ns | 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.45μs | 1.23ns | 4.77ns | 0.0157 | 0 | 0 | 1.14 KB |
master | SendReceive |
netcoreapp3.1 | 1.78μs | 1.59ns | 6.17ns | 0.0152 | 0 | 0 | 1.14 KB |
master | SendReceive |
net472 | 2.12μs | 0.852ns | 3.07ns | 0.183 | 0.00106 | 0 | 1.16 KB |
#5860 | SendReceive |
net6.0 | 1.32μs | 3.11ns | 11.2ns | 0.0159 | 0 | 0 | 1.14 KB |
#5860 | SendReceive |
netcoreapp3.1 | 1.8μs | 1.57ns | 5.45ns | 0.0153 | 0 | 0 | 1.14 KB |
#5860 | SendReceive |
net472 | 2.08μs | 0.891ns | 3.45ns | 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.64μs | 1.29ns | 4.45ns | 0.0225 | 0 | 0 | 1.6 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.88μs | 1.39ns | 5.19ns | 0.0214 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
net472 | 4.47μs | 4.69ns | 18.2ns | 0.322 | 0 | 0 | 2.04 KB |
#5860 | EnrichedLog |
net6.0 | 2.7μs | 1.09ns | 4.07ns | 0.0231 | 0 | 0 | 1.6 KB |
#5860 | EnrichedLog |
netcoreapp3.1 | 4.06μs | 2.11ns | 8.16ns | 0.0222 | 0 | 0 | 1.65 KB |
#5860 | EnrichedLog |
net472 | 4.52μs | 5.48ns | 21.2ns | 0.323 | 0 | 0 | 2.04 KB |
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #5860
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472
1.157
581.12
672.24
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1
1.126
708.59
797.89
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 | 1.157 | 581.12 | 672.24 | |
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 | 1.126 | 708.59 | 797.89 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 415ns | 0.272ns | 1.05ns | 0.00797 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 611ns | 0.404ns | 1.56ns | 0.00764 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 581ns | 0.697ns | 2.61ns | 0.0917 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 479ns | 0.186ns | 0.722ns | 0.00985 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 710ns | 1.16ns | 4.5ns | 0.00953 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 885ns | 3.55ns | 13.8ns | 0.104 | 0 | 0 | 658 B |
#5860 | StartFinishSpan |
net6.0 | 398ns | 0.129ns | 0.501ns | 0.00818 | 0 | 0 | 576 B |
#5860 | StartFinishSpan |
netcoreapp3.1 | 620ns | 0.425ns | 1.65ns | 0.00768 | 0 | 0 | 576 B |
#5860 | StartFinishSpan |
net472 | 673ns | 0.429ns | 1.66ns | 0.0916 | 0 | 0 | 578 B |
#5860 | StartFinishScope |
net6.0 | 474ns | 0.128ns | 0.461ns | 0.00982 | 0 | 0 | 696 B |
#5860 | StartFinishScope |
netcoreapp3.1 | 798ns | 0.889ns | 3.44ns | 0.00912 | 0 | 0 | 696 B |
#5860 | StartFinishScope |
net472 | 829ns | 0.667ns | 2.59ns | 0.104 | 0 | 0 | 658 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #5860
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1
1.119
833.02
932.45
Faster 🎉 in #5860
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0
1.115
675.40
605.76
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1 | 1.119 | 833.02 | 932.45 |
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 | 1.115 | 675.40 | 605.76 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunOnMethodBegin |
net6.0 | 676ns | 0.746ns | 2.89ns | 0.00983 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 833ns | 0.282ns | 1.09ns | 0.0095 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.14μs | 0.367ns | 1.27ns | 0.104 | 0 | 0 | 658 B |
#5860 | RunOnMethodBegin |
net6.0 | 606ns | 0.425ns | 1.64ns | 0.00976 | 0 | 0 | 696 B |
#5860 | RunOnMethodBegin |
netcoreapp3.1 | 935ns | 1.45ns | 5.6ns | 0.00944 | 0 | 0 | 696 B |
#5860 | RunOnMethodBegin |
net472 | 1.14μs | 0.403ns | 1.56ns | 0.104 | 0 | 0 | 658 B |
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.
rubber stamp
Summary of changes
Add a marker * after the IL instruction OFFSET in Dataflow IL dumps
Also, some not used code and useless logs have been removed
Reason for change
Sometimes modified instructions were difficult to locate in dumps present in the logs.
Implementation details
Identified new instructions with a flag instead of relaying on a negative offset as before, as this was lost in
rejit
situations