Skip to content

Add a outer startup hook catch block#6068

Merged
kevingosse merged 5 commits into
masterfrom
kevin/outer_catch_block
Sep 27, 2024
Merged

Add a outer startup hook catch block#6068
kevingosse merged 5 commits into
masterfrom
kevin/outer_catch_block

Conversation

@kevingosse

Copy link
Copy Markdown
Contributor

Summary of changes

Before, the __DDVoidMethodCall__ method loaded the loader and had a try/catch block.

Now __DDVoidMethodCall__ still has a try/catch block, but it calls __DDInvokeLoader__ which loads the loader.

Reason for change

When running in a trimmed app, the JIT compilation of __DDVoidMethodCall__ would throw an exception. Moving the logic to an inner method allows this exception to be caught.

Implementation details

Just added a method and moved the catch block.

Test coverage

Running yuniql crashes without this change.

@kevingosse
kevingosse requested a review from a team as a code owner September 24, 2024 09:04

@andrewlock andrewlock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like a lot of copy/cut/paste to me 🙈 :blindfold: I assume you've tested this does solve the trimming issue in practice.

Comment thread tracer/src/Datadog.Tracer.Native/cor_profiler.cpp Outdated
@datadog-ddstaging

datadog-ddstaging Bot commented Sep 24, 2024

Copy link
Copy Markdown

Datadog Report

Branch report: kevin/outer_catch_block
Commit report: ca8a094
Test service: dd-trace-dotnet

✅ 0 Failed, 373165 Passed, 2725 Skipped, 26h 17m 4.03s Total Time
⌛ 1 Performance Regression

⌛ Performance Regressions vs Default Branch (1)

  • CallTarget+Inlining+NGEN - Samples.HttpMessageHandler.windows.net462.json.scenarios 1.23s (+32.44ms, +3%) - Details

@andrewlock

andrewlock commented Sep 24, 2024

Copy link
Copy Markdown
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 (6068) - mean (70ms)  : 68, 73
     .   : milestone, 70,
    master - mean (73ms)  : 66, 79
     .   : milestone, 73,

    section CallTarget+Inlining+NGEN
    This PR (6068) - mean (1,108ms)  : 1085, 1131
     .   : milestone, 1108,
    master - mean (1,109ms)  : 1080, 1138
     .   : milestone, 1109,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6068) - mean (110ms)  : 107, 113
     .   : milestone, 110,
    master - mean (109ms)  : 106, 113
     .   : milestone, 109,

    section CallTarget+Inlining+NGEN
    This PR (6068) - mean (775ms)  : 755, 796
     .   : milestone, 775,
    master - mean (777ms)  : 753, 802
     .   : milestone, 777,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6068) - mean (94ms)  : 91, 97
     .   : milestone, 94,
    master - mean (94ms)  : 90, 99
     .   : milestone, 94,

    section CallTarget+Inlining+NGEN
    This PR (6068) - mean (733ms)  : 716, 751
     .   : milestone, 733,
    master - mean (734ms)  : 713, 755
     .   : milestone, 734,

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

    section CallTarget+Inlining+NGEN
    This PR (6068) - mean (1,228ms)  : 1079, 1377
     .   : milestone, 1228,
    master - mean (1,195ms)  : 1171, 1219
     .   : milestone, 1195,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6068) - mean (277ms)  : 272, 282
     .   : milestone, 277,
    master - mean (277ms)  : 273, 281
     .   : milestone, 277,

    section CallTarget+Inlining+NGEN
    This PR (6068) - mean (952ms)  : 846, 1057
     .   : milestone, 952,
    master - mean (936ms)  : 921, 951
     .   : milestone, 936,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6068) - mean (266ms)  : 259, 273
     .   : milestone, 266,
    master - mean (264ms)  : 261, 268
     .   : milestone, 264,

    section CallTarget+Inlining+NGEN
    This PR (6068) - mean (929ms)  : 915, 944
     .   : milestone, 929,
    master - mean (931ms)  : 902, 960
     .   : milestone, 931,

Loading

@andrewlock

andrewlock commented Sep 24, 2024

Copy link
Copy Markdown
Member

Benchmarks Report for tracer 🐌

Benchmarks for #6068 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.141
  • 2 benchmarks are slower, with geometric mean 1.144
  • 1 benchmarks have fewer 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.94μs 45.1ns 309ns 0.0152 0.00759 0 5.43 KB
