Skip to content

Conversation

@gyuheon0h
Copy link
Contributor

@gyuheon0h gyuheon0h commented Jan 4, 2026

What does this PR do?

This PR adds a runtime_preload_logger bin test that runs the collector under an LD_PRELOAD interposer to capture dangerous calls into a per-test log.

Details:

  1. The harness re-execs once with LD_PRELOAD when absent because the loader only honors the preload at exec time; this guarantees the collector starts with the interposer.
  2. The preload itself gates logging with a flag set during collector child init so only the collector emits logs and the receiver (or any other part of the program that is not the signal handler) stays silent.
  3. Currently, this test is ignored in CI and only ran manually, but this should become a part of the automatic flow

This is the first step in validating uses of unsafe operations. The next steps in following PRs are

  1. Having this test run automatically in CI
  2. Having a workflow that detects regressions

Motivation

We want to validate all uses of non-signal-safe functions in the handler.

Additional Notes

Another design choice here will be to abort on the first call of an unsafe function and print the stacktrace.

How to test the change?

Log output when I added this code that allocates in some part of the collector emitter

let mut test = Vec::new();
test.push(format!("pid: {}", ppid));
test.push(format!("config: {}", config_str));
test.push(format!("metadata: {}", metadata_string));
[DEBUG] Collector logger initialized pid=2284999, fd=6, path=/tmp/preload_logger.log
[DEBUG] Marked as collector, pid=2284999, fd=6
pid=2284999 tid=2284999 malloc size=10 ptr=0x55d516d72fd0
pid=2284999 tid=2284999 realloc size=20 ptr=0x55d516d72fd0
pid=2284999 tid=2284999 malloc size=96 ptr=0x55d516d7ad00
pid=2284999 tid=2284999 malloc size=16 ptr=0x55d516d7a600
pid=2284999 tid=2284999 realloc size=373 ptr=0x55d516d7ad70
pid=2284999 tid=2284999 malloc size=20 ptr=0x55d516d7a600
pid=2284999 tid=2284999 realloc size=163 ptr=0x55d516d7aef0
pid=2284999 tid=2284999 free ptr=0x55d516d72fd0
pid=2284999 tid=2284999 free ptr=0x55d516d7ad70
pid=2284999 tid=2284999 free ptr=0x55d516d7aef0
pid=2284999 tid=2284999 free ptr=0x55d516d7ad00

Log output of the current collector (no in process symbolication, no runtime stacks collection); there are no logs because we don't do anything dangerous right now 🎉

[DEBUG] Collector logger initialized pid=2292044, fd=6, path=/tmp/preload_logger.log
[DEBUG] Marked as collector, pid=2292044, fd=6

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@gyuheon0h gyuheon0h changed the title First pass, need to isolate only collector from test harness [crashtracking] Add minimal LD preload test for crashtracker collector Jan 4, 2026
@codecov-commenter
Copy link

codecov-commenter commented Jan 4, 2026

Codecov Report

❌ Patch coverage is 9.67742% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.27%. Comparing base (76445a8) to head (775e692).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1428      +/-   ##
==========================================
- Coverage   71.32%   71.27%   -0.05%     
==========================================
  Files         413      413              
  Lines       66148    66182      +34     
==========================================
- Hits        47180    47173       -7     
- Misses      18968    19009      +41     
Components Coverage Δ
libdd-crashtracker 58.57% <0.00%> (-0.09%) ⬇️
libdd-crashtracker-ffi 14.37% <ø> (ø)
libdd-alloc 98.73% <ø> (ø)
libdd-data-pipeline 86.04% <ø> (-0.14%) ⬇️
libdd-data-pipeline-ffi 77.01% <ø> (ø)
libdd-common 81.11% <ø> (ø)
libdd-common-ffi 74.19% <ø> (ø)
libdd-telemetry 59.92% <ø> (-0.04%) ⬇️
libdd-telemetry-ffi 21.17% <ø> (ø)
libdd-dogstatsd-client 83.75% <ø> (ø)
datadog-ipc 82.71% <ø> (+0.10%) ⬆️
libdd-profiling 81.06% <ø> (ø)
libdd-profiling-ffi 62.43% <ø> (ø)
datadog-sidecar 35.99% <ø> (ø)
datdog-sidecar-ffi 11.46% <ø> (ø)
spawn-worker 55.18% <ø> (ø)
libdd-tinybytes 92.44% <ø> (ø)
libdd-trace-normalization 82.33% <ø> (ø)
libdd-trace-obfuscation 94.17% <ø> (ø)
libdd-trace-protobuf 61.18% <ø> (ø)
libdd-trace-utils 89.74% <ø> (ø)
datadog-tracer-flare 61.06% <ø> (ø)
libdd-log 75.57% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pr-commenter
Copy link

