Skip to content

feat(profiling): Wrap libunwind in a crate#1510

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 21 commits intomainfrom
gleocadie/wrap-libunwind
Mar 5, 2026
Merged

feat(profiling): Wrap libunwind in a crate#1510
gh-worker-dd-mergequeue-cf854d[bot] merged 21 commits intomainfrom
gleocadie/wrap-libunwind

Conversation

@gleocadie
Copy link
Copy Markdown
Contributor

@gleocadie gleocadie commented Feb 4, 2026

What does this PR do?

Wrap libunwind in libdd-libunwind-sys Rust crate.

Motivation

Crashtracker collects callstacks. When it comes to alpine/musl-libc (mainly on x86_64), we fail at retrieving the callstack passed the signal frame. The problem is that the musl-libc binary does not have the CFIs (unwinding information) and the unwinder does not know how to move forward and stop.

Libunwind provides a way to unwind starting from the ucontext: context (registers and state) of the crashing thread. Going that way, we can collect the callstack as much as possible (until hitting musl-libc)

Additional Notes

Gitlab jobs have been modified in this PR and it's working https://gitlab.ddbuild.io/DataDog/apm-reliability/libddprof-build/-/pipelines/100326074.

@gleocadie gleocadie force-pushed the gleocadie/wrap-libunwind branch 2 times, most recently from 7067a18 to b6f74b9 Compare February 4, 2026 19:35
@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Feb 4, 2026

Benchmarks

Comparison

Benchmark execution time: 2026-03-05 13:40:15

Comparing candidate commit ad90dd5 in PR branch gleocadie/wrap-libunwind with baseline commit 19ae2be in branch main.

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

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 ad90dd5 1772717012 gleocadie/wrap-libunwind
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.335µs 2.398µs ± 0.019µs 2.399µs ± 0.006µs 2.406µs 2.428µs 2.437µs 2.440µs 1.69% -1.156 2.889 0.78% 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.396µs; 2.401µs] or [-0.109%; +0.109%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ad90dd5 1772717012 gleocadie/wrap-libunwind
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 89.989µs 90.247µs ± 0.190µs 90.219µs ± 0.052µs 90.275µs 90.368µs 91.040µs 92.215µs 2.21% 6.915 62.081 0.21% 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.221µs; 90.274µs] or [-0.029%; +0.029%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ad90dd5 1772717012 gleocadie/wrap-libunwind
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 18.274µs 26.545µs ± 9.755µs 19.204µs ± 0.746µs 35.329µs 45.474µs 46.115µs 73.101µs 280.65% 1.054 1.146 36.66% 0.690µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [25.193µs; 27.897µs] or [-5.093%; +5.093%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ad90dd5 1772717012 gleocadie/wrap-libunwind
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 185.296µs 185.679µs ± 0.195µs 185.649µs ± 0.139µs 185.816µs 185.997µs 186.192µs 186.258µs 0.33% 0.453 -0.292 0.10% 0.014µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 5368894.024op/s 5385633.442op/s ± 5645.428op/s 5386514.027op/s ± 4043.503op/s 5390023.444op/s 5393650.527op/s 5395136.094op/s 5396772.757op/s 0.19% -0.448 -0.300 0.10% 399.192op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 17.873µs 17.970µs ± 0.053µs 17.955µs ± 0.028µs 17.998µs 18.066µs 18.113µs 18.230µs 1.53% 1.221 2.307 0.30% 0.004µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 54855039.795op/s 55648376.034op/s ± 164666.334op/s 55696291.401op/s ± 87529.917op/s 55759577.820op/s 55850309.345op/s 55894557.960op/s 55949421.723op/s 0.45% -1.196 2.188 0.30% 11643.668op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.247µs 10.390µs ± 0.057µs 10.385µs ± 0.040µs 10.431µs 10.489µs 10.525µs 10.553µs 1.62% 0.297 -0.270 0.54% 0.004µs 1 200
normalization/normalize_name/normalize_name/good throughput 94762408.773op/s 96248962.099op/s ± 524362.401op/s 96296831.761op/s ± 371588.516op/s 96644898.037op/s 96934657.762op/s 97346296.815op/s 97585729.063op/s 1.34% -0.270 -0.282 0.54% 37078.021op/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 [185.652µs; 185.706µs] or [-0.015%; +0.015%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [5384851.040op/s; 5386415.844op/s] or [-0.015%; +0.015%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [17.963µs; 17.978µs] or [-0.041%; +0.041%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [55625554.864op/s; 55671197.204op/s] or [-0.041%; +0.041%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.382µs; 10.398µs] or [-0.076%; +0.076%] None None None
normalization/normalize_name/normalize_name/good throughput [96176290.513op/s; 96321633.684op/s] or [-0.076%; +0.076%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ad90dd5 1772717012 gleocadie/wrap-libunwind
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.558µs 34.219µs ± 1.129µs 33.703µs ± 0.046µs 33.804µs 36.601µs 36.676µs 38.511µs 14.26% 1.772 1.418 3.29% 0.080µ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 [34.063µs; 34.376µs] or [-0.457%; +0.457%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ad90dd5 1772717012 gleocadie/wrap-libunwind
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.943µs 5.005µs ± 0.039µs 5.005µs ± 0.033µs 5.025µs 5.080µs 5.083µs 5.087µs 1.66% 0.568 -0.812 0.78% 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.000µs; 5.010µs] or [-0.109%; +0.109%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ad90dd5 1772717012 gleocadie/wrap-libunwind
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 48.660ms 48.943ms ± 0.898ms 48.791ms ± 0.089ms 48.939ms 49.101ms 53.110ms 58.907ms 20.73% 8.798 84.843 1.83% 0.063ms 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 [48.819ms; 49.068ms] or [-0.254%; +0.254%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ad90dd5 1772717012 gleocadie/wrap-libunwind
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.899µs 3.912µs ± 0.003µs 3.912µs ± 0.002µs 3.914µs 3.917µs 3.920µs 3.922µs 0.25% 0.246 3.693 0.07% 0.000µs 1 200
credit_card/is_card_number/ throughput 254985021.998op/s 255612258.379op/s ± 168265.089op/s 255634902.572op/s ± 100976.107op/s 255720886.005op/s 255821703.339op/s 255879416.250op/s 256458938.938op/s 0.32% -0.235 3.718 0.07% 11898.139op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 79.017µs 79.607µs ± 0.393µs 79.569µs ± 0.249µs 79.812µs 80.240µs 80.814µs 81.587µs 2.54% 1.458 4.061 0.49% 0.028µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12256781.916op/s 12561936.858op/s ± 61592.093op/s 12567642.108op/s ± 39341.252op/s 12609820.648op/s 12637318.517op/s 12652874.846op/s 12655547.730op/s 0.70% -1.402 3.768 0.49% 4355.219op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 72.271µs 73.050µs ± 0.333µs 72.985µs ± 0.202µs 73.245µs 73.692µs 73.936µs 74.292µs 1.79% 0.781 0.597 0.45% 0.024µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 13460365.369op/s 13689605.805op/s ± 62166.917op/s 13701355.725op/s ± 38075.369op/s 13734803.310op/s 13769217.813op/s 13797778.155op/s 13836893.309op/s 0.99% -0.754 0.535 0.45% 4395.865op/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.920µs 3.922µs 0.26% -0.893 10.992 0.07% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 254939490.007op/s 255595151.655op/s ± 188915.582op/s 255613692.050op/s ± 106631.555op/s 255709576.324op/s 255803670.848op/s 255882542.256op/s 256900779.935op/s 0.50% 0.920 11.167 0.07% 13358.349op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 69.213µs 69.700µs ± 0.357µs 69.637µs ± 0.213µs 69.866µs 70.376µs 70.724µs 71.466µs 2.63% 1.552 3.637 0.51% 0.025µs 1 200
credit_card/is_card_number/378282246310005 throughput 13992699.115op/s 14347531.025op/s ± 72820.885op/s 14360224.337op/s ± 44066.702op/s 14403432.701op/s 14428151.354op/s 14437318.116op/s 14448194.844op/s 0.61% -1.504 3.376 0.51% 5149.214op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 52.147µs 52.214µs ± 0.030µs 52.208µs ± 0.020µs 52.235µs 52.266µs 52.287µs 52.305µs 0.19% 0.483 -0.206 0.06% 0.002µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 19118545.437op/s 19152063.599op/s ± 11004.511op/s 19154154.531op/s ± 7305.128op/s 19160132.554op/s 19167562.734op/s 19171163.046op/s 19176635.188op/s 0.12% -0.480 -0.210 0.06% 778.136op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.028µs 6.036µs ± 0.010µs 6.034µs ± 0.002µs 6.036µs 6.045µs 6.075µs 6.110µs 1.26% 4.210 20.848 0.16% 0.001µs 1 200
credit_card/is_card_number/x371413321323331 throughput 163671326.641op/s 165669725.519op/s ± 267516.018op/s 165730469.547op/s ± 58629.624op/s 165780797.416op/s 165841682.721op/s 165876876.175op/s 165887469.429op/s 0.09% -4.186 20.563 0.16% 18916.239op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.893µs 3.912µs ± 0.002µs 3.911µs ± 0.001µs 3.913µs 3.915µs 3.918µs 3.918µs 0.17% -2.341 21.875 0.06% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 255231318.361op/s 255652583.003op/s ± 151200.966op/s 255657765.872op/s ± 78148.346op/s 255732066.435op/s 255829445.798op/s 255889336.441op/s 256900197.590op/s 0.49% 2.373 22.176 0.06% 10691.523op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 64.113µs 64.314µs ± 0.104µs 64.296µs ± 0.058µs 64.358µs 64.504µs 64.604µs 64.701µs 0.63% 0.866 0.824 0.16% 0.007µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15455722.377op/s 15548727.522op/s ± 25057.474op/s 15552948.444op/s ± 13933.793op/s 15566079.962op/s 15580615.231op/s 15593347.146op/s 15597381.200op/s 0.29% -0.856 0.799 0.16% 1771.831op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 57.817µs 58.082µs ± 0.161µs 58.051µs ± 0.090µs 58.152µs 58.405µs 58.517µs 58.758µs 1.22% 1.191 1.797 0.28% 0.011µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 17018934.007op/s 17217268.595op/s ± 47707.526op/s 17226211.523op/s ± 26604.613op/s 17251302.163op/s 17275606.498op/s 17293724.678op/s 17296002.894op/s 0.41% -1.171 1.725 0.28% 3373.431op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.892µs 3.912µs ± 0.003µs 3.912µs ± 0.001µs 3.913µs 3.916µs 3.918µs 3.918µs 0.17% -1.918 16.934 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 255204265.714op/s 255622262.143op/s ± 170796.517op/s 255636090.978op/s ± 89686.185op/s 255714799.494op/s 255835002.852op/s 255912337.376op/s 256952360.108op/s 0.51% 1.949 17.202 0.07% 12077.138op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 54.568µs 54.942µs ± 0.256µs 54.888µs ± 0.183µs 55.110µs 55.437µs 55.681µs 55.888µs 1.82% 0.897 0.623 0.47% 0.018µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 17892884.737op/s 18201326.730op/s ± 84516.631op/s 18219029.837op/s ± 60708.256op/s 18271561.969op/s 18305783.554op/s 18317357.957op/s 18325769.758op/s 0.59% -0.872 0.547 0.46% 5976.228op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 52.150µs 52.209µs ± 0.036µs 52.204µs ± 0.022µs 52.227µs 52.266µs 52.318µs 52.365µs 0.31% 1.250 2.620 0.07% 0.003µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 19096696.421op/s 19153856.848op/s ± 13317.957op/s 19155698.616op/s ± 8179.391op/s 19163509.325op/s 19170820.192op/s 19174457.322op/s 19175275.400op/s 0.10% -1.244 2.594 0.07% 941.722op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.028µs 6.037µs ± 0.008µs 6.035µs ± 0.003µs 6.038µs 6.047µs 6.073µs 6.092µs 0.94% 3.648 16.604 0.14% 0.001µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 164150615.174op/s 165646022.341op/s ± 223292.420op/s 165700596.525op/s ± 78612.785op/s 165763483.270op/s 165826830.164op/s 165853759.704op/s 165885393.516op/s 0.11% -3.626 16.424 0.13% 15789.158op/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.912µs; 3.913µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/ throughput [255588938.456op/s; 255635578.302op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [79.553µs; 79.662µs] or [-0.068%; +0.068%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12553400.786op/s; 12570472.930op/s] or [-0.068%; +0.068%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [73.003µs; 73.096µs] or [-0.063%; +0.063%] None None None
credit_card/is_card_number/ 378282246310005 throughput [13680990.068op/s; 13698221.542op/s] or [-0.063%; +0.063%] None None None
credit_card/is_card_number/37828224631 execution_time [3.912µs; 3.913µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/37828224631 throughput [255568969.772op/s; 255621333.538op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/378282246310005 execution_time [69.651µs; 69.750µs] or [-0.071%; +0.071%] None None None
credit_card/is_card_number/378282246310005 throughput [14337438.751op/s; 14357623.300op/s] or [-0.070%; +0.070%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [52.210µs; 52.218µs] or [-0.008%; +0.008%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [19150538.480op/s; 19153588.719op/s] or [-0.008%; +0.008%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.035µs; 6.037µs] or [-0.023%; +0.023%] None None None
credit_card/is_card_number/x371413321323331 throughput [165632650.371op/s; 165706800.666op/s] or [-0.022%; +0.022%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.911µs; 3.912µs] or [-0.008%; +0.008%] None None None
credit_card/is_card_number_no_luhn/ throughput [255631628.004op/s; 255673538.003op/s] or [-0.008%; +0.008%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [64.300µs; 64.328µs] or [-0.022%; +0.022%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15545254.797op/s; 15552200.247op/s] or [-0.022%; +0.022%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [58.059µs; 58.104µs] or [-0.039%; +0.039%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [17210656.791op/s; 17223880.399op/s] or [-0.038%; +0.038%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.912µs; 3.912µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255598591.389op/s; 255645932.898op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [54.907µs; 54.978µs] or [-0.065%; +0.065%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [18189613.537op/s; 18213039.922op/s] or [-0.064%; +0.064%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [52.204µs; 52.214µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [19152011.107op/s; 19155702.589op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.036µs; 6.038µs] or [-0.019%; +0.019%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [165615076.160op/s; 165676968.523op/s] or [-0.019%; +0.019%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ad90dd5 1772717012 gleocadie/wrap-libunwind
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.599ms 10.634ms ± 0.015ms 10.633ms ± 0.008ms 10.640ms 10.657ms 10.672ms 10.732ms 0.93% 1.920 9.771 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.632ms; 10.636ms] or [-0.020%; +0.020%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ad90dd5 1772717012 gleocadie/wrap-libunwind
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 731.316µs 732.388µs ± 0.548µs 732.324µs ± 0.319µs 732.661µs 733.318µs 734.023µs 735.523µs 0.44% 1.514 5.375 0.07% 0.039µ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 [732.312µs; 732.464µs] or [-0.010%; +0.010%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ad90dd5 1772717012 gleocadie/wrap-libunwind
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 144.793µs 146.508µs ± 1.887µs 146.280µs ± 0.473µs 146.729µs 148.016µs 153.032µs 166.305µs 13.69% 6.996 64.168 1.28% 0.133µ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 [146.246µs; 146.769µs] or [-0.178%; +0.178%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ad90dd5 1772717012 gleocadie/wrap-libunwind
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.079ns 252.342ns ± 12.235ns 245.452ns ± 2.635ns 258.671ns 281.963ns 284.067ns 285.656ns 16.38% 1.320 0.561 4.84% 0.865ns 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 [250.646ns; 254.038ns] or [-0.672%; +0.672%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ad90dd5 1772717012 gleocadie/wrap-libunwind
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.197µs 3.168µs ± 1.433µs 2.964µs ± 0.031µs 2.991µs 3.654µs 13.851µs 14.814µs 399.72% 7.368 55.406 45.11% 0.101µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [2.969µs; 3.366µs] or [-6.267%; +6.267%] None None None

Group 14

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ad90dd5 1772717012 gleocadie/wrap-libunwind
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 189.033ns 191.480ns ± 1.876ns 191.357ns ± 1.415ns 192.538ns 195.318ns 196.915ns 197.496ns 3.21% 0.944 0.548 0.98% 0.133ns 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 [191.220ns; 191.740ns] or [-0.136%; +0.136%] None None None

Group 15

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ad90dd5 1772717012 gleocadie/wrap-libunwind
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 534.327µs 535.278µs ± 0.969µs 535.029µs ± 0.286µs 535.362µs 537.095µs 538.719µs 543.567µs 1.60% 4.190 27.315 0.18% 0.069µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1839698.220op/s 1868192.703op/s ± 3358.218op/s 1869058.182op/s ± 999.846op/s 1869969.370op/s 1870805.002op/s 1871330.517op/s 1871511.489op/s 0.13% -4.127 26.533 0.18% 237.462op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 388.603µs 389.215µs ± 0.446µs 389.183µs ± 0.212µs 389.377µs 389.733µs 389.967µs 392.573µs 0.87% 4.169 28.831 0.11% 0.032µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2547295.461op/s 2569278.751op/s ± 2930.356op/s 2569486.207op/s ± 1400.117op/s 2571123.710op/s 2572404.851op/s 2572814.206op/s 2573319.727op/s 0.15% -4.123 28.384 0.11% 207.207op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 189.847µs 190.273µs ± 0.249µs 190.217µs ± 0.176µs 190.442µs 190.704µs 190.953µs 191.064µs 0.45% 0.681 -0.022 0.13% 0.018µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5233855.368op/s 5255611.751op/s ± 6861.052op/s 5257163.950op/s ± 4876.915op/s 5260694.740op/s 5264791.685op/s 5265909.393op/s 5267410.920op/s 0.19% -0.675 -0.035 0.13% 485.150op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 37.366µs 37.518µs ± 0.066µs 37.516µs ± 0.043µs 37.558µs 37.639µs 37.684µs 37.706µs 0.51% 0.155 -0.118 0.18% 0.005µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 26520952.974op/s 26654215.001op/s ± 47035.715op/s 26655558.072op/s ± 30217.970op/s 26684629.036op/s 26731683.855op/s 26742429.023op/s 26762557.334op/s 0.40% -0.146 -0.127 0.18% 3325.927op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 45.790µs 45.909µs ± 0.131µs 45.891µs ± 0.043µs 45.938µs 46.017µs 46.095µs 47.537µs 3.59% 9.723 117.854 0.28% 0.009µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 21036397.877op/s 21782390.670op/s ± 60456.732op/s 21790746.611op/s ± 20212.475op/s 21809726.254op/s 21823589.043op/s 21828685.973op/s 21838612.171op/s 0.22% -9.508 114.238 0.28% 4274.937op/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 [535.144µs; 535.413µs] or [-0.025%; +0.025%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1867727.286op/s; 1868658.119op/s] or [-0.025%; +0.025%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [389.153µs; 389.277µs] or [-0.016%; +0.016%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2568872.631op/s; 2569684.870op/s] or [-0.016%; +0.016%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [190.239µs; 190.308µs] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5254660.875op/s; 5256562.627op/s] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [37.508µs; 37.527µs] or [-0.024%; +0.024%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [26647696.303op/s; 26660733.698op/s] or [-0.024%; +0.024%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [45.891µs; 45.927µs] or [-0.040%; +0.040%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [21774011.948op/s; 21790769.391op/s] or [-0.038%; +0.038%] None None None

Group 16

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ad90dd5 1772717012 gleocadie/wrap-libunwind
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 3.135ms 3.178ms ± 0.023ms 3.174ms ± 0.015ms 3.192ms 3.218ms 3.239ms 3.252ms 2.43% 0.690 -0.013 0.72% 0.002ms 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 [3.175ms; 3.181ms] or [-0.100%; +0.100%] None None None

Group 17

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ad90dd5 1772717012 gleocadie/wrap-libunwind
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.010ms 14.052ms ± 0.026ms 14.049ms ± 0.010ms 14.058ms 14.096ms 14.159ms 14.201ms 1.08% 2.587 9.775 0.18% 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.048ms; 14.056ms] or [-0.026%; +0.026%] None None None

Group 18

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ad90dd5 1772717012 gleocadie/wrap-libunwind
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.176ms 4.180ms ± 0.006ms 4.180ms ± 0.001ms 4.181ms 4.183ms 4.186ms 4.262ms 1.98% 12.244 161.854 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.179ms; 4.181ms] or [-0.020%; +0.020%] None None None

Group 19

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ad90dd5 1772717012 gleocadie/wrap-libunwind
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 161.657µs 162.238µs ± 0.253µs 162.220µs ± 0.139µs 162.354µs 162.699µs 162.945µs 163.495µs 0.79% 1.074 3.325 0.16% 0.018µ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 [162.203µs; 162.273µs] or [-0.022%; +0.022%] None None None

Baseline

Omitted due to size.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 98.85057% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 71.26%. Comparing base (19ae2be) to head (ad90dd5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1510      +/-   ##
==========================================
+ Coverage   71.22%   71.26%   +0.03%     
==========================================
  Files         425      427       +2     
  Lines       62695    62782      +87     
==========================================
+ Hits        44657    44740      +83     
- Misses      18038    18042       +4     
Components Coverage Δ
libdd-crashtracker 62.92% <ø> (+0.03%) ⬆️
libdd-crashtracker-ffi 15.63% <ø> (ø)
libdd-alloc 98.77% <ø> (ø)
libdd-data-pipeline 87.38% <ø> (ø)
libdd-data-pipeline-ffi 72.83% <ø> (ø)
libdd-common 79.73% <ø> (ø)
libdd-common-ffi 73.40% <ø> (ø)
libdd-telemetry 62.48% <ø> (ø)
libdd-telemetry-ffi 16.75% <ø> (ø)
libdd-dogstatsd-client 82.64% <ø> (ø)
datadog-ipc 80.74% <ø> (ø)
libdd-profiling 81.60% <ø> (ø)
libdd-profiling-ffi 63.65% <ø> (ø)
datadog-sidecar 33.45% <ø> (ø)
datdog-sidecar-ffi 12.41% <ø> (ø)
spawn-worker 54.69% <ø> (ø)
libdd-tinybytes 93.16% <ø> (ø)
libdd-trace-normalization 81.71% <ø> (ø)
libdd-trace-obfuscation 94.67% <ø> (ø)
libdd-trace-protobuf 68.00% <ø> (ø)
libdd-trace-utils 88.97% <ø> (ø)
datadog-tracer-flare 90.45% <ø> (ø)
libdd-log 74.69% <ø> (ø)
🚀 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.

@gleocadie gleocadie force-pushed the gleocadie/wrap-libunwind branch 9 times, most recently from 55827cb to 6097468 Compare February 6, 2026 14:10
@gleocadie gleocadie force-pushed the gleocadie/wrap-libunwind branch from be0502f to 6e903c9 Compare February 6, 2026 16:03
@danielsn
Copy link
Copy Markdown
Contributor

danielsn commented Feb 6, 2026

Should this be a public libunwind-sys crate?

@gleocadie gleocadie force-pushed the gleocadie/wrap-libunwind branch 3 times, most recently from b406281 to fa7cdd1 Compare February 6, 2026 18:22
@gleocadie gleocadie force-pushed the gleocadie/wrap-libunwind branch from fa7cdd1 to ddb53cb Compare March 3, 2026 08:30
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 3, 2026

Clippy Allow Annotation Report

Comparing clippy allow annotations between branches:

  • Base Branch: origin/main
  • PR Branch: origin/gleocadie/wrap-libunwind

Summary by Rule

Rule Base Branch PR Branch Change

Annotation Counts by File

File Base Branch PR Branch Change

Annotation Stats by Crate

Crate Base Branch PR Branch Change
clippy-annotation-reporter 5 5 No change (0%)
datadog-ffe-ffi 1 1 No change (0%)
datadog-ipc 27 27 No change (0%)
datadog-live-debugger 6 6 No change (0%)
datadog-live-debugger-ffi 10 10 No change (0%)
datadog-profiling-replayer 4 4 No change (0%)
datadog-remote-config 3 3 No change (0%)
datadog-sidecar 59 59 No change (0%)
libdd-common 10 10 No change (0%)
libdd-common-ffi 12 12 No change (0%)
libdd-crashtracker 12 12 No change (0%)
libdd-data-pipeline 5 5 No change (0%)
libdd-ddsketch 2 2 No change (0%)
libdd-dogstatsd-client 1 1 No change (0%)
libdd-profiling 13 13 No change (0%)
libdd-telemetry 19 19 No change (0%)
libdd-tinybytes 4 4 No change (0%)
libdd-trace-normalization 2 2 No change (0%)
libdd-trace-obfuscation 9 9 No change (0%)
libdd-trace-utils 15 15 No change (0%)
Total 219 219 No change (0%)

About This Report

This report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality.

@gleocadie gleocadie force-pushed the gleocadie/wrap-libunwind branch 3 times, most recently from 03c4be1 to aef4c41 Compare March 3, 2026 16:22
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts bot commented Mar 4, 2026

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 8.51 MB 8.51 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 97.32 MB 97.32 MB 0% (0 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 112.92 MB 112.92 MB 0% (0 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.12 MB 11.12 MB 0% (0 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 27.16 MB 27.16 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 76.26 KB 76.26 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 185.97 MB 185.98 MB +0% (+16.00 KB) 👌
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 916.65 MB 916.65 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 9.93 MB 9.93 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 76.26 KB 76.26 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 24.76 MB 24.76 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 51.43 MB 51.43 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 22.97 MB 22.97 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 77.44 KB 77.44 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 190.15 MB 190.16 MB +0% (+8.00 KB) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 900.31 MB 900.31 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 7.53 MB 7.53 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 77.44 KB 77.44 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 26.52 MB 26.52 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 47.06 MB 47.06 MB 0% (0 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 85.27 MB 85.27 MB 0% (0 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 10.04 MB 10.04 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 105.90 MB 105.90 MB 0% (0 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.79 MB 11.79 MB 0% (0 B) 👌

@gleocadie gleocadie force-pushed the gleocadie/wrap-libunwind branch 2 times, most recently from d53d36c to 3713768 Compare March 4, 2026 13:02
@gleocadie gleocadie marked this pull request as ready for review March 4, 2026 14:34
@gleocadie gleocadie force-pushed the gleocadie/wrap-libunwind branch from e69c591 to ba13f15 Compare March 5, 2026 13:14
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot merged commit 959c0cd into main Mar 5, 2026
76 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot deleted the gleocadie/wrap-libunwind branch March 5, 2026 14:55
gh-worker-dd-mergequeue-cf854d bot pushed a commit that referenced this pull request Mar 9, 2026
# What does this PR do?

Use packaged libunwind to unwind crash stacktrace.

The diff is bigger than the actual change, because I moved some of the emitter functions around so that the file structure is 

```
helper structs
main emit func (`emit_crashreport`)
... all the helper emitters ...
```

I also added `unsafe` comments to unsafe calls

# Motivation

Crashtracker collects callstacks. When it comes to alpine/musl-libc (mainly on x86_64), we fail at retrieving the callstack passed the signal frame. The problem is that the musl-libc binary does not have the CFIs (unwinding information) and the unwinder does not know how to move forward and stop.

Libunwind provides a way to unwind starting from the ucontext: context (registers and state) of the crashing thread. Going that way, we can collect the callstack as much as possible (until hitting musl-libc). We previously packaged libunwind as a libdatadog crate here: [feat(profiling): Wrap libunwind in a crate](#1510)

Lets use this to unwind from crash ucontext

# Additional Notes

Anything else we should know when reviewing?

# How to test the change?

Describe here in detail how the change can be validated.


Co-authored-by: gyuheon.oh <[email protected]>
gh-worker-dd-mergequeue-cf854d bot pushed a commit to DataDog/dd-trace-py that referenced this pull request Mar 18, 2026
## Description

Latest versions of `libdatadog` build `libunwind` from source, which requires having `autoconf` and `automake` available in the env that builds it. 

See DataDog/libdatadog#1510.

Co-authored-by: thomas.kowalski <[email protected]>
brettlangdon pushed a commit to DataDog/dd-trace-py that referenced this pull request Mar 23, 2026
## Description

Latest versions of `libdatadog` build `libunwind` from source, which requires having `autoconf` and `automake` available in the env that builds it. 

See DataDog/libdatadog#1510.

Co-authored-by: thomas.kowalski <[email protected]>
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