master StartStopWithChild netcoreapp3.1 9.95μs 55.6ns 377ns 0.0148 0.00492 0 5.62 KB
master StartStopWithChild net472 16.1μs 54.4ns 211ns 1.01 0.281 0.078 6.07 KB
#6068 StartStopWithChild net6.0 7.67μs 42.3ns 328ns 0.0116 0.00386 0 5.43 KB
#6068 StartStopWithChild netcoreapp3.1 9.95μs 51.5ns 247ns 0.0208 0.0104 0 5.62 KB
#6068 StartStopWithChild net472 15.9μs 49.8ns 186ns 1.02 0.309 0.103 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 474μs 266ns 959ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 635μs 240ns 898ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 833μs 425ns 1.59μs 0.417 0 0 3.3 KB
#6068 WriteAndFlushEnrichedTraces net6.0 477μs 102ns 383ns 0 0 0 2.7 KB
#6068 WriteAndFlushEnrichedTraces netcoreapp3.1 638μs 378ns 1.47μs 0 0 0 2.7 KB
#6068 WriteAndFlushEnrichedTraces net472 843μs 336ns 1.21μs 0.417 0 0 3.3 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 199μs 1.16μs 10μs 0.179 0 0 18.45 KB
master SendRequest netcoreapp3.1 221μs 1.25μs 8.87μs 0.209 0 0 20.61 KB
master SendRequest net472 0.00445ns 0.00139ns 0.00538ns 0 0 0 0 b
#6068 SendRequest net6.0 193μs 1.06μs 6.71μs 0.193 0 0 18.45 KB
#6068 SendRequest netcoreapp3.1 217μs 1.26μs 10.7μs 0.205 0 0 20.61 KB
#6068 SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #6068

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 41.69 KB 41.46 KB -227 B -0.54%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 563μs 2.65μs 10.6μs 0.541 0 0 41.69 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 680μs 3.6μs 18μs 0.334 0 0 41.81 KB
master WriteAndFlushEnrichedTraces net472 863μs 4.03μs 16.6μs 8.12 2.44 0.406 53.32 KB
#6068 WriteAndFlushEnrichedTraces net6.0 560μs 2.77μs 11.4μs 0.566 0 0 41.46 KB
#6068 WriteAndFlushEnrichedTraces netcoreapp3.1 678μs 3.59μs 20μs 0.343 0 0 41.72 KB
#6068 WriteAndFlushEnrichedTraces net472 856μs 2.82μs 10.9μs 8.17 2.45 0.408 53.29 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.26μs 1.42ns 5.52ns 0.0144 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.71μs 1.64ns 6.35ns 0.0137 0 0 1.02 KB
master ExecuteNonQuery net472 1.99μs 1.28ns 4.77ns 0.157 0 0 987 B
#6068 ExecuteNonQuery net6.0 1.38μs 1.56ns 6.05ns 0.0138 0 0 1.02 KB
#6068 ExecuteNonQuery netcoreapp3.1 1.68μs 1.02ns 3.82ns 0.0133 0 0 1.02 KB
#6068 ExecuteNonQuery net472 2.15μs 2.48ns 9.61ns 0.156 0 0 987 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.455ns 1.7ns 0.0135 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.53μs 1.35ns 5.06ns 0.0131 0 0 976 B
master CallElasticsearch net472 2.54μs 1.6ns 6.21ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.35μs 1.11ns 4.14ns 0.0135 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.67μs 0.455ns 1.7ns 0.0134 0 0 1.02 KB
master CallElasticsearchAsync net472 2.58μs 1.03ns 3.86ns 0.167 0 0 1.05 KB
#6068 CallElasticsearch net6.0 1.29μs 1.14ns 4.26ns 0.0136 0 0 976 B
#6068 CallElasticsearch netcoreapp3.1 1.5μs 0.628ns 2.35ns 0.0135 0 0 976 B
#6068 CallElasticsearch net472 2.58μs 1.91ns 7.38ns 0.158 0 0 995 B
#6068 CallElasticsearchAsync net6.0 1.28μs 1.18ns 4.41ns 0.0135 0 0 952 B
#6068 CallElasticsearchAsync netcoreapp3.1 1.65μs 0.923ns 3.33ns 0.014 0 0 1.02 KB
#6068 CallElasticsearchAsync net472 2.65μs 1.19ns 4.29ns 0.167 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.26μs 1.1ns 4.13ns 0.0132 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.57μs 1.12ns 4.17ns 0.0126 0 0 952 B
master ExecuteAsync net472 1.8μs 0.482ns 1.8ns 0.145 0 0 915 B
#6068 ExecuteAsync net6.0 1.22μs 0.647ns 2.33ns 0.013 0 0 952 B
#6068 ExecuteAsync netcoreapp3.1 1.68μs 0.936ns 3.62ns 0.0126 0 0 952 B
#6068 ExecuteAsync net472 1.8μs 0.595ns 2.3ns 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.07μs 1.6ns 5.98ns 0.0303 0 0 2.22 KB
master SendAsync netcoreapp3.1 5μs 2.57ns 8.91ns 0.0376 0 0 2.76 KB
master SendAsync net472 7.73μs 3.1ns 12ns 0.499 0 0 3.15 KB
#6068 SendAsync net6.0 4.15μs 1.26ns 4.88ns 0.0311 0 0 2.22 KB
#6068 SendAsync netcoreapp3.1 4.99μs 4.37ns 16.9ns 0.0374 0 0 2.76 KB
#6068 SendAsync net472 7.79μs 2.89ns 11.2ns 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.5μs 0.623ns 2.33ns 0.0233 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.31μs 1.46ns 5.67ns 0.0219 0 0 1.64 KB
master EnrichedLog net472 2.57μs 0.851ns 3.3ns 0.249 0 0 1.57 KB
#6068 EnrichedLog net6.0 1.55μs 0.841ns 3.15ns 0.0231 0 0 1.64 KB
#6068 EnrichedLog netcoreapp3.1 2.31μs 0.984ns 3.68ns 0.0228 0 0 1.64 KB
#6068 EnrichedLog net472 2.47μs 1.22ns 4.55ns 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 112μs 105ns 406ns 0.0557 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 118μs 213ns 824ns 0 0 0 4.28 KB
master EnrichedLog net472 146μs 87.4ns 339ns 0.651 0.217 0 4.46 KB
#6068 EnrichedLog net6.0 112μs 81.2ns 304ns 0.0563 0 0 4.28 KB
#6068 EnrichedLog netcoreapp3.1 118μs 157ns 606ns 0 0 0 4.28 KB
#6068 EnrichedLog net472 146μs 117ns 455ns 0.652 0.217 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.01μs 1.45ns 5.23ns 0.0318 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.15μs 1.92ns 7.45ns 0.0291 0 0 2.2 KB
master EnrichedLog net472 4.78μs 1.44ns 5.18ns 0.32 0 0 2.02 KB
#6068 EnrichedLog net6.0 2.87μs 0.872ns 3.38ns 0.0302 0 0 2.2 KB
#6068 EnrichedLog netcoreapp3.1 4.06μs 1.75ns 6.77ns 0.0304 0 0 2.2 KB
#6068 EnrichedLog net472 4.89μs 2.24ns 8.69ns 0.321 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.38μs 0.512ns 1.98ns 0.0159 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.87μs 1.2ns 4.63ns 0.0149 0 0 1.14 KB
master SendReceive net472 2μs 0.632ns 2.28ns 0.183 0.001 0 1.16 KB
#6068 SendReceive net6.0 1.34μs 0.896ns 3.47ns 0.016 0 0 1.14 KB
#6068 SendReceive netcoreapp3.1 1.71μs 1.05ns 4.07ns 0.0153 0 0 1.14 KB
#6068 SendReceive net472 2.02μs 0.631ns 2.36ns 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.7μs 1.28ns 4.94ns 0.0216 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.9μs 1.74ns 6.76ns 0.0215 0 0 1.65 KB
master EnrichedLog net472 4.3μs 1.83ns 7.08ns 0.322 0 0 2.04 KB
#6068 EnrichedLog net6.0 2.73μs 1.25ns 4.84ns 0.0218 0 0 1.6 KB
#6068 EnrichedLog netcoreapp3.1 3.85μs 2.63ns 10.2ns 0.0215 0 0 1.65 KB
#6068 EnrichedLog net472 4.39μs 14ns 54.3ns 0.324 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6068

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 1.150 660.73 759.86

