/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ syntax = "proto2"; package perfetto.protos; message ProcessStatsConfig { enum Quirks { QUIRKS_UNSPECIFIED = 0; // This has been deprecated and ignored as per 2018-05-01. Full scan at // startup is now disabled by default and can be re-enabled using the // |scan_all_processes_on_start| arg. DISABLE_INITIAL_DUMP = 1 [deprecated = true]; DISABLE_ON_DEMAND = 2; } repeated Quirks quirks = 1; // If enabled all processes will be scanned and dumped when the trace starts. optional bool scan_all_processes_on_start = 2; // If enabled thread names are also recoded (this is redundant if sched_switch // is enabled). optional bool record_thread_names = 3; // If > 0 samples counters (see process_stats.proto) from // /proc/pid/status and oom_score_adj every X ms. // It will also sample /proc/pid/smaps_rollup if scan_smaps_rollup = true. // This is required to be > 100ms to avoid excessive CPU usage. optional uint32 proc_stats_poll_ms = 4; // id 5 never used // This is required to be either = 0 or a multiple of |proc_stats_poll_ms| // (default: |proc_stats_poll_ms|). If = 0, will be set to // |proc_stats_poll_ms|. Non-multiples will be rounded down to the nearest // multiple. optional uint32 proc_stats_cache_ttl_ms = 6; // Niche feature: If true this will resolve file descriptors for each process // so these can be mapped to their actual device or file. // Requires raw_syscalls/sys_{enter,exit} ftrace events to be enabled or // new fds opened after initially scanning a process will not be // recognized. optional bool resolve_process_fds = 9; // If true, output will include memory stats from /proc/pid/smaps_rollup. optional bool scan_smaps_rollup = 10; // If true: process descriptions will include process age (starttime in // /proc/pid/stat). // Introduced in: perfetto v44. optional bool record_process_age = 11; // If true and |proc_stats_poll_ms| is true, process stats will include time // spent running in user/kernel mode (utime/stime in /proc/pid/stat). // Introduced in: perfetto v44. optional bool record_process_runtime = 12; // record_thread_time_in_state reserved 7; // thread_time_in_state_cache_size reserved 8; }