pub struct ProfilePacket {
pub strings: Vec<InternedString>,
pub mappings: Vec<Mapping>,
pub frames: Vec<Frame>,
pub callstacks: Vec<Callstack>,
pub process_dumps: Vec<ProcessHeapSamples>,
pub continued: Option<bool>,
pub index: Option<u64>,
}Expand description
The packet emitted by heapprofd for each heap snapshot. A snapshot can involve more than one ProfilePacket if the snapshot is big (when |continued| is true). The cardinality and grouping is as follows: A ProfilePacket contains:
- 1+ per-process heap snapshots (ProcessHeapSamples). Normally there is only one heap per process (the main malloc/free heap), but there can be more if the process is using the heapprofd API to profile custom allocators.
- Globally interned strings, mappings and frames (to allow de-duplicating frames/mapping in common between different processes). A ProcessHeapSamples contains:
- The process and heap identifier.
- A number of HeapSample, one for each callsite that had some alloc/frees.
- Statistics about heapprofd internals (e.g., sampling/unwinding timings). A HeapSample contains statistics about callsites:
- Total number of bytes allocated and freed from that callsite.
- Total number of alloc/free calls sampled.
- Stats at the local maximum when dump_at_max = true. See https://perfetto.dev/docs/data-sources/native-heap-profiler for more.
Fields§
§strings: Vec<InternedString>The following interning tables are only used in Android version Q. In newer versions, these tables are in InternedData (see protos/perfetto/trace/interned_data) and are shared across multiple ProfilePackets. For backwards compatibility, consumers need to first look up interned data in the tables within the ProfilePacket, and then, if they are empty, look up in the InternedData instead.
mappings: Vec<Mapping>§frames: Vec<Frame>§callstacks: Vec<Callstack>§process_dumps: Vec<ProcessHeapSamples>§continued: Option<bool>If this is true, the next ProfilePacket in this package_sequence_id is a continuation of this one. To get all samples for a process, accummulate its ProcessHeapSamples.samples until you see continued=false.
index: Option<u64>Index of this ProfilePacket on its package_sequence_id. Can be used to detect dropped data. Verify these are consecutive.
Implementations§
Trait Implementations§
Source§impl Clone for ProfilePacket
impl Clone for ProfilePacket
Source§fn clone(&self) -> ProfilePacket
fn clone(&self) -> ProfilePacket
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProfilePacket
impl Debug for ProfilePacket
Source§impl Default for ProfilePacket
impl Default for ProfilePacket
Source§fn default() -> ProfilePacket
fn default() -> ProfilePacket
Source§impl Message for ProfilePacket
impl Message for ProfilePacket
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
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(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
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(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for ProfilePacket
impl PartialEq for ProfilePacket
impl StructuralPartialEq for ProfilePacket
Auto Trait Implementations§
impl Freeze for ProfilePacket
impl RefUnwindSafe for ProfilePacket
impl Send for ProfilePacket
impl Sync for ProfilePacket
impl Unpin for ProfilePacket
impl UnwindSafe for ProfilePacket
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].