perfetto-protos
Version:
Perfetto protos exposed via protobuf-es for browser and node
284 lines • 10.3 kB
TypeScript
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
import type { Message } from "@bufbuild/protobuf";
/**
* Describes the file protos/perfetto/config/profiling/heapprofd_config.proto.
*/
export declare const file_protos_perfetto_config_profiling_heapprofd_config: GenFile;
/**
* Configuration for go/heapprofd.
* Next id: 28
*
* @generated from message perfetto.protos.HeapprofdConfig
*/
export type HeapprofdConfig = Message<"perfetto.protos.HeapprofdConfig"> & {
/**
* Sampling rate for all heaps not specified via heap_sampling_intervals.
*
* These are:
* * All heaps if heap_sampling_intervals is empty.
* * Those profiled due to all_heaps and not named in heaps if
* heap_sampling_intervals is not empty.
* * The implicit libc.malloc heap if heaps is empty.
*
* Set to 1 for perfect accuracy.
* Otherwise, sample every sample_interval_bytes on average.
*
* See
* https://perfetto.dev/docs/data-sources/native-heap-profiler#sampling-interval
* for more details.
*
* BUGS
* Before Android 12, setting this to 0 would crash the target process.
*
* N.B. This must be explicitly set to a non-zero value for all heaps (with
* this field or with heap_sampling_intervals), otherwise the producer will
* not start.
*
* @generated from field: optional uint64 sampling_interval_bytes = 1;
*/
samplingIntervalBytes: bigint;
/**
* If less than the given numbers of bytes are left free in the shared
* memory buffer, increase sampling interval by a factor of two.
* Adaptive sampling is disabled when set to 0.
*
* @generated from field: optional uint64 adaptive_sampling_shmem_threshold = 24;
*/
adaptiveSamplingShmemThreshold: bigint;
/**
* Stop doubling the sampling_interval once the sampling interval has reached
* this value.
*
* @generated from field: optional uint64 adaptive_sampling_max_sampling_interval_bytes = 25;
*/
adaptiveSamplingMaxSamplingIntervalBytes: bigint;
/**
* E.g. surfaceflinger, com.android.phone
* This input is normalized in the following way: if it contains slashes,
* everything up to the last slash is discarded. If it contains "@",
* everything after the first @ is discared.
* E.g. /system/bin/surfaceflinger@1.0 normalizes to surfaceflinger.
* This transformation is also applied to the processes' command lines when
* matching.
*
* @generated from field: repeated string process_cmdline = 2;
*/
processCmdline: string[];
/**
* For watermark based triggering or local debugging.
*
* @generated from field: repeated uint64 pid = 4;
*/
pid: bigint[];
/**
* 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+.
*
* @generated from field: repeated string target_installed_by = 26;
*/
targetInstalledBy: string[];
/**
* Which heaps to sample, e.g. "libc.malloc". If left empty, only samples
* "malloc".
*
* Introduced in Android 12.
*
* @generated from field: repeated string heaps = 20;
*/
heaps: string[];
/**
* Which heaps not to sample, e.g. "libc.malloc". This is useful when used in
* combination with all_heaps;
*
* Introduced in Android 12.
*
* @generated from field: repeated string exclude_heaps = 27;
*/
excludeHeaps: string[];
/**
* @generated from field: optional bool stream_allocations = 23;
*/
streamAllocations: boolean;
/**
* If given, needs to be the same length as heaps and gives the sampling
* interval for the respective entry in heaps.
*
* Otherwise, sampling_interval_bytes is used.
*
* It is recommended to set sampling_interval_bytes to a reasonable default
* value when using this, as a value of 0 for sampling_interval_bytes will
* crash the target process before Android 12.
*
* Introduced in Android 12.
*
* All values must be non-zero or the producer will not start.
*
* @generated from field: repeated uint64 heap_sampling_intervals = 22;
*/
heapSamplingIntervals: bigint[];
/**
* Sample all heaps registered by target process. Introduced in Android 12.
*
* @generated from field: optional bool all_heaps = 21;
*/
allHeaps: boolean;
/**
* Profile all processes eligible for profiling on the system.
* See
* https://perfetto.dev/docs/data-sources/native-heap-profiler#heapprofd-targets
* for which processes are eligible.
*
* On unmodified userdebug builds, this will lead to system crashes. Zygote
* will crash when trying to launch a new process as it will have an
* unexpected open socket to heapprofd.
*
* heapprofd will likely be overloaded by the amount of data for low
* sampling intervals.
*
* @generated from field: optional bool all = 5;
*/
all: boolean;
/**
* Do not profile processes whose anon RSS + swap < given value.
* Introduced in Android 11.
*
* @generated from field: optional uint32 min_anonymous_memory_kb = 15;
*/
minAnonymousMemoryKb: number;
/**
* Stop profile if heapprofd memory usage goes beyond the given value.
* Introduced in Android 11.
*
* @generated from field: optional uint32 max_heapprofd_memory_kb = 16;
*/
maxHeapprofdMemoryKb: number;
/**
* Stop profile if heapprofd CPU time since start of this data-source
* goes beyond given value.
* Introduced in Android 11.
*
* @generated from field: optional uint64 max_heapprofd_cpu_secs = 17;
*/
maxHeapprofdCpuSecs: bigint;
/**
* Do not emit function names for mappings starting with this prefix.
* E.g. /system to not emit symbols for any system libraries.
*
* @generated from field: repeated string skip_symbol_prefix = 7;
*/
skipSymbolPrefix: string[];
/**
* Dump at a predefined interval.
*
* @generated from field: optional perfetto.protos.HeapprofdConfig.ContinuousDumpConfig continuous_dump_config = 6;
*/
continuousDumpConfig?: HeapprofdConfig_ContinuousDumpConfig;
/**
* Size of the shared memory buffer between the profiled processes and
* heapprofd. Defaults to 8 MiB. If larger than 500 MiB, truncated to 500
* MiB.
*
* Needs to be:
* * at least 8192,
* * a power of two,
* * a multiple of 4096.
*
* @generated from field: optional uint64 shmem_size_bytes = 8;
*/
shmemSizeBytes: bigint;
/**
* When the shmem buffer is full, block the client instead of ending the
* trace. Use with caution as this will significantly slow down the target
* process.
*
* @generated from field: optional bool block_client = 9;
*/
blockClient: boolean;
/**
* If set, stop the trace session after blocking the client for this
* timeout. Needs to be larger than 100 us, otherwise no retries are done.
* Introduced in Android 11.
*
* @generated from field: optional uint32 block_client_timeout_us = 14;
*/
blockClientTimeoutUs: number;
/**
* Do not profile processes from startup, only match already running
* processes.
*
* Can not be set at the same time as no_running.
* Introduced in Android 11.
*
* @generated from field: optional bool no_startup = 10;
*/
noStartup: boolean;
/**
* Do not profile running processes. Only match processes on startup.
*
* Can not be set at the same time as no_startup.
* Introduced in Android 11.
*
* @generated from field: optional bool no_running = 11;
*/
noRunning: boolean;
/**
* Cause heapprofd to emit a single dump at the end, showing the memory usage
* at the point in time when the sampled heap usage of the process was at its
* maximum. This causes ProfilePacket.HeapSample.self_max to be set, and
* self_allocated and self_freed to not be set.
* Introduced in Android 11.
*
* @generated from field: optional bool dump_at_max = 13;
*/
dumpAtMax: boolean;
/**
* Escape hatch if the session is being torn down because of a forked child
* that shares memory space, but is not correctly identified as a vforked
* child.
* Introduced in Android 11.
*
* @generated from field: optional bool disable_fork_teardown = 18;
*/
disableForkTeardown: boolean;
/**
* We try to automatically detect when a target applicatation vforks but then
* does a memory allocation (or free). This auto-detection can be disabled
* with this.
* Introduced in Android 11.
*
* @generated from field: optional bool disable_vfork_detection = 19;
*/
disableVforkDetection: boolean;
};
/**
* Describes the message perfetto.protos.HeapprofdConfig.
* Use `create(HeapprofdConfigSchema)` to create a new message.
*/
export declare const HeapprofdConfigSchema: GenMessage<HeapprofdConfig>;
/**
* @generated from message perfetto.protos.HeapprofdConfig.ContinuousDumpConfig
*/
export type HeapprofdConfig_ContinuousDumpConfig = Message<"perfetto.protos.HeapprofdConfig.ContinuousDumpConfig"> & {
/**
* ms to wait before first dump.
*
* @generated from field: optional uint32 dump_phase_ms = 5;
*/
dumpPhaseMs: number;
/**
* ms to wait between following dumps.
*
* @generated from field: optional uint32 dump_interval_ms = 6;
*/
dumpIntervalMs: number;
};
/**
* Describes the message perfetto.protos.HeapprofdConfig.ContinuousDumpConfig.
* Use `create(HeapprofdConfig_ContinuousDumpConfigSchema)` to create a new message.
*/
export declare const HeapprofdConfig_ContinuousDumpConfigSchema: GenMessage<HeapprofdConfig_ContinuousDumpConfig>;
//# sourceMappingURL=heapprofd_config_pb.d.ts.map