pub struct CallstackSampling {
pub scope: Option<Scope>,
pub kernel_frames: Option<bool>,
pub user_frames: Option<i32>,
}
Fields§
§scope: Option<Scope>
Defines a set of processes for which samples are retained/skipped. If unset, all samples are kept, but beware that it will be very heavy on the stack unwinder, which might start dropping samples due to overload.
kernel_frames: Option<bool>
If true, callstacks will include the kernel-space frames. Such frames can be identified by a magical “kernel” string as their mapping name. Requires traced_perf to be running as root, or kptr_restrict to have been manually unrestricted. On Android, the platform should do the right thing on debug builds. This does not disclose KASLR, as only the function names are emitted.
user_frames: Option<i32>
Whether to record and unwind userspace callstacks. If unset, defaults to including userspace (UNWIND_DWARF) both for backwards compatibility and as the most common default (this defaulting is only applicable if the outer CallstackSampling message is explicitly set).
Implementations§
Source§impl CallstackSampling
impl CallstackSampling
Sourcepub fn kernel_frames(&self) -> bool
pub fn kernel_frames(&self) -> bool
Returns the value of kernel_frames
, or the default value if kernel_frames
is unset.
Sourcepub fn user_frames(&self) -> UnwindMode
pub fn user_frames(&self) -> UnwindMode
Returns the enum value of user_frames
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_user_frames(&mut self, value: UnwindMode)
pub fn set_user_frames(&mut self, value: UnwindMode)
Sets user_frames
to the provided enum value.
Trait Implementations§
Source§impl Clone for CallstackSampling
impl Clone for CallstackSampling
Source§fn clone(&self) -> CallstackSampling
fn clone(&self) -> CallstackSampling
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CallstackSampling
impl Debug for CallstackSampling
Source§impl Default for CallstackSampling
impl Default for CallstackSampling
Source§impl Message for CallstackSampling
impl Message for CallstackSampling
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.