pr-commenter bot commented Jan 4, 2026

Benchmarks

Comparison

Benchmark execution time: 2026-01-12 22:03:57

Comparing candidate commit 775e692 in PR branch gyuheon0h/prof-13289-ld-preload_ with baseline commit 158b594 in branch main.

Found 1 performance improvements and 0 performance regressions! Performance is the same for 56 metrics, 2 unstable metrics.

scenario:profile_add_sample2_frames_x1000

  • 🟩 execution_time [-30.885µs; -30.709µs] or [-5.542%; -5.510%]

Candidate

Candidate benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
concentrator/add_spans_to_concentrator execution_time 10.563ms 10.592ms ± 0.015ms 10.589ms ± 0.008ms 10.599ms 10.613ms 10.631ms 10.680ms 0.86% 1.801 7.375 0.14% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
concentrator/add_spans_to_concentrator execution_time [10.590ms; 10.594ms] or [-0.019%; +0.019%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_trace/test_trace execution_time 242.506ns 254.403ns ± 14.235ns 248.265ns ± 4.155ns 259.518ns 286.397ns 296.202ns 300.439ns 21.02% 1.560 1.347 5.58% 1.007ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_trace/test_trace execution_time [252.430ns; 256.376ns] or [-0.775%; +0.775%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample_frames_x1000 execution_time 4.017ms 4.026ms ± 0.006ms 4.025ms ± 0.002ms 4.027ms 4.031ms 4.033ms 4.102ms 1.89% 9.413 113.257 0.15% 0.000ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample_frames_x1000 execution_time [4.025ms; 4.027ms] or [-0.021%; +0.021%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
single_flag_killswitch/rules-based execution_time 187.646ns 190.846ns ± 2.025ns 190.742ns ± 1.535ns 192.185ns 194.656ns 196.813ns 197.565ns 3.58% 0.676 0.075 1.06% 0.143ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
single_flag_killswitch/rules-based execution_time [190.566ns; 191.127ns] or [-0.147%; +0.147%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sdk_test_data/rules-based execution_time 143.934µs 146.104µs ± 1.647µs 145.795µs ± 0.554µs 146.409µs 147.795µs 153.147µs 161.037µs 10.45% 5.120 37.358 1.12% 0.116µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sdk_test_data/rules-based execution_time [145.876µs; 146.332µs] or [-0.156%; +0.156%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sql/obfuscate_sql_string execution_time 90.236µs 90.501µs ± 0.185µs 90.473µs ± 0.070µs 90.547µs 90.693µs 91.109µs 92.308µs 2.03% 5.774 48.784 0.20% 0.013µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sql/obfuscate_sql_string execution_time [90.476µs; 90.527µs] or [-0.028%; +0.028%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching deserializing traces from msgpack to their internal representation execution_time 59.695ms 60.105ms ± 2.126ms 59.841ms ± 0.057ms 59.907ms 59.993ms 67.113ms 81.647ms 36.44% 9.007 82.748 3.53% 0.150ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching deserializing traces from msgpack to their internal representation execution_time [59.810ms; 60.400ms] or [-0.490%; +0.490%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
credit_card/is_card_number/ execution_time 3.893µs 3.912µs ± 0.003µs 3.912µs ± 0.002µs 3.913µs 3.916µs 3.918µs 3.918µs 0.15% -1.466 9.763 0.07% 0.000µs 1 200
credit_card/is_card_number/ throughput 255233840.913op/s 255639944.869op/s ± 178593.882op/s 255626724.638op/s ± 107497.963op/s 255759892.573op/s 255870248.419op/s 255975825.728op/s 256869036.673op/s 0.49% 1.486 9.919 0.07% 12628.495op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 78.927µs 80.161µs ± 0.580µs 80.101µs ± 0.412µs 80.540µs 81.196µs 81.605µs 81.792µs 2.11% 0.279 -0.238 0.72% 0.041µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12226127.410op/s 12475569.897op/s ± 90102.246op/s 12484185.767op/s ± 64374.299op/s 12545582.830op/s 12612822.785op/s 12652087.787op/s 12669863.594op/s 1.49% -0.242 -0.274 0.72% 6371.191op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 74.555µs 74.894µs ± 0.126µs 74.892µs ± 0.069µs 74.955µs 75.097µs 75.227µs 75.515µs 0.83% 0.649 3.060 0.17% 0.009µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 13242330.196op/s 13352271.971op/s ± 22402.993op/s 13352629.544op/s ± 12285.466op/s 13366470.543op/s 13390882.618op/s 13403189.491op/s 13412952.889op/s 0.45% -0.626 2.986 0.17% 1584.131op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.893µs 3.912µs ± 0.003µs 3.912µs ± 0.002µs 3.914µs 3.917µs 3.918µs 3.919µs 0.18% -1.274 7.502 0.08% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 255145619.598op/s 255601144.854op/s ± 197634.331op/s 255609846.412op/s ± 132359.597op/s 255719639.293op/s 255885761.550op/s 255991575.174op/s 256889114.020op/s 0.50% 1.292 7.636 0.08% 13974.858op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 71.591µs 72.053µs ± 0.166µs 72.042µs ± 0.101µs 72.150µs 72.316µs 72.530µs 72.723µs 0.94% 0.570 1.340 0.23% 0.012µs 1 200
credit_card/is_card_number/378282246310005 throughput 13750858.192op/s 13878668.129op/s ± 31941.524op/s 13880752.948op/s ± 19522.539op/s 13897471.356op/s 13929122.386op/s 13942539.201op/s 13968323.260op/s 0.63% -0.550 1.297 0.23% 2258.607op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 52.116µs 52.194µs ± 0.030µs 52.195µs ± 0.020µs 52.213µs 52.246µs 52.276µs 52.286µs 0.17% 0.334 0.192 0.06% 0.002µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 19125654.755op/s 19159142.372op/s ± 11028.737op/s 19158957.681op/s ± 7472.318op/s 19168015.770op/s 19175249.356op/s 19180229.921op/s 19188072.694op/s 0.15% -0.330 0.187 0.06% 779.849op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 5.762µs 5.910µs ± 0.049µs 5.910µs ± 0.026µs 5.939µs 5.993µs 6.005µs 6.034µs 2.09% -0.303 0.358 0.82% 0.003µs 1 200
credit_card/is_card_number/x371413321323331 throughput 165728046.834op/s 169202629.967op/s ± 1398252.930op/s 169194762.859op/s ± 750766.595op/s 169907598.066op/s 171528733.823op/s 173023846.363op/s 173538931.353op/s 2.57% 0.359 0.430 0.82% 98871.413op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.889µs 3.911µs ± 0.003µs 3.911µs ± 0.001µs 3.913µs 3.915µs 3.918µs 3.919µs 0.20% -2.103 18.644 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 255180427.132op/s 255678673.714op/s ± 186917.098op/s 255678701.976op/s ± 94337.388op/s 255772198.098op/s 255916629.589op/s 255953408.269op/s 257166388.464op/s 0.58% 2.139 18.962 0.07% 13217.035op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 64.063µs 64.278µs ± 0.097µs 64.262µs ± 0.042µs 64.310µs 64.425µs 64.687µs 64.882µs 0.96% 2.575 10.929 0.15% 0.007µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15412671.310op/s 15557360.981op/s ± 23448.440op/s 15561295.169op/s ± 10265.097op/s 15569823.736op/s 15582194.850op/s 15587201.488op/s 15609603.028op/s 0.31% -2.547 10.734 0.15% 1658.055op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 57.359µs 57.508µs ± 0.098µs 57.491µs ± 0.058µs 57.553µs 57.709µs 57.826µs 57.850µs 0.63% 1.212 1.383 0.17% 0.007µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 17285988.534op/s 17389020.231op/s ± 29433.430op/s 17394091.230op/s ± 17449.907op/s 17410834.327op/s 17422718.964op/s 17428183.737op/s 17434010.267op/s 0.23% -1.202 1.352 0.17% 2081.258op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.894µs 3.912µs ± 0.003µs 3.912µs ± 0.002µs 3.913µs 3.917µs 3.919µs 3.921µs 0.23% -0.769 8.768 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 255029934.350op/s 255619226.473op/s ± 183728.739op/s 255622226.940op/s ± 98192.784op/s 255731531.714op/s 255857781.098op/s 255899842.476op/s 256827188.849op/s 0.47% 0.791 8.902 0.07% 12991.584op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 54.579µs 54.797µs ± 0.162µs 54.745µs ± 0.079µs 54.859µs 55.118µs 55.434µs 55.515µs 1.41% 1.710 3.656 0.29% 0.011µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 18013222.296op/s 18249325.972op/s ± 53577.308op/s 18266420.840op/s ± 26250.890op/s 18283930.257op/s 18308715.869op/s 18317406.045op/s 18322167.991op/s 0.31% -1.686 3.538 0.29% 3788.488op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 52.131µs 52.198µs ± 0.032µs 52.201µs ± 0.022µs 52.218µs 52.251µs 52.263µs 52.283µs 0.16% 0.095 -0.512 0.06% 0.002µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 19126776.960op/s 19157657.235op/s ± 11807.576op/s 19156714.446op/s ± 8249.241op/s 19166350.597op/s 19177455.942op/s 19181807.782op/s 19182369.484op/s 0.13% -0.093 -0.513 0.06% 834.922op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 5.770µs 5.909µs ± 0.050µs 5.903µs ± 0.032µs 5.934µs 5.999µs 6.010µs 6.025µs 2.08% 0.004 -0.320 0.85% 0.004µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 165965547.240op/s 169249036.052op/s ± 1445688.443op/s 169418448.648op/s ± 909785.524op/s 170311963.261op/s 171573152.860op/s 172666878.171op/s 173311538.963op/s 2.30% 0.039 -0.296 0.85% 102225.610op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
credit_card/is_card_number/ execution_time [3.911µs; 3.912µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ throughput [255615193.475op/s; 255664696.263op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [80.080µs; 80.241µs] or [-0.100%; +0.100%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12463082.592op/s; 12488057.202op/s] or [-0.100%; +0.100%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [74.876µs; 74.911µs] or [-0.023%; +0.023%] None None None
credit_card/is_card_number/ 378282246310005 throughput [13349167.132op/s; 13355376.810op/s] or [-0.023%; +0.023%] None None None
credit_card/is_card_number/37828224631 execution_time [3.912µs; 3.913µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/37828224631 throughput [255573754.637op/s; 255628535.072op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/378282246310005 execution_time [72.030µs; 72.076µs] or [-0.032%; +0.032%] None None None
credit_card/is_card_number/378282246310005 throughput [13874241.341op/s; 13883094.917op/s] or [-0.032%; +0.032%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [52.190µs; 52.199µs] or [-0.008%; +0.008%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [19157613.895op/s; 19160670.848op/s] or [-0.008%; +0.008%] None None None
credit_card/is_card_number/x371413321323331 execution_time [5.904µs; 5.917µs] or [-0.114%; +0.114%] None None None
credit_card/is_card_number/x371413321323331 throughput [169008845.559op/s; 169396414.376op/s] or [-0.115%; +0.115%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.911µs; 3.912µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ throughput [255652768.802op/s; 255704578.626op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [64.265µs; 64.292µs] or [-0.021%; +0.021%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15554111.253op/s; 15560610.709op/s] or [-0.021%; +0.021%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [57.494µs; 57.521µs] or [-0.024%; +0.024%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [17384941.041op/s; 17393099.421op/s] or [-0.023%; +0.023%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.912µs; 3.912µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255593763.437op/s; 255644689.509op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [54.775µs; 54.819µs] or [-0.041%; +0.041%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [18241900.673op/s; 18256751.272op/s] or [-0.041%; +0.041%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [52.194µs; 52.203µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [19156020.819op/s; 19159293.651op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [5.902µs; 5.916µs] or [-0.118%; +0.118%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [169048677.538op/s; 169449394.567op/s] or [-0.118%; +0.118%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
redis/obfuscate_redis_string execution_time 33.364µs 34.156µs ± 1.522µs 33.458µs ± 0.043µs 33.527µs 37.403µs 37.541µs 39.089µs 16.83% 1.731 1.095 4.44% 0.108µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
redis/obfuscate_redis_string execution_time [33.945µs; 34.367µs] or [-0.617%; +0.617%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time 495.223µs 496.171µs ± 0.624µs 496.123µs ± 0.278µs 496.436µs 496.745µs 497.200µs 502.977µs 1.38% 6.519 68.915 0.13% 0.044µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1988160.724op/s 2015438.118op/s ± 2514.655op/s 2015628.963op/s ± 1130.573op/s 2016708.994op/s 2018122.573op/s 2019086.485op/s 2019291.186op/s 0.18% -6.413 67.394 0.12% 177.813op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 371.134µs 371.901µs ± 0.324µs 371.890µs ± 0.212µs 372.114µs 372.431µs 372.682µs 373.268µs 0.37% 0.438 0.970 0.09% 0.023µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2679039.949op/s 2688887.448op/s ± 2341.555op/s 2688965.596op/s ± 1532.709op/s 2690436.085op/s 2692657.256op/s 2693745.780op/s 2694448.066op/s 0.20% -0.431 0.952 0.09% 165.573op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 169.418µs 169.928µs ± 0.157µs 169.921µs ± 0.102µs 170.037µs 170.194µs 170.286µs 170.338µs 0.25% 0.046 0.228 0.09% 0.011µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5870669.426op/s 5884865.558op/s ± 5421.505op/s 5885083.750op/s ± 3535.996op/s 5888295.207op/s 5893799.328op/s 5896865.497op/s 5902561.341op/s 0.30% -0.040 0.231 0.09% 383.358op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 37.266µs 37.382µs ± 0.050µs 37.376µs ± 0.033µs 37.412µs 37.465µs 37.495µs 37.592µs 0.58% 0.516 0.894 0.13% 0.004µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 26601516.061op/s 26751200.529op/s ± 35705.871op/s 26754950.445op/s ± 23277.034op/s 26773087.255op/s 26804311.304op/s 26825932.348op/s 26834124.615op/s 0.30% -0.505 0.868 0.13% 2524.786op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 46.168µs 46.309µs ± 0.079µs 46.301µs ± 0.046µs 46.349µs 46.415µs 46.489µs 46.913µs 1.32% 2.520 16.078 0.17% 0.006µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 21316136.178op/s 21594097.638op/s ± 36571.231op/s 21597911.003op/s ± 21665.812op/s 21618818.275op/s 21639492.428op/s 21654843.689op/s 21660039.393op/s 0.29% -2.461 15.508 0.17% 2585.977op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time [496.084µs; 496.257µs] or [-0.017%; +0.017%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [2015089.611op/s; 2015786.625op/s] or [-0.017%; +0.017%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [371.856µs; 371.946µs] or [-0.012%; +0.012%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2688562.931op/s; 2689211.965op/s] or [-0.012%; +0.012%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [169.906µs; 169.949µs] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5884114.190op/s; 5885616.926op/s] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [37.375µs; 37.388µs] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [26746252.039op/s; 26756149.019op/s] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [46.298µs; 46.320µs] or [-0.024%; +0.024%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [21589029.217op/s; 21599166.059op/s] or [-0.023%; +0.023%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching string interning on wordpress profile execution_time 160.859µs 161.637µs ± 0.288µs 161.581µs ± 0.144µs 161.768µs 162.060µs 162.617µs 162.956µs 0.85% 1.211 3.817 0.18% 0.020µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching string interning on wordpress profile execution_time [161.597µs; 161.677µs] or [-0.025%; +0.025%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
ip_address/quantize_peer_ip_address_benchmark execution_time 4.957µs 5.018µs ± 0.036µs 5.009µs ± 0.026µs 5.041µs 5.075µs 5.078µs 5.080µs 1.41% 0.326 -1.310 0.72% 0.003µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
ip_address/quantize_peer_ip_address_benchmark execution_time [5.013µs; 5.023µs] or [-0.100%; +0.100%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
two way interface execution_time 17.970µs 26.102µs ± 9.817µs 18.190µs ± 0.174µs 34.528µs 44.554µs 45.391µs 67.309µs 270.02% 0.891 0.200 37.52% 0.694µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [24.742µs; 27.463µs] or [-5.212%; +5.212%] None None None

Group 14

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
tags/replace_trace_tags execution_time 2.354µs 2.416µs ± 0.017µs 2.420µs ± 0.006µs 2.424µs 2.441µs 2.451µs 2.458µs 1.57% -1.642 4.283 0.71% 0.001µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
tags/replace_trace_tags execution_time [2.414µs; 2.419µs] or [-0.099%; +0.099%] None None None

Group 15

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time 186.480µs 187.376µs ± 0.738µs 187.006µs ± 0.284µs 188.002µs 188.760µs 189.384µs 189.565µs 1.37% 0.980 0.033 0.39% 0.052µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 5275222.885op/s 5336958.374op/s ± 20940.269op/s 5347427.017op/s ± 8131.169op/s 5353266.937op/s 5357215.299op/s 5361766.912op/s 5362506.800op/s 0.28% -0.968 -0.008 0.39% 1480.701op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 17.593µs 17.817µs ± 0.089µs 17.841µs ± 0.038µs 17.877µs 17.915µs 17.992µs 18.103µs 1.47% -0.597 0.056 0.50% 0.006µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 55239745.136op/s 56128622.293op/s ± 280425.213op/s 56050511.419op/s ± 119931.093op/s 56287789.846op/s 56657922.495op/s 56741346.455op/s 56841874.979op/s 1.41% 0.622 0.037 0.50% 19829.057op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.034µs 10.136µs ± 0.044µs 10.133µs ± 0.038µs 10.175µs 10.203µs 10.219µs 10.267µs 1.32% 0.070 -0.787 0.43% 0.003µs 1 200
normalization/normalize_name/normalize_name/good throughput 97401016.217op/s 98656472.089op/s ± 427446.610op/s 98684284.558op/s ± 367779.688op/s 98992823.301op/s 99328472.188op/s 99439849.303op/s 99657389.973op/s 0.99% -0.054 -0.797 0.43% 30225.040op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time [187.273µs; 187.478µs] or [-0.055%; +0.055%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [5334056.255op/s; 5339860.494op/s] or [-0.054%; +0.054%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [17.804µs; 17.829µs] or [-0.069%; +0.069%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [56089758.056op/s; 56167486.531op/s] or [-0.069%; +0.069%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.130µs; 10.142µs] or [-0.060%; +0.060%] None None None
normalization/normalize_name/normalize_name/good throughput [98597232.100op/s; 98715712.078op/s] or [-0.060%; +0.060%] None None None

Group 16

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
write only interface execution_time 1.183µs 3.253µs ± 1.443µs 3.008µs ± 0.033µs 3.040µs 3.682µs 14.210µs 14.826µs 392.87% 7.207 53.633 44.26% 0.102µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [3.053µs; 3.453µs] or [-6.149%; +6.149%] None None None

Group 17

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample2_frames_x1000 execution_time 525.733µs 526.492µs ± 0.422µs 526.409µs ± 0.194µs 526.676µs 527.013µs 527.325µs 530.534µs 0.78% 4.566 40.445 0.08% 0.030µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample2_frames_x1000 execution_time [526.434µs; 526.551µs] or [-0.011%; +0.011%] None None None

Group 18

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
receiver_entry_point/report/2597 execution_time 9.689ms 9.879ms ± 0.051ms 9.875ms ± 0.032ms 9.909ms 9.962ms 10.051ms 10.063ms 1.90% 0.421 1.947 0.51% 0.004ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
receiver_entry_point/report/2597 execution_time [9.872ms; 9.886ms] or [-0.071%; +0.071%] None None None

Group 19

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 775e692 1768254464 gyuheon0h/prof-13289-ld-preload_
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching serializing traces from their internal representation to msgpack execution_time 14.741ms 14.798ms ± 0.031ms 14.795ms ± 0.015ms 14.810ms 14.842ms 14.913ms 14.972ms 1.19% 1.947 6.850 0.21% 0.002ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching serializing traces from their internal representation to msgpack execution_time [14.794ms; 14.803ms] or [-0.029%; +0.029%] None None None

Baseline

Omitted due to size.

@dd-octo-sts
Copy link

dd-octo-sts bot commented Jan 4, 2026

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.57 MB 7.57 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 87.79 MB 87.80 MB +0% (+8.00 KB) 👌
aarch64-apple-darwin
Artifact Baseline Commit Change
/aarch64-apple-darwin/lib/libdatadog_profiling.a 59.43 MB 59.44 MB +0% (+4.71 KB) 👌
/aarch64-apple-darwin/lib/libdatadog_profiling.dylib 8.58 MB 8.58 MB +0% (+16 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 9.71 MB 9.71 MB +0% (+216 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 101.51 MB 101.52 MB +0% (+10.19 KB) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 20.43 MB 20.43 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 73.49 KB 73.49 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 151.27 MB 151.27 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 817.72 MB 817.72 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 6.51 MB 6.51 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 73.49 KB 73.49 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 20.14 MB 20.14 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 39.51 MB 39.51 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 17.43 MB 17.43 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 74.62 KB 74.62 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 154.15 MB 154.15 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 805.51 MB 805.51 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 5.01 MB 5.01 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 74.62 KB 74.62 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 21.46 MB 21.46 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 37.29 MB 37.29 MB 0% (0 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 76.06 MB 76.06 MB +0% (+6.91 KB) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 9.00 MB 9.00 MB +.04% (+4.00 KB) 🔍
x86_64-apple-darwin
Artifact Baseline Commit Change
/x86_64-apple-darwin/lib/libdatadog_profiling.a 60.76 MB 60.76 MB +0% (+4.60 KB) 👌
/x86_64-apple-darwin/lib/libdatadog_profiling.dylib 9.63 MB 9.63 MB +0% (+8 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 95.61 MB 95.62 MB +0% (+8.00 KB) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.45 MB 10.45 MB 0% (0 B) 👌

@gyuheon0h gyuheon0h force-pushed the gyuheon0h/prof-13289-ld-preload_ branch from c9a32e0 to 5d2087f Compare January 6, 2026 15:46
}

void *ptr = real_malloc(size);
log_line("malloc", size, ptr);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should there be a global atomic that controls whether to log, enabled when the signal handler is active disabled otherwise?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Something similar with static __thread int dd_is_collector = 0; on line 26. This gets called on collector init

@gyuheon0h gyuheon0h changed the title [crashtracking] Add minimal LD preload test for crashtracker collector [WIP][crashtracking] Add minimal LD preload test for crashtracker collector Jan 6, 2026
@gyuheon0h gyuheon0h force-pushed the gyuheon0h/prof-13289-ld-preload_ branch from e2ed49c to 677bb4f Compare January 12, 2026 02:34
@gyuheon0h gyuheon0h changed the title [WIP][crashtracking] Add minimal LD preload test for crashtracker collector [crashtracking] Add minimal LD preload test for crashtracker collector Jan 12, 2026
@gyuheon0h gyuheon0h changed the title [crashtracking] Add minimal LD preload test for crashtracker collector tests(crashtrackinh): add minimal LD preload test for crashtracker collector Jan 12, 2026
@gyuheon0h gyuheon0h changed the title tests(crashtrackinh): add minimal LD preload test for crashtracker collector tests(crashtracking): add minimal LD preload test for crashtracker collector Jan 12, 2026
@gyuheon0h gyuheon0h changed the title tests(crashtracking): add minimal LD preload test for crashtracker collector test(crashtracking): add minimal LD preload test for crashtracker collector Jan 12, 2026
@gyuheon0h gyuheon0h changed the title test(crashtracking): add minimal LD preload test for crashtracker collector [WIP] test(crashtracking): add minimal LD preload test for crashtracker collector Jan 12, 2026
@gyuheon0h gyuheon0h changed the title [WIP] test(crashtracking): add minimal LD preload test for crashtracker collector test(crashtracking): add minimal LD preload test for crashtracker collector Jan 12, 2026
@gyuheon0h gyuheon0h marked this pull request as ready for review January 12, 2026 21:26
@gyuheon0h gyuheon0h requested a review from a team as a code owner January 12, 2026 21:26
@gyuheon0h gyuheon0h requested review from a team as code owners January 12, 2026 21:26
@gyuheon0h gyuheon0h requested a review from gleocadie January 12, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants