pub struct JavaHprofConfig {
pub process_cmdline: Vec<String>,
pub pid: Vec<u64>,
pub target_installed_by: Vec<String>,
pub continuous_dump_config: Option<ContinuousDumpConfig>,
pub min_anonymous_memory_kb: Option<u32>,
pub dump_smaps: Option<bool>,
pub ignored_types: Vec<String>,
}
Expand description
Configuration for managed app heap graph snapshots.
Fields§
§process_cmdline: Vec<String>
Command line allowlist, matched against the /proc/
On Android T+ (13+), this field can specify a single wildcard (*), and the profiler will attempt to match it in two possible ways:
- if the pattern starts with a ‘/’, then it is matched against the first segment of the cmdline (i.e. argv0). For example “/bin/e*” would match “/bin/echo”.
- otherwise the pattern is matched against the part of argv0 corresponding to the binary name (this is unrelated to /proc/pid/exe). For example “echo” would match “/bin/echo”.
On Android S (12) and below, both this pattern and /proc/pid/cmdline get normalized prior to an exact string comparison. Normalization is as follows: (1) trim everything beyond the first null or “@” byte; (2) if the string contains forward slashes, trim everything up to and including the last one.
Implementation note: in either case, at most 511 characters of cmdline are considered.
pid: Vec<u64>
For watermark based triggering or local debugging.
target_installed_by: Vec<String>
Only profile target if it was installed by one of the packages given. Special values are:
- @system: installed on the system partition
- @product: installed on the product partition
- @null: sideloaded Supported on Android 12+.
continuous_dump_config: Option<ContinuousDumpConfig>
Dump at a predefined interval.
min_anonymous_memory_kb: Option<u32>
Do not profile processes whose anon RSS + swap < given value.
dump_smaps: Option<bool>
Include the process’ /proc/self/smaps. This only shows maps that:
- start with /system
- start with /vendor
- start with /data/app
- contain “extracted in memory from Y”, where Y matches any of the above
ignored_types: Vec<String>
Exclude objects of the following types from the profile. This can be useful if lots of uninteresting objects, e.g. “sun.misc.Cleaner”.
Implementations§
Source§impl JavaHprofConfig
impl JavaHprofConfig
Sourcepub fn min_anonymous_memory_kb(&self) -> u32
pub fn min_anonymous_memory_kb(&self) -> u32
Returns the value of min_anonymous_memory_kb
, or the default value if min_anonymous_memory_kb
is unset.
Sourcepub fn dump_smaps(&self) -> bool
pub fn dump_smaps(&self) -> bool
Returns the value of dump_smaps
, or the default value if dump_smaps
is unset.
Trait Implementations§
Source§impl Clone for JavaHprofConfig
impl Clone for JavaHprofConfig
Source§fn clone(&self) -> JavaHprofConfig
fn clone(&self) -> JavaHprofConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for JavaHprofConfig
impl Debug for JavaHprofConfig
Source§impl Default for JavaHprofConfig
impl Default for JavaHprofConfig
Source§impl Message for JavaHprofConfig
impl Message for JavaHprofConfig
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
.