Faster 🎉 in #6068

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 1.141 620.86 544.35

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 396ns 0.0954ns 0.357ns 0.00808 0 0 576 B
master StartFinishSpan netcoreapp3.1 621ns 0.28ns 1.08ns 0.00782 0 0 576 B
master StartFinishSpan net472 721ns 1.73ns 6.71ns 0.0916 0 0 578 B
master StartFinishScope net6.0 484ns 0.98ns 3.8ns 0.00988 0 0 696 B
master StartFinishScope netcoreapp3.1 661ns 0.302ns 1.17ns 0.00963 0 0 696 B
master StartFinishScope net472 804ns 0.588ns 2.2ns 0.104 0 0 658 B
#6068 StartFinishSpan net6.0 403ns 0.109ns 0.394ns 0.00812 0 0 576 B
#6068 StartFinishSpan netcoreapp3.1 545ns 0.368ns 1.43ns 0.00793 0 0 576 B
#6068 StartFinishSpan net472 695ns 0.471ns 1.82ns 0.0917 0 0 578 B
#6068 StartFinishScope net6.0 469ns 0.186ns 0.722ns 0.00966 0 0 696 B
#6068 StartFinishScope netcoreapp3.1 760ns 0.488ns 1.83ns 0.00921 0 0 696 B
#6068 StartFinishScope net472 804ns 0.561ns 2.17ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6068

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 1.138 582.99 663.19

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 583ns 0.199ns 0.77ns 0.00995 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 899ns 0.898ns 3.11ns 0.00953 0 0 696 B
master RunOnMethodBegin net472 1.05μs 0.634ns 2.29ns 0.104 0 0 658 B
#6068 RunOnMethodBegin net6.0 663ns 0.35ns 1.31ns 0.00998 0 0 696 B
#6068 RunOnMethodBegin netcoreapp3.1 920ns 0.715ns 2.77ns 0.0093 0 0 696 B
#6068 RunOnMethodBegin net472 1.14μs 0.377ns 1.46ns 0.104 0 0 658 B

