Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions profiling/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
[target.x86_64-apple-darwin]
# Leaving syntax here in case we decide to list them all specifically
#rustflags = ["-C", "link-args=-Wl,-U,_zend_register_extension -Wl,-U,_zend_getenv -Wl,-U,_sapi_module -Wl,-U,_executor_globals"]
rustflags = ["-C", "link-args=-undefined dynamic_lookup"]
# -force-frame-pointers: Ensure all functions set up frame pointers for FP-based backtrace tests
rustflags = ["-C", "link-args=-undefined dynamic_lookup", "-C", "force-frame-pointers=yes"]

[target.aarch64-apple-darwin]
# Leaving syntax here in case we decide to list them all specifically
#rustflags = ["-C", "link-args=-Wl,-U,_zend_register_extension -Wl,-U,_zend_getenv -Wl,-U,_sapi_module -Wl,-U,_executor_globals"]
rustflags = ["-C", "link-args=-undefined dynamic_lookup"]
rustflags = ["-C", "link-args=-undefined dynamic_lookup", "-C", "force-frame-pointers=yes"]

[target.x86_64-unknown-linux-gnu]
rustflags = ["-C", "force-frame-pointers=yes"]

[target.aarch64-unknown-linux-gnu]
rustflags = ["-C", "force-frame-pointers=yes"]
11 changes: 11 additions & 0 deletions profiling/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@ features = ["env-filter", "fmt", "smallvec", "std"]

[dev-dependencies]
allocator-api2 = { version = "0.2", default-features = false, features = ["alloc"] }
backtrace = "0.3"
criterion = { version = "0.5.1" }
datadog-php-profiling = { path = ".", features = ["test"] }

[target.'cfg(any(target_arch = "x86_64", target_arch = "aarch64"))'.dependencies]
gimli = { version = "0.31", features = ["write"] }

[target.'cfg(target_arch = "x86_64")'.dev-dependencies]
criterion-perf-events = "0.4.0"
perfcnt = "0.8.0"
Expand All @@ -67,6 +71,13 @@ debug_stats = []
io_profiling = []
stack_walking_tests = []
test = []
# Tests only (Linux): Link with LLVM's libunwind to use __unw_add_dynamic_eh_frame_section
# for eh_frame registration and enable tests using unw_* APIs. When disabled (default),
# uses libgcc's __register_frame and libunwind API tests are skipped.
# NOTE: Ensure LLVM's libunwind is actually linked (not the nongnu libunwind), otherwise
# _Unwind_Backtrace will come from libgcc_s, which knows nothing about the registration
# through the libunwind interface
libunwind_link = []

# Not for prod:
tracing = ["dep:tracing"]
Expand Down
Loading
Loading