Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anelson/tracers
/ functions
Functions
379 in github.com/anelson/tracers
⨍
Functions
379
◇
Types & classes
156
↓ 22 callers
Method
item_trait
(&self)
tracers-codegen/src/spec/provider.rs:246
↓ 16 callers
Function
wrap
Helper function to wrap a probe arg in its correspondong wrapper without contorting one's fingers typing angle brackets
tracers-core/src/argtypes.rs:133
↓ 15 callers
Method
ident
(&self)
tracers-codegen/src/spec/provider.rs:242
↓ 15 callers
Method
name
(&self)
tracers-codegen/src/spec/provider.rs:228
↓ 11 callers
Method
tracing_target
(&self)
tracers-codegen/src/lib.rs:100
↓ 9 callers
Method
spec
(&self)
tracers-codegen/src/gen/static/provider_trait.rs:29
↓ 7 callers
Function
get_filtered_test_traits
(with_errors: bool)
tracers-codegen/src/spec/provider.rs:397
↓ 7 callers
Method
is_enabled
(&self)
tracers-codegen/src/lib.rs:42
↓ 7 callers
Function
with_env_vars
Sets the specified environment variables for the current process, and keeps them set until the returned guard object is dropped. Once it's dropped, t
tracers-codegen/src/testdata.rs:75
↓ 6 callers
Function
cache_object_computation
Similar to `cache_file_computation`, except the computation is not on the contents of a file but rather on some arbitrary object with a name and a has
tracers-codegen/src/cache.rs:65
↓ 6 callers
Function
generate_tuple
Given an iterable sequence of `TokenStream`s, produces a new `TokenStream` which will be a tuple expression with each element of the tuple correspondi
tracers-codegen/src/gen/common/mod.rs:273
↓ 6 callers
Function
get_test_provider_traits
Alas, the types in `syn` and `proc_macro2` aren't Send+Sync, which means they can't be used as statics. So the trait test data must be re-created by
tracers-codegen/src/testdata.rs:289
↓ 6 callers
Function
get_type_param_names
(args: usize)
tracers-core/build.rs:36
↓ 5 callers
Function
cache_file_computation
Given the path to a file, and a function that takes as an argument a `String` with the contents of that file and returns the (serializable) result of
tracers-codegen/src/cache.rs:18
↓ 5 callers
Method
get_attr_and_item_trait
(&self)
tracers-codegen/src/testdata.rs:225
↓ 5 callers
Method
get_provider_impl_mod_name
Returns the name of the module in which most of the implementation code for this trait will be located.
tracers-codegen/src/gen/common/mod.rs:126
↓ 5 callers
Method
tracing_type
(&self)
tracers-codegen/src/lib.rs:96
↓ 4 callers
Method
as_c_type
(&self)
tracers-core/src/argtypes/string.rs:52
↓ 4 callers
Function
code_generator
Loads the `BuildInfo` and based on its contents creates and returns the applicable `CodeGenerator` implementation
tracers-codegen/src/gen/mod.rs:91
↓ 4 callers
Function
get_cache_path
Given the path to some root directory, generates a path to a subdirectory which is suitable for use as a cache. This automatically adds the version o
tracers-codegen/src/cache.rs:140
↓ 4 callers
Function
lttng
(args: &[&str])
tracers/benches/probe_firing.rs:274
↓ 4 callers
Method
name_with_hash
The name of this provider (in snake_case) combined with the hash of the provider's contents. Eg: `my_provider_deadc0de1918df`
tracers-codegen/src/spec/provider.rs:234
↓ 4 callers
Function
recurse_tree
( f: &mut F, typ: &syn::Type, )
tracers-codegen/src/syn_helpers.rs:31
↓ 4 callers
Function
test_with_string
(x: T, pointer: *const i8)
tracers-core/src/argtypes/string.rs:154
↓ 4 callers
Function
transform_types
In the `tracers` macro implementation there are some cases where, given a `Type` instance, I want to recursively visit all nested types. For example,
tracers-codegen/src/syn_helpers.rs:24
↓ 3 callers
Function
add_suffix_to_ident
Helper method which takes as input an `Ident` which represents a variable or type name, appends a given suffix to that name, and returns it as a new `
tracers-codegen/src/syn_helpers.rs:142
↓ 3 callers
Method
arg_type_info
(&self)
tracers-codegen/src/spec/probe_arg.rs:105
↓ 3 callers
Function
build
Called from the `build.rs` of all crates which have a direct dependency on `tracers` and `tracers_macros`. This determines the compile-time configura
tracers-codegen/src/build_rs.rs:243
↓ 3 callers
Function
cache_generated_file
Lower-level caching function. Given some arbitrary file name (and optional path components) relative to the cache path, if the file exists, returns t
tracers-codegen/src/cache.rs:114
↓ 3 callers
Function
cached_results_path
Compute the path of the directory within the cache path which contains all results related to a specific input path and hash.
tracers-codegen/src/cache.rs:187
↓ 3 callers
Function
find_probes
Looking at the methods defined on the trait, deduce from those methods the probes that we will need to define, including their arg counts and arg type
tracers-codegen/src/spec/provider.rs:345
↓ 3 callers
Function
find_providers
Scans the AST of a Rust source file, finding all traits marked with the `tracer` attribute, parses the contents of the trait, and deduces the provider
tracers-codegen/src/spec/provider.rs:285
↓ 3 callers
Method
generate
(&self)
tracers-codegen/src/gen/static/provider_trait.rs:85
↓ 3 callers
Function
get_cached_object_computation
Identical to `cache_object_computation` except this is read-only; if the computation does not exist in the cache it returns an error
tracers-codegen/src/cache.rs:92
↓ 3 callers
Method
get_provider_impl_struct_type_name
The name of the struct type within the impl module which represents the provider, eg `MyProbesProviderImpl`. Note that this is not the same as the str
tracers-codegen/src/gen/common/mod.rs:135
↓ 3 callers
Method
hash
(&self)
tracers-codegen/src/spec/provider.rs:238
↓ 3 callers
Method
into_compiler_error
Convert this error into a `TokenStream` such that when the compiler consumes the token stream it will evaluate to a compile error, with the span corre
tracers-codegen/src/error.rs:252
↓ 3 callers
Function
recurse_path
`Path` is something of a special case that is complex enough to require its own function and which appears in multiple places.
tracers-codegen/src/syn_helpers.rs:110
↓ 3 callers
Method
syn_typ_with_lifetimes
Returns the Rust AST representation of this argument's type, with lifetime annotations added for every reference type. See `add_lifetimes_to_syn_type
tracers-codegen/src/spec/probe_arg.rs:115
↓ 3 callers
Function
trait_item
()
tracers-codegen/src/spec/probe.rs:160
↓ 3 callers
Function
xform_types_i
( type_params: &Vec<String>, mut f: F, )
tracers-core/build.rs:53
↓ 3 callers
Function
xform_types_i
( type_params: &Vec<String>, mut f: F, )
tracers-dyn-stap/build.rs:74
↓ 2 callers
Method
args_as_tuple_type_with_lifetimes
Like the method above constructs a tuple type corresponding to the types of the arguments of this probe. Unlike the above method, this tuple type is a
tracers-codegen/src/gen/common/mod.rs:250
↓ 2 callers
Method
args_lifetime_parameters
Gets all of the lifetime parameters for all of the reference args for this probe, in a `Vec` for convenient post-processing. For example: ```noexecu
tracers-codegen/src/gen/common/mod.rs:216
↓ 2 callers
Function
bench_fire
(c: &mut Criterion, enabled: bool)
tracers/benches/probe_firing.rs:340
↓ 2 callers
Function
build_internal
(out: &mut OUT)
tracers-codegen/src/build_rs.rs:259
↓ 2 callers
Function
choose_arg_for_n
Pick an argument type for argument `n`. Returns tuple containing: Name of the arg Rust data type of the arg C format string to use for the arg bool
tracers-core/build.rs:340
↓ 2 callers
Method
enable_dynamic
(&self)
tracers-codegen/src/build_rs.rs:88
↓ 2 callers
Function
from_syn_type
(ty: &syn::Type)
tracers-codegen/src/argtypes.rs:77
↓ 2 callers
Method
generate
(&self)
tracers-codegen/src/gen/dynamic/provider_trait.rs:50
↓ 2 callers
Function
generate_init_provider
Generates the standard provider init call. Some implementations may use a different one but this is the typical impl.
tracers-codegen/src/gen/common/mod.rs:287
↓ 2 callers
Function
generate_multiline_comments
When generating a comment with `#[doc]` if the string is multi-lined then `quote_spanned` seems to get confused and puts the rest of the lines of the
tracers-codegen/src/gen/common/mod.rs:306
↓ 2 callers
Function
generate_native_code
(out: &mut dyn Write)
tracers-codegen/src/build_rs.rs:390
↓ 2 callers
Method
generate_probe_deprecation_attribute
Generates the `#[deprecated...]` attribute which triggers a warning if anyone tries to call the probe method directly, not through the `probe!` attrib
tracers-codegen/src/gen/common/mod.rs:147
↓ 2 callers
Method
generate_probe_doc_comment
Generates a doc comment to attach to the probe's method. This includes additional information about how to work with this probe on various platforms.
tracers-codegen/src/gen/common/mod.rs:163
↓ 2 callers
Method
generate_provider_probe_type
Each probe has a corresponding field in the struct that we build for the provider. That field is an instance of `ProviderProbe` which is a type-safe
tracers-codegen/src/gen/dynamic/provider_trait.rs:471
↓ 2 callers
Method
generate_trait_comment
Generates the an additional doc comment for the generated provider trait/struct/whatever, which provides some helpful information about how to use tha
tracers-codegen/src/gen/common/mod.rs:26
↓ 2 callers
Method
generate_try_init_decl
Generates the declaration (but *NOT* the *implementation*) of the `__try_init_provider` method. This includes a detailed doc comment. Each generator
tracers-codegen/src/gen/common/mod.rs:63
↓ 2 callers
Method
get_c_type_str
Gets a string which contains the C type for use generating C/C++ code. For example if the `CType` is `VoidPtr`, this function returns `void *`
tracers-codegen/src/argtypes.rs:119
↓ 2 callers
Function
get_dependencies
Scans an already-parsed AST and finds the source dependencies within the file
tracers-codegen/src/deps.rs:18
↓ 2 callers
Function
get_processed_provider_info
Checks the cache to see if the provider described by `provider` has already been processed by the native code generator and produced a native lib and
tracers-codegen/src/gen/static/native_code/mod.rs:60
↓ 2 callers
Function
get_provider_impl_mod_name
Returns the name of the module in which most of the implementation code for this trait will be located.
tracers-codegen/src/gen/common/mod.rs:264
↓ 2 callers
Function
get_targets
Given the path to a Cargo manifest and the name of a package, invokes `cargo metadata` and parses the output to find all of the targets of that packag
tracers-codegen/src/cargo.rs:11
↓ 2 callers
Function
get_test_data
Gets test data, where each test case is a tuple with the input type, and the output type with all references given a lifetime of `'mylife'`
tracers-codegen/src/syn_helpers.rs:165
↓ 2 callers
Function
hash
(something: T)
tracers-codegen/src/hashing.rs:20
↓ 2 callers
Function
is_required
()
tracers-libstapsdt-sys/build.rs:16
↓ 2 callers
Function
is_required
()
tracers-libelf-sys/build.rs:23
↓ 2 callers
Function
is_required
()
tracers-dyn-stap/build.rs:16
↓ 2 callers
Method
lifetimes
Scans the argument's type information after it has been annotated with explicit lifetimes for every reference, and returns a vector of a copy of those
tracers-codegen/src/spec/probe_arg.rs:122
↓ 2 callers
Function
process_file
( build_info: &BuildInfo, stdout: &mut dyn Write, out_dir: &Path, file: &Path, )
tracers-codegen/src/gen/static/native_code/mod.rs:107
↓ 2 callers
Function
process_provider
( build_info: &BuildInfo, stdout: &mut dyn Write, out_dir: &Path, provider: ProviderSpecificat
tracers-codegen/src/gen/static/native_code/mod.rs:200
↓ 2 callers
Function
resolve_dependency
Given the path to a source file and a previously-discovered dependency, attempts to resolve that dependency to an existing source file.
tracers-codegen/src/deps.rs:28
↓ 2 callers
Function
run
(cmd: &mut Command, program: &str)
tracers-libelf-sys/build.rs:125
↓ 2 callers
Method
separate_probes
Consumes this spec and returns the same spec with all probes removed, and instead the probes vector is returned separately. This is a convenient way
tracers-codegen/src/spec/provider.rs:262
↓ 2 callers
Method
syn_typ
(&self)
tracers-codegen/src/spec/probe_arg.rs:109
↓ 2 callers
Function
tracers_build
This function is the counterpart to `build`, which is intended to be invoked in the `tracers` `build.rs` script. It reads the feature flags enabled o
tracers-codegen/src/build_rs.rs:277
↓ 2 callers
Function
tracers_build_internal
(out: &mut OUT, features: FeatureFlags)
tracers-codegen/src/build_rs.rs:295
↓ 2 callers
Function
unset_vars
(vars: &mut EnvVarsVec)
tracers-codegen/src/testdata.rs:36
↓ 1 callers
Function
add_hash_to_path
Helper method with takes a path (eg `foo/bar/baz.lib`) and a hash code (eg `0xBADF00D`), and produces a version of that path with the hash added to th
tracers-codegen/src/hashing.rs:40
↓ 1 callers
Method
add_probe
(&mut self, name: &'static str)
tracers-dyn-stap/src/provider.rs:38
↓ 1 callers
Method
args_as_tuple_type_without_lifetimes
Build a tuple type expression whose elements correspond to the arguments of this probe. This includes only the type of each argument, and has no expli
tracers-codegen/src/gen/common/mod.rs:240
↓ 1 callers
Method
args_as_tuple_value
Build a tuple value expression, consisting of the names of the probe arguments in a tuple. For example: ```noexecute fn probe(arg0: &str, arg1: usize
tracers-codegen/src/gen/common/mod.rs:231
↓ 1 callers
Method
as_c_type
(&self)
tracers-core/src/argtypes/cstring.rs:24
↓ 1 callers
Method
assert_equals
(&self, x: &str)
tracers-core/src/argtypes/string.rs:119
↓ 1 callers
Method
build
(self, name: &str)
tracers-dyn-stap/src/provider.rs:53
↓ 1 callers
Function
convert_to_string
Helper which converts any type in the `quote/proc_macro2/syn` crates which implements `ToTokens` (that is to say, anything that can be placed inside a
tracers-codegen/src/syn_helpers.rs:152
↓ 1 callers
Function
create_native_code_generator
( build_info: &BuildInfo, out_dir: &Path, provider: ProviderSpecification, )
tracers-codegen/src/gen/static/native_code/mod.rs:253
↓ 1 callers
Function
disable_tracing
(mut child: Child)
tracers/benches/probe_firing.rs:245
↓ 1 callers
Method
enable_static
(&self)
tracers-codegen/src/build_rs.rs:92
↓ 1 callers
Function
enable_tracing
()
tracers/benches/probe_firing.rs:165
↓ 1 callers
Method
enable_tracing
(&self)
tracers-codegen/src/build_rs.rs:84
↓ 1 callers
Function
find_executable
(exe_name: P)
tracers/benches/probe_firing.rs:178
↓ 1 callers
Function
find_module
Given the path to a source file containing a `mod` item, and the name of the module, attempts to find the source file which contains that module. It
tracers-codegen/src/deps.rs:41
↓ 1 callers
Function
find_sources
(entrypoint: &Path)
tracers-codegen/src/deps.rs:121
↓ 1 callers
Method
fire
Fires the probe. Note that it's assumed higher level code has tested `is_enabled()` already. If the probe isnt' enabled, it's not an error to attempt
tracers-core/src/dynamic.rs:84
↓ 1 callers
Function
fire_probe
(pt: ProbeType)
tracers/src/bin/testfire.rs:99
↓ 1 callers
Method
force_dyn_noop
(&self)
tracers-codegen/src/build_rs.rs:101
↓ 1 callers
Method
force_dyn_stap
(&self)
tracers-codegen/src/build_rs.rs:96
↓ 1 callers
Method
force_static_lttng
(&self)
tracers-codegen/src/build_rs.rs:111
↓ 1 callers
Method
force_static_stap
(&self)
tracers-codegen/src/build_rs.rs:106
next →
1–100 of 379, ranked by callers