pub struct InitializeConnectionRequest {
pub shared_memory_page_size_hint_bytes: Option<u32>,
pub shared_memory_size_hint_bytes: Option<u32>,
pub producer_name: Option<String>,
pub smb_scraping_mode: Option<i32>,
pub producer_provided_shmem: Option<bool>,
pub sdk_version: Option<String>,
pub shm_key_windows: Option<String>,
}
Expand description
Arguments for rpc InitializeConnection().
Fields§
Optional. Provides a hint to the tracing service about the suggested size of the shared memory buffer pages. The service is not required to respect this if it has already another value in the configuration or if the hint is unreasonably large. Must be an integer multiple of 4096. See tradeoff considerations in shared_memory_abi.h.
Optional. Provides a hint to the tracing service about the suggested size of the shared memory buffer. The service is not required to respect this and might return a smaller buffer.
producer_name: Option<String>
Required to match the producer config set by the service to the correct producer.
smb_scraping_mode: Option<i32>
If provided, overrides the service’s SMB scraping setting for the producer.
producer_provided_shmem: Option<bool>
Since Android R, this request can also transport an FD for the producer’s shared memory buffer, if allocated by the producer (e.g. for startup tracing). In this case, |shared_memory_page_size_hint_bytes| is a required field, and describes the SMB’s page size. Note that the service may not accept this SMB (e.g. because it is too old or its size / page size are invalid) and instead allocate a new SMB which is provided in the SetupTracing response. See TracingService::ConnectProducer() and |using_shmem_provided_by_producer| in InitializeConnectionResponse.
sdk_version: Option<String>
The version of the client library used by the producer. This is a human readable string with and its format varies depending on the build system that is used to build the code and the repo (standalone vs AOSP). This is intended for human debugging only.
shm_key_windows: Option<String>
On Windows, when producer_provided_shmem = true, the client creates a named SHM region and passes the name (an unguessable token) back to the service. Introduced in v13.
Implementations§
Source§impl InitializeConnectionRequest
impl InitializeConnectionRequest
Returns the value of shared_memory_page_size_hint_bytes
, or the default value if shared_memory_page_size_hint_bytes
is unset.
Returns the value of shared_memory_size_hint_bytes
, or the default value if shared_memory_size_hint_bytes
is unset.
Sourcepub fn producer_name(&self) -> &str
pub fn producer_name(&self) -> &str
Returns the value of producer_name
, or the default value if producer_name
is unset.
Sourcepub fn smb_scraping_mode(&self) -> ProducerSmbScrapingMode
pub fn smb_scraping_mode(&self) -> ProducerSmbScrapingMode
Returns the enum value of smb_scraping_mode
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_smb_scraping_mode(&mut self, value: ProducerSmbScrapingMode)
pub fn set_smb_scraping_mode(&mut self, value: ProducerSmbScrapingMode)
Sets smb_scraping_mode
to the provided enum value.
Sourcepub fn producer_provided_shmem(&self) -> bool
pub fn producer_provided_shmem(&self) -> bool
Returns the value of producer_provided_shmem
, or the default value if producer_provided_shmem
is unset.
Sourcepub fn shm_key_windows(&self) -> &str
pub fn shm_key_windows(&self) -> &str
Returns the value of shm_key_windows
, or the default value if shm_key_windows
is unset.
Sourcepub fn sdk_version(&self) -> &str
pub fn sdk_version(&self) -> &str
Returns the value of sdk_version
, or the default value if sdk_version
is unset.
Trait Implementations§
Source§impl Clone for InitializeConnectionRequest
impl Clone for InitializeConnectionRequest
Source§fn clone(&self) -> InitializeConnectionRequest
fn clone(&self) -> InitializeConnectionRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for InitializeConnectionRequest
impl Debug for InitializeConnectionRequest
Source§impl Message for InitializeConnectionRequest
impl Message for InitializeConnectionRequest
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
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<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
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<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
.