You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Description
Adds a standalone Rust `cdylib` (`src/native_heap_gotter/`) wrapping libdatadog's crates.io crate `libdd-profiling-heap-gotter` `1.0.0` behind a stable, ddtrace-owned C ABI: `ddtrace_heap_gotter_install()` / `_is_installed()` (→ `bool`, idempotent/fork-safe) and `_test_hook_hits()` (→ `u64`, `test-support` feature only, never shipped). Owning the cdylib (`[lib] name = "dd_heap_gotter"`) yields a clean `libdd_heap_gotter.so` and fixed, unmangled symbols for the future `ctypes` activator.
- **Build-gated:** built only with `DD_PROFILING_NATIVE_HEAP_BUILD=1` on Linux 64-bit. `setup.py` runs `cargo build --release`, stages `libdd_heap_gotter<EXT_SUFFIX>.so` under `ddtrace/internal/datadog/profiling/`, sets the soname (`patchelf`), and adds it to `package_data` only when the flag is set. Off by default → mainline wheels unaffected.
- **Inert:** nothing loads or calls the cdylib yet → zero runtime behavior change. Activation lands in #19079 (gated by `DD_PROFILING_NATIVE_HEAP_ENABLED`).
## Testing
- [ ] `cargo build --release --manifest-path src/native_heap_gotter/Cargo.toml` resolves against crates.io and produces `libdd_heap_gotter.so`.
- [x] Wheel built with `DD_PROFILING_NATIVE_HEAP_BUILD=1` (Linux 64-bit) ships the staged `.so` with the expected soname.
- [ ] Default build (flag unset / non-Linux / 32-bit) is unchanged and ships no `.so`.
Co-authored-by: vlad.scherbich <vlad.scherbich@datadoghq.com>
0 commit comments