pub struct VulkanMemoryEvent {Show 14 fields
pub source: Option<i32>,
pub operation: Option<i32>,
pub timestamp: Option<i64>,
pub pid: Option<u32>,
pub memory_address: Option<u64>,
pub memory_size: Option<u64>,
pub caller_iid: Option<u64>,
pub allocation_scope: Option<i32>,
pub annotations: Vec<VulkanMemoryEventAnnotation>,
pub device: Option<u64>,
pub device_memory: Option<u64>,
pub memory_type: Option<u32>,
pub heap: Option<u32>,
pub object_handle: Option<u64>,
}
Expand description
Each VulkanMemoryEvent encompasses information regarding one single function call that results in reserving, binding or freeing host or GPU memory. There is a special message type, ANNOTATIONS, which is used to communicate information that are not directly related to a memory event, nonetheless are essential to understand the memory usage. An example is the size and memory types of the memory heaps.
Next reserved id: 10 (up to 15). Next id: 21.
Fields§
§source: Option<i32>
§operation: Option<i32>
§timestamp: Option<i64>
§pid: Option<u32>
§memory_address: Option<u64>
§memory_size: Option<u64>
§caller_iid: Option<u64>
Interned string. Original string value is stored in function_names from protos/perfetto/trace/interned_data/interned_data.proto.
allocation_scope: Option<i32>
§annotations: Vec<VulkanMemoryEventAnnotation>
Extra related information, e.g., create configs, etc.
device: Option<u64>
Field IDs used for device memory (low sampling rate)
device_memory: Option<u64>
§memory_type: Option<u32>
§heap: Option<u32>
§object_handle: Option<u64>
Implementations§
Source§impl VulkanMemoryEvent
impl VulkanMemoryEvent
Sourcepub fn source(&self) -> Source
pub fn source(&self) -> Source
Returns the enum value of source
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_source(&mut self, value: Source)
pub fn set_source(&mut self, value: Source)
Sets source
to the provided enum value.
Sourcepub fn operation(&self) -> Operation
pub fn operation(&self) -> Operation
Returns the enum value of operation
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_operation(&mut self, value: Operation)
pub fn set_operation(&mut self, value: Operation)
Sets operation
to the provided enum value.
Sourcepub fn timestamp(&self) -> i64
pub fn timestamp(&self) -> i64
Returns the value of timestamp
, or the default value if timestamp
is unset.
Sourcepub fn memory_address(&self) -> u64
pub fn memory_address(&self) -> u64
Returns the value of memory_address
, or the default value if memory_address
is unset.
Sourcepub fn memory_size(&self) -> u64
pub fn memory_size(&self) -> u64
Returns the value of memory_size
, or the default value if memory_size
is unset.
Sourcepub fn caller_iid(&self) -> u64
pub fn caller_iid(&self) -> u64
Returns the value of caller_iid
, or the default value if caller_iid
is unset.
Sourcepub fn allocation_scope(&self) -> AllocationScope
pub fn allocation_scope(&self) -> AllocationScope
Returns the enum value of allocation_scope
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_allocation_scope(&mut self, value: AllocationScope)
pub fn set_allocation_scope(&mut self, value: AllocationScope)
Sets allocation_scope
to the provided enum value.
Sourcepub fn device(&self) -> u64
pub fn device(&self) -> u64
Returns the value of device
, or the default value if device
is unset.
Sourcepub fn device_memory(&self) -> u64
pub fn device_memory(&self) -> u64
Returns the value of device_memory
, or the default value if device_memory
is unset.
Sourcepub fn memory_type(&self) -> u32
pub fn memory_type(&self) -> u32
Returns the value of memory_type
, or the default value if memory_type
is unset.
Sourcepub fn object_handle(&self) -> u64
pub fn object_handle(&self) -> u64
Returns the value of object_handle
, or the default value if object_handle
is unset.
Trait Implementations§
Source§impl Clone for VulkanMemoryEvent
impl Clone for VulkanMemoryEvent
Source§fn clone(&self) -> VulkanMemoryEvent
fn clone(&self) -> VulkanMemoryEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for VulkanMemoryEvent
impl Debug for VulkanMemoryEvent
Source§impl Default for VulkanMemoryEvent
impl Default for VulkanMemoryEvent
Source§impl Message for VulkanMemoryEvent
impl Message for VulkanMemoryEvent
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
.