Merge profiling and libnative libraries.
Consolidate profiling a libnative dependencies in order to save some binary size due to duplicated symbols:
- Add new cmake file to find libnative components.
- Modify dd_wrapper cmake in order to link against libnative.
- Modify ddup cmake in order to link against libnative.
- Change crashtracker compilation so it links agains libnative. Link to python runtime as a workaround to solve secondary dependencies from libnative.so (temporary until the crashtracker PyO3 bindings are ready).
Checklist
- [ ] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the library release note guidelines
- The change includes or references documentation updates if necessary
- Backport labels are set (if applicable)
Reviewer Checklist
- [ ] Reviewer has checked that all the criteria below are met
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking API changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the release branch maintenance policy
CODEOWNERS have been resolved as:
build_libnative.py @DataDog/apm-core-python
ddtrace/internal/datadog/profiling/cmake/FindLibNative.cmake @DataDog/profiling-python
src/native/.cargo/config.toml @DataDog/apm-core-python
ddtrace/internal/datadog/profiling/build_standalone.sh @DataDog/profiling-python
ddtrace/internal/datadog/profiling/crashtracker/CMakeLists.txt @DataDog/profiling-python
ddtrace/internal/datadog/profiling/dd_wrapper/CMakeLists.txt @DataDog/profiling-python
ddtrace/internal/datadog/profiling/dd_wrapper/test/CMakeLists.txt @DataDog/profiling-python
ddtrace/internal/datadog/profiling/ddup/CMakeLists.txt @DataDog/profiling-python
setup.py @DataDog/python-guild
src/native/Cargo.lock @DataDog/apm-core-python
src/native/Cargo.toml @DataDog/apm-core-python
src/native/lib.rs @DataDog/apm-core-python
While investigating the root cause of slow builds, we discovered that the main culprit is our current usage of CMake. In the long-run, we would want to migrate away from CMake, at least when building Python native extensions. IIUC here we go in the opposite direction as we remove the rust extension from setup.py and move the heavy-lifting to CMake + more custom scripts. My concern is that this would contribute to the build time, while also giving us even more code to maintain.
This pull request has been automatically closed after a period of inactivity. After this much time, it will likely be easier to open a new pull request with the same changes than to update this one from the base branch. Please comment or reopen if you think this pull request was closed in error.