@andrewlock

andrewlock commented Sep 24, 2024

Copy link
Copy Markdown
Member

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 (6068) (10.996M)   : 0, 10996362
    master (11.035M)   : 0, 11034562
    benchmarks/2.9.0 (11.081M)   : 0, 11080577

    section Automatic
    This PR (6068) (7.427M)   : 0, 7426764
    master (7.387M)   : 0, 7387490
    benchmarks/2.9.0 (7.732M)   : 0, 7732233

    section Trace stats
    master (7.701M)   : 0, 7700614

    section Manual
    master (11.117M)   : 0, 11116841

    section Manual + Automatic
    This PR (6068) (6.806M)   : 0, 6806417
    master (6.911M)   : 0, 6910647

    section DD_TRACE_ENABLED=0
    master (10.175M)   : 0, 10175420

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6068) (9.855M)   : 0, 9854666
    master (9.730M)   : 0, 9729865
    benchmarks/2.9.0 (9.798M)   : 0, 9798067

    section Automatic
    This PR (6068) (6.562M)   : 0, 6561812
    master (6.631M)   : 0, 6630663

    section Trace stats
    master (6.933M)   : 0, 6933274

    section Manual
    master (9.521M)   : 0, 9521067

    section Manual + Automatic
    This PR (6068) (6.188M)   : 0, 6188065
    master (6.107M)   : 0, 6106574

    section DD_TRACE_ENABLED=0
    master (8.776M)   : 0, 8776137

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6068) (9.903M)   : 0, 9902936
    master (10.117M)   : 0, 10116601
    benchmarks/2.9.0 (10.067M)   : 0, 10067315

    section Automatic
    This PR (6068) (6.586M)   : 0, 6586307
    master (6.800M)   : 0, 6800340
    benchmarks/2.9.0 (7.552M)   : 0, 7552193

    section Trace stats
    master (7.219M)   : 0, 7218637

    section Manual
    master (10.214M)   : 0, 10213779

    section Manual + Automatic
    This PR (6068) (6.279M)   : 0, 6279301
    master (6.333M)   : 0, 6332705

    section DD_TRACE_ENABLED=0
    master (9.537M)   : 0, 9537029

Loading

@tonyredondo tonyredondo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, TIL about ELEMENT_TYPE_PINNED

@kevingosse
kevingosse force-pushed the kevin/outer_catch_block branch from 1479167 to ca8a094 Compare September 26, 2024 15:15
@kevingosse
kevingosse merged commit 0ed3eed into master Sep 27, 2024
@kevingosse
kevingosse deleted the kevin/outer_catch_block branch September 27, 2024 10:51
@github-actions github-actions Bot added this to the vNext-v3 milestone Sep 27, 2024
nhulston pushed a commit that referenced this pull request Sep 27, 2024
## Summary of changes

Before, the `__DDVoidMethodCall__` method loaded the loader and had a
try/catch block.

Now `__DDVoidMethodCall__` still has a try/catch block, but it calls
`__DDInvokeLoader__` which loads the loader.

## Reason for change

When running in a trimmed app, the JIT compilation of
`__DDVoidMethodCall__` would throw an exception. Moving the logic to an
inner method allows this exception to be caught.

## Implementation details

Just added a method and moved the catch block.

## Test coverage
Running yuniql crashes without this change.
@andrewlock andrewlock added type:reliability area:native-library Automatic instrumentation native C++ code (Datadog.Trace.ClrProfiler.Native) labels Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:native-library Automatic instrumentation native C++ code (Datadog.Trace.ClrProfiler.Native) identified-by:crashtracking type:reliability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants