-
Notifications
You must be signed in to change notification settings - Fork 13
Make datadog-profiling-ffi exportable in external projects. #1050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* Add "lib" to crate-type. * Fix blazesym version in crashtracker.
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
BenchmarksComparisonBenchmark execution time: 2025-05-07 09:06:37 Comparing candidate commit f8479b4 in PR branch Found 6 performance improvements and 3 performance regressions! Performance is the same for 43 metrics, 2 unstable metrics. scenario:credit_card/is_card_number/378282246310005
scenario:normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo...
scenario:normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000...
scenario:normalization/normalize_service/normalize_service/[empty string]
scenario:sql/obfuscate_sql_string
CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
Group 13
BaselineOmitted due to size. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1050 +/- ##
==========================================
- Coverage 71.24% 71.17% -0.07%
==========================================
Files 329 322 -7
Lines 49229 49235 +6
==========================================
- Hits 35071 35043 -28
- Misses 14158 14192 +34
🚀 New features to boost your workflow:
|
7e7ca59
to
b183486
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows static library artifacts seem to have huge bump in size, could you check if we correctly applying the linker optimization flags for all platforms?
let mut cargo_args = vec![ | ||
"build", | ||
"rustc", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is rustc using all the configuration defined in the workspace Cargo.toml like opt-level
and codegen-units
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, cargo is still parsing the the toml file and applying the configuration. They are almost equivalent, the difference is that rustc allows you to override some configuration like the 'crate-type'
Yes, didn't upload the latest commit. It should be fixed. |
46f4ee9
to
14182f4
Compare
14182f4
to
f8479b4
Compare
What does this PR do?
This PR adds 'lib' to datadog-profiling-ffi crate type list so it symbols can be reexported in an external project.
Motivation
Some SDKs were already integrating some parts of libdatadog using a language framework and profiling using the released artifacts. As a result there were two libraries, one generated by framework and another one for wrapping libdatadog-ffi functions. This led to symbol duplication across libraries. In order to overcome that issue, hence reducing the overall size, we decided to merge both libraries, for that we needed to compile profiling as a 'lib'.
Additional Notes
As a side effect the builder and build scripts has been modified in order to overcome problems with LTO linkage where cargo build has some issues when adding 'lib' to the crate-type list.
Another side effect is that when crashtracker is imported as a dependency in another project the cargo dependency resolver resolved blazesym to version "0.2.0-rc.3" instead of "rc.2" leading to some compilation errors because the are breaking changes between the two versions.