-
Notifications
You must be signed in to change notification settings - Fork 13
Description
The current implementation of usdt
(v0.3.2) uses the public feature flag "asm"
to decide what code to generate inside the probe macros. We initially did this for a few reasons. First, the Rust asm
feature was required, and it's pretty common practice to gate nightly features in a crate with a public feature flag. Secondly, it was very useful for development to pick a real or no-op implementation of the probes.
The time has come to remove this feature flag, however. The asm
feature has been stabilized. The asm_sym
feature, required for macOS, is on the path to stabilization. More importantly, a feature flag for this doesn't make a whole lot of sense. First, the "real" version of the probes is the whole point of the crate, so turning them off seems silly. Second, feature flags are additive, which I didn't quite appreciate when I built it this way initially. This is a big problem, since it means it's possible for trouble when crate uses two other crates, both of which use usdt
. If one enables the probes, it doesn't matter whether the other crate chose to enable them, the probes are there due to feature unification.
This issue tracks removing all public feature flags. The crate will choose the code to be generated in the probe macros solely on the basis of the target OS.