Skip to content

Commit

Permalink
Add cargo feature for TRACY_NO_CALLSTACK_INLINES define (#66)
Browse files Browse the repository at this point in the history
Co-authored-by: Enerqi <>
  • Loading branch information
enerqi committed Sep 3, 2023
1 parent d1b194f commit 7fa3711
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions FEATURES.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
to the `TRACY_ON_DEMAND` define.
* `fibers` – enable support for instrumenting fibers, coroutines and similar such asynchrony
primitives. Corresponds to the `TRACY_FIBERS` define.
* `callstack-inlines` - enables resolution of inline frames for call stacks. Disabling it will make the profiler use
the basic but much faster frame resolution mode. Corresponds to the `TRACY_NO_CALLSTACK_INLINES` define.


Refer to this package's `Cargo.toml` for the list of the features enabled by default. Refer to
the `Tracy` manual for more information on the implications of each feature.
3 changes: 2 additions & 1 deletion tracing-tracy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ criterion = "0.3"
[features]
# Refer to FEATURES.mkd for documentation on features.
default = [ "enable", "system-tracing", "context-switch-tracing", "sampling", "code-transfer",
"broadcast" ]
"broadcast", "callstack-inlines" ]
broadcast = ["client/broadcast"]
code-transfer = ["client/code-transfer"]
context-switch-tracing = ["client/context-switch-tracing"]
Expand All @@ -44,6 +44,7 @@ only-ipv4 = ["client/only-ipv4"]
only-localhost = ["client/only-localhost"]
sampling = ["client/sampling"]
system-tracing = ["client/system-tracing"]
callstack-inlines = ["client/callstack-inlines"]

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "tracing_tracy_docs"]
3 changes: 2 additions & 1 deletion tracy-client-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cc = { version = "1.0.82", default-features = false }
[features]
# Refer to FEATURES.mkd for documentation on features.
default = [ "enable", "system-tracing", "context-switch-tracing", "sampling", "code-transfer",
"broadcast" ]
"broadcast", "callstack-inlines" ]
enable = []
fibers = []
system-tracing = []
Expand All @@ -41,6 +41,7 @@ timer-fallback = []
ondemand = []
manual-lifetime = []
delayed-init = []
callstack-inlines = []

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "tracy_client_sys_docs"]
3 changes: 3 additions & 0 deletions tracy-client-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ fn set_feature_defines(mut c: cc::Build) -> cc::Build {
if std::env::var_os("CARGO_FEATURE_BROADCAST").is_none() {
c.define("TRACY_NO_BROADCAST", None);
}
if std::env::var_os("CARGO_FEATURE_CALLSTACK_INLINES").is_none() {
c.define("TRACY_NO_CALLSTACK_INLINES", None);
}
c
}

Expand Down
3 changes: 2 additions & 1 deletion tracy-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ version = "0.5"
[features]
# Refer to FEATURES.mkd for documentation on features.
default = [ "enable", "system-tracing", "context-switch-tracing", "sampling", "code-transfer",
"broadcast" ]
"broadcast", "callstack-inlines" ]
broadcast = ["sys/broadcast"]
code-transfer = ["sys/code-transfer"]
context-switch-tracing = ["sys/context-switch-tracing"]
Expand All @@ -58,6 +58,7 @@ only-ipv4 = ["sys/only-ipv4"]
only-localhost = ["sys/only-localhost"]
sampling = ["sys/sampling"]
system-tracing = ["sys/system-tracing"]
callstack-inlines = ["sys/callstack-inlines"]

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "tracy_client_docs"]

0 comments on commit 7fa3711

Please sign in to comment.