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

[IAST] Add a mark to the modified instructions in IL dumps #5854

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

daniel-romano-DD
Copy link
Contributor

@daniel-romano-DD daniel-romano-DD commented Aug 7, 2024

Summary of changes

Add a marker * after the IL instruction OFFSET in Dataflow IL dumps

image

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

@daniel-romano-DD daniel-romano-DD added area:native-library Automatic instrumentation native C++ code (Datadog.Trace.ClrProfiler.Native) area:asm-iast labels Aug 7, 2024
@daniel-romano-DD daniel-romano-DD requested review from a team as code owners August 7, 2024 07:59
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Aug 7, 2024

Datadog Report

Branch report: dani/iast/better_il_dumps
Commit report: 81840a0
Test service: dd-trace-dotnet

✅ 0 Failed, 345809 Passed, 2225 Skipped, 24h 33m 27.18s Total Time

@andrewlock
Copy link
Member

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

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5854) - mean (75ms)  : 61, 90
     .   : milestone, 75,
    master - mean (72ms)  : 64, 81
     .   : milestone, 72,

    section CallTarget+Inlining+NGEN
    This PR (5854) - mean (1,064ms)  : 1046, 1081
     .   : milestone, 1064,
    master - mean (1,066ms)  : 1046, 1086
     .   : milestone, 1066,

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

    section CallTarget+Inlining+NGEN
    This PR (5854) - mean (750ms)  : 728, 771
     .   : milestone, 750,
    master - mean (745ms)  : 728, 763
     .   : milestone, 745,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5854) - mean (92ms)  : 88, 96
     .   : milestone, 92,
    master - mean (91ms)  : 88, 95
     .   : milestone, 91,

    section CallTarget+Inlining+NGEN
    This PR (5854) - mean (700ms)  : 678, 721
     .   : milestone, 700,
    master - mean (697ms)  : 680, 713
     .   : milestone, 697,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5854) - mean (193ms)  : 189, 197
     .   : milestone, 193,
    master - mean (192ms)  : 188, 197
     .   : milestone, 192,

    section CallTarget+Inlining+NGEN
    This PR (5854) - mean (1,170ms)  : 1144, 1196
     .   : milestone, 1170,
    master - mean (1,169ms)  : 1142, 1196
     .   : milestone, 1169,

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

    section CallTarget+Inlining+NGEN
    This PR (5854) - mean (923ms)  : 902, 943
     .   : milestone, 923,
    master - mean (919ms)  : 898, 940
     .   : milestone, 919,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5854) - mean (266ms)  : 263, 269
     .   : milestone, 266,
    master - mean (266ms)  : 261, 271
     .   : milestone, 266,

    section CallTarget+Inlining+NGEN
    This PR (5854) - mean (905ms)  : 883, 928
     .   : milestone, 905,
    master - mean (905ms)  : 875, 935
     .   : milestone, 905,

Loading

@andrewlock
Copy link
Member

Benchmarks Report for appsec 🐌

Benchmarks for #5854 compared to master:

  • All benchmarks have the same speed
  • 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.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 72.6μs 107ns 416ns 0.0723 0 0 6 KB
master AllCycleSimpleBody netcoreapp3.1 63.6μs 102ns 381ns 0.0648 0 0 6.95 KB
master AllCycleSimpleBody net472 48.2μs 45.4ns 164ns 1.32 0 0 8.33 KB
master AllCycleMoreComplexBody net6.0 77.2μs 107ns 400ns 0.116 0 0 9.51 KB
master AllCycleMoreComplexBody netcoreapp3.1 69.6μs 121ns 470ns 0.139 0 0 10.36 KB
master AllCycleMoreComplexBody net472 56.2μs 75.6ns 293ns 1.88 0.028 0 11.85 KB
master ObjectExtractorSimpleBody net6.0 139ns 0.0911ns 0.341ns 0.00394 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 201ns 0.155ns 0.579ns 0.00376 0 0 272 B
master ObjectExtractorSimpleBody net472 163ns 0.119ns 0.445ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 3.14μs 1.46ns 5.67ns 0.0535 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 3.84μs 2.28ns 8.55ns 0.0502 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 3.89μs 2.2ns 8.52ns 0.602 0.0058 0 3.8 KB
#5854 AllCycleSimpleBody net6.0 71.9μs 96.9ns 375ns 0.0721 0 0 6 KB
#5854 AllCycleSimpleBody netcoreapp3.1 64μs 84.3ns 315ns 0.0952 0 0 6.95 KB
#5854 AllCycleSimpleBody net472 47.9μs 46.8ns 175ns 1.31 0 0 8.34 KB
#5854 AllCycleMoreComplexBody net6.0 79.1μs 141ns 529ns 0.119 0 0 9.51 KB
#5854 AllCycleMoreComplexBody netcoreapp3.1 69μs 69.3ns 268ns 0.138 0 0 10.36 KB
#5854 AllCycleMoreComplexBody net472 55μs 40.5ns 152ns 1.86 0.0274 0 11.85 KB
#5854 ObjectExtractorSimpleBody net6.0 142ns 0.228ns 0.882ns 0.00395 0 0 280 B
#5854 ObjectExtractorSimpleBody netcoreapp3.1 204ns 0.179ns 0.669ns 0.00362 0 0 272 B
#5854 ObjectExtractorSimpleBody net472 164ns 0.21ns 0.813ns 0.0446 0 0 281 B
#5854 ObjectExtractorMoreComplexBody net6.0 3.14μs 2.09ns 7.52ns 0.053 0 0 3.78 KB
#5854 ObjectExtractorMoreComplexBody netcoreapp3.1 3.92μs 3.39ns 13.1ns 0.0485 0 0 3.69 KB
#5854 ObjectExtractorMoreComplexBody net472 3.9μs 2.67ns 10ns 0.602 0.00583 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 39.1μs 21.3ns 82.6ns 0.448 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 54μs 16.4ns 59ns 0.431 0 0 32.4 KB
master EncodeArgs net472 65.1μs 30.2ns 113ns 5.16 0.0653 0 32.5 KB
master EncodeLegacyArgs net6.0 72.9μs 410ns 2.9μs 0 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 109μs 79.2ns 307ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 155μs 98.9ns 383ns 0.307 0 0 2.15 KB
#5854 EncodeArgs net6.0 38.1μs 20ns 77.5ns 0.455 0 0 32.4 KB
#5854 EncodeArgs netcoreapp3.1 53.9μs 32.2ns 125ns 0.43 0 0 32.4 KB
#5854 EncodeArgs net472 65.4μs 57ns 221ns 5.15 0.0648 0 32.5 KB
#5854 EncodeLegacyArgs net6.0 77.2μs 124ns 480ns 0 0 0 2.14 KB
#5854 EncodeLegacyArgs netcoreapp3.1 102μs 104ns 401ns 0 0 0 2.14 KB
#5854 EncodeLegacyArgs net472 151μs 47.9ns 186ns 0.306 0 0 2.15 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 RunWafRealisticBenchmark net6.0 186μs 62.3ns 241ns 0 0 0 2.42 KB
master RunWafRealisticBenchmark netcoreapp3.1 199μs 188ns 728ns 0 0 0 2.37 KB
master RunWafRealisticBenchmark net472 209μs 55.4ns 200ns 0.311 0 0 2.43 KB
master RunWafRealisticBenchmarkWithAttack net6.0 122μs 70.5ns 273ns 0 0 0 1.46 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 131μs 210ns 815ns 0 0 0 1.45 KB
master RunWafRealisticBenchmarkWithAttack net472 140μs 26.7ns 104ns 0.209 0 0 1.48 KB
#5854 RunWafRealisticBenchmark net6.0 183μs 78.2ns 303ns 0 0 0 2.42 KB
#5854 RunWafRealisticBenchmark netcoreapp3.1 197μs 198ns 739ns 0 0 0 2.37 KB
#5854 RunWafRealisticBenchmark net472 209μs 64.2ns 240ns 0.313 0 0 2.43 KB
#5854 RunWafRealisticBenchmarkWithAttack net6.0 123μs 49.2ns 184ns 0 0 0 1.46 KB
#5854 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 129μs 103ns 386ns 0 0 0 1.45 KB
#5854 RunWafRealisticBenchmarkWithAttack net472 139μs 199ns 773ns 0.208 0 0 1.48 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #5854

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 254.2 KB 266.53 KB 12.33 KB 4.85%

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
#5854 StringConcatBenchmark net6.0 51.9μs 134ns 482ns 0 0 0 43.44 KB
#5854 StringConcatBenchmark netcoreapp3.1 56.5μs 320ns 2.12μs 0 0 0 42.64 KB
#5854 StringConcatBenchmark net472 38.4μs 121ns 453ns 0 0 0 59.12 KB
#5854 StringConcatAspectBenchmark net6.0 313μs 1.69μs 9.84μs 0 0 0 266.53 KB
#5854 StringConcatAspectBenchmark netcoreapp3.1 332μs 3.09μs 30.4μs 0 0 0 254.19 KB
#5854 StringConcatAspectBenchmark net472 297μs 8.23μs 79.3μs 0 0 0 278.53 KB

@andrewlock
Copy link
Member

Benchmarks Report for tracer 🐌

Benchmarks for #5854 compared to master:

  • 2 benchmarks are slower, with geometric mean 1.143
  • All benchmarks have the same 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 7.68μs 43.7ns 321ns 0.0113 0.00376 0 5.43 KB
master StartStopWithChild netcoreapp3.1 10μs 55.3ns 336ns 0.0282 0.0141 0 5.62 KB
master StartStopWithChild net472 15.9μs 51ns 197ns 1.02 0.306 0.0943 6.07 KB
#5854 StartStopWithChild net6.0 7.7μs 43.9ns 331ns 0.0199 0.00796 0 5.42 KB
#5854 StartStopWithChild netcoreapp3.1 10μs 54.6ns 299ns 0.0152 0.00505 0 5.62 KB
#5854 StartStopWithChild net472 15.9μs 54.2ns 203ns 1.02 0.3 0.0947 6.06 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 466μs 437ns 1.63μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 602μs 239ns 894ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 819μs 368ns 1.27μs 0.411 0 0 3.3 KB
#5854 WriteAndFlushEnrichedTraces net6.0 473μs 459ns 1.78μs 0 0 0 2.7 KB
#5854 WriteAndFlushEnrichedTraces netcoreapp3.1 639μs 535ns 2.07μs 0 0 0 2.7 KB
#5854 WriteAndFlushEnrichedTraces net472 841μs 775ns 3μs 0.419 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Unknown 🤷 Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 207μs 1.19μs 9.71μs 0.221 0 0 18.45 KB
master SendRequest netcoreapp3.1 227μs 1.31μs 11.7μs 0.222 0 0 20.61 KB
master SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
#5854 SendRequest net6.0 186μs 938ns 4.6μs 0.198 0 0 18.45 KB
#5854 SendRequest netcoreapp3.1 234μs 1.37μs 13.4μs 0.225 0 0 20.61 KB
#5854 SendRequest net472 0ns 0ns 0ns 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 575μs 2.98μs 15.8μs 0.324 0 0 41.55 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 706μs 4.1μs 35.5μs 0.355 0 0 41.64 KB
master WriteAndFlushEnrichedTraces net472 852μs 3.55μs 13.7μs 8.45 2.53 0.422 53.3 KB
#5854 WriteAndFlushEnrichedTraces net6.0 547μs 2.93μs 15μs 0.548 0 0 41.45 KB
#5854 WriteAndFlushEnrichedTraces netcoreapp3.1 689μs 2.7μs 9.36μs 0.345 0 0 41.67 KB
#5854 WriteAndFlushEnrichedTraces net472 910μs 3.24μs 12.6μs 8.04 2.23 0.446 53.31 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.19μs 0.788ns 2.95ns 0.0143 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.73μs 1.42ns 5.1ns 0.0139 0 0 1.02 KB
master ExecuteNonQuery net472 2.11μs 2.45ns 9.48ns 0.156 0 0 987 B
#5854 ExecuteNonQuery net6.0 1.23μs 2.5ns 9.7ns 0.014 0 0 1.02 KB
#5854 ExecuteNonQuery netcoreapp3.1 1.65μs 1.96ns 7.59ns 0.0132 0 0 1.02 KB
#5854 ExecuteNonQuery net472 1.96μs 9.85ns 51.2ns 0.156 0 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #5854

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 1.135 1,100.91 1,249.39

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.1μs 0.69ns 2.67ns 0.0138 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.52μs 0.89ns 3.45ns 0.0129 0 0 976 B
master CallElasticsearch net472 2.48μs 3.74ns 14.5ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.17μs 0.661ns 2.47ns 0.0135 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.67μs 0.921ns 3.44ns 0.0132 0 0 1.02 KB
master CallElasticsearchAsync net472 2.72μs 3.46ns 13.4ns 0.167 0 0 1.05 KB
#5854 CallElasticsearch net6.0 1.25μs 0.624ns 2.34ns 0.0138 0 0 976 B
#5854 CallElasticsearch netcoreapp3.1 1.5μs 0.886ns 3.31ns 0.0134 0 0 976 B
#5854 CallElasticsearch net472 2.47μs 1.93ns 7.22ns 0.158 0.00123 0 995 B
#5854 CallElasticsearchAsync net6.0 1.24μs 0.635ns 2.38ns 0.0131 0 0 952 B
#5854 CallElasticsearchAsync netcoreapp3.1 1.56μs 0.771ns 2.88ns 0.0134 0 0 1.02 KB
#5854 CallElasticsearchAsync net472 2.65μs 2.7ns 10.5ns 0.166 0 0 1.05 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.25μs 0.536ns 2.01ns 0.0131 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.64μs 1.82ns 6.8ns 0.0123 0 0 952 B
master ExecuteAsync net472 1.72μs 0.559ns 2.17ns 0.145 0 0 915 B
#5854 ExecuteAsync net6.0 1.36μs 0.561ns 2.17ns 0.0136 0 0 952 B
#5854 ExecuteAsync netcoreapp3.1 1.66μs 0.727ns 2.72ns 0.0125 0 0 952 B
#5854 ExecuteAsync net472 1.78μs 1.17ns 4.21ns 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.2μs 1.91ns 6.88ns 0.0318 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.09μs 3.22ns 12ns 0.0357 0 0 2.76 KB
master SendAsync net472 7.71μs 2.19ns 8.48ns 0.496 0 0 3.15 KB
#5854 SendAsync net6.0 4.17μs 2.24ns 8.66ns 0.0318 0 0 2.22 KB
#5854 SendAsync netcoreapp3.1 5.37μs 4.17ns 16.2ns 0.0378 0 0 2.76 KB
#5854 SendAsync net472 7.67μs 1.7ns 6.36ns 0.499 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.58μs 0.703ns 2.72ns 0.0227 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.09μs 0.662ns 2.39ns 0.0215 0 0 1.64 KB
master EnrichedLog net472 2.69μs 1.28ns 4.95ns 0.249 0 0 1.57 KB
#5854 EnrichedLog net6.0 1.45μs 0.579ns 2.09ns 0.0228 0 0 1.64 KB
#5854 EnrichedLog netcoreapp3.1 2.16μs 0.738ns 2.66ns 0.0226 0 0 1.64 KB
#5854 EnrichedLog net472 2.7μs 1.34ns 5.01ns 0.25 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 203ns 786ns 0.0565 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 119μs 314ns 1.22μs 0.0592 0 0 4.28 KB
master EnrichedLog net472 147μs 134ns 518ns 0.663 0.221 0 4.46 KB
#5854 EnrichedLog net6.0 113μs 139ns 539ns 0.0566 0 0 4.28 KB
#5854 EnrichedLog netcoreapp3.1 118μs 172ns 666ns 0.0596 0 0 4.28 KB
#5854 EnrichedLog net472 148μs 176ns 682ns 0.662 0.221 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.11μs 0.98ns 3.67ns 0.0311 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.24μs 1.39ns 5.2ns 0.0298 0 0 2.2 KB
master EnrichedLog net472 4.69μs 0.957ns 3.71ns 0.321 0 0 2.02 KB
#5854 EnrichedLog net6.0 3.17μs 1.05ns 4.07ns 0.0301 0 0 2.2 KB
#5854 EnrichedLog netcoreapp3.1 4.01μs 1.35ns 5.04ns 0.0279 0 0 2.2 KB
#5854 EnrichedLog net472 4.68μs 1.59ns 6.18ns 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.43μs 0.74ns 2.77ns 0.0163 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.7μs 0.647ns 2.51ns 0.0152 0 0 1.14 KB
master SendReceive net472 2.06μs 1.18ns 4.55ns 0.183 0.00103 0 1.16 KB
#5854 SendReceive net6.0 1.45μs 1.01ns 3.63ns 0.0159 0 0 1.14 KB
#5854 SendReceive netcoreapp3.1 1.71μs 0.669ns 2.59ns 0.0154 0 0 1.14 KB
#5854 SendReceive net472 2.15μs 0.971ns 3.76ns 0.184 0.00107 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.73μs 0.984ns 3.68ns 0.0218 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.86μs 1.92ns 7.17ns 0.0213 0 0 1.65 KB
master EnrichedLog net472 4.47μs 5.13ns 19.9ns 0.322 0 0 2.04 KB
#5854 EnrichedLog net6.0 2.67μs 1.23ns 4.75ns 0.0226 0 0 1.6 KB
#5854 EnrichedLog netcoreapp3.1 3.98μs 3.74ns 14.5ns 0.0219 0 0 1.65 KB
#5854 EnrichedLog net472 4.35μs 2.57ns 9.96ns 0.323 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #5854

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.152 403.11 464.44

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 403ns 0.137ns 0.511ns 0.0081 0 0 576 B
master StartFinishSpan netcoreapp3.1 610ns 1.01ns 3.89ns 0.00766 0 0 576 B
master StartFinishSpan net472 664ns 0.661ns 2.56ns 0.0917 0 0 578 B
master StartFinishScope net6.0 496ns 0.0885ns 0.331ns 0.00973 0 0 696 B
master StartFinishScope netcoreapp3.1 755ns 0.391ns 1.51ns 0.00946 0 0 696 B
master StartFinishScope net472 902ns 1.23ns 4.75ns 0.104 0 0 658 B
#5854 StartFinishSpan net6.0 464ns 0.414ns 1.6ns 0.008 0 0 576 B
#5854 StartFinishSpan netcoreapp3.1 624ns 0.452ns 1.75ns 0.00783 0 0 576 B
#5854 StartFinishSpan net472 640ns 0.65ns 2.52ns 0.0917 0 0 578 B
#5854 StartFinishScope net6.0 488ns 0.973ns 3.77ns 0.00965 0 0 696 B
#5854 StartFinishScope netcoreapp3.1 741ns 0.521ns 2.02ns 0.00927 0 0 696 B
#5854 StartFinishScope net472 932ns 1.2ns 4.65ns 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 665ns 0.496ns 1.92ns 0.0097 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 994ns 0.912ns 3.53ns 0.00949 0 0 696 B
master RunOnMethodBegin net472 1.1μs 0.315ns 1.22ns 0.105 0 0 658 B
#5854 RunOnMethodBegin net6.0 634ns 0.794ns 2.97ns 0.00989 0 0 696 B
#5854 RunOnMethodBegin netcoreapp3.1 999ns 0.522ns 1.88ns 0.00951 0 0 696 B
#5854 RunOnMethodBegin net472 1.09μs 0.716ns 2.68ns 0.104 0 0 658 B

@daniel-romano-DD daniel-romano-DD merged commit ff51ea9 into master Aug 7, 2024
70 of 72 checks passed
@daniel-romano-DD daniel-romano-DD deleted the dani/iast/better_il_dumps branch August 7, 2024 15:36
@github-actions github-actions bot added this to the vNext-v3 milestone Aug 7, 2024
daniel-romano-DD added a commit that referenced this pull request Aug 7, 2024
## 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. -->
daniel-romano-DD added a commit that referenced this pull request Aug 8, 2024
…v2) (#5860)

## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:asm-iast area:native-library Automatic instrumentation native C++ code (Datadog.Trace.ClrProfiler.Native)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants