1 2syntax = "proto2"; 3 4option java_package = "android.perfprofd"; 5 6package android.perfprofd; 7 8message PerfConfigElement { 9 repeated string counters = 1; 10 optional bool as_group = 2 [ default = false ]; 11 optional uint32 sampling_period = 3; 12}; 13 14// The configuration for a profiling session. 15message ProfilingConfig { 16 // Average number of seconds between perf profile collections (if 17 // set to 100, then over time we want to see a perf profile 18 // collected every 100 seconds). The actual time within the interval 19 // for the collection is chosen randomly. 20 optional uint32 collection_interval_in_s = 1; 21 22 // Use the specified fixed seed for random number generation (unit 23 // testing) 24 optional uint32 use_fixed_seed = 2; 25 26 // Number of times to iterate through main 27 // loop. Value of zero indicates that we should loop forever. 28 optional uint32 main_loop_iterations = 3; 29 30 // Destination directory (where to write profiles). 31 optional string destination_directory = 4; 32 // Config directory (where to read configs). 33 optional string config_directory = 5; 34 // Full path to 'perf' executable. 35 optional string perf_path = 6; 36 37 // Desired sampling period (passed to perf -c option). Small 38 // sampling periods can perturb the collected profiles, so enforce 39 // min/max. A value of 0 means perf default. sampling_frequency 40 // takes priority. 41 optional uint32 sampling_period = 7; 42 // Desired sampling frequency (passed to perf -f option). A value of 0 43 // means using sampling_period or default. 44 optional uint32 sampling_frequency = 22; 45 // Length of time to collect samples (number of seconds for 'perf 46 // record -a' run). 47 optional uint32 sample_duration_in_s = 8; 48 49 // If this parameter is non-zero it will cause perfprofd to 50 // exit immediately if the build type is not userdebug or eng. 51 // Currently defaults to 1 (true). 52 optional bool only_debug_build = 9; 53 54 // If the "mpdecision" service is running at the point we are ready 55 // to kick off a profiling run, then temporarily disable the service 56 // and hard-wire all cores on prior to the collection run, provided 57 // that the duration of the recording is less than or equal to the value of 58 // 'hardwire_cpus_max_duration'. 59 optional bool hardwire_cpus = 10; 60 optional uint32 hardwire_cpus_max_duration_in_s = 11; 61 62 // Maximum number of unprocessed profiles we can accumulate in the 63 // destination directory. Once we reach this limit, we continue 64 // to collect, but we just overwrite the most recent profile. 65 optional uint32 max_unprocessed_profiles = 12; 66 67 // If set to 1, pass the -g option when invoking 'perf' (requests 68 // stack traces as opposed to flat profile). 69 optional bool stack_profile = 13; 70 71 // Control collection of various additional profile tags 72 optional bool collect_cpu_utilization = 14; 73 optional bool collect_charging_state = 15; 74 optional bool collect_booting = 16; 75 optional bool collect_camera_active = 17; 76 77 // The pid of the process to profile. May be negative, in which case 78 // the whole system will be profiled. 79 optional int32 process = 18; 80 81 // Whether to use a symbolizer on-device. 82 optional bool use_elf_symbolizer = 19; 83 // Whether to symbolize everything. If false, objects with build ID will be skipped. 84 optional bool symbolize_everything = 25; 85 86 // Whether to send the result to dropbox. 87 optional bool send_to_dropbox = 20; 88 89 // If true, use libz to compress the output proto. 90 optional bool compress = 21; 91 92 // Whether to fail or strip unsupported events. 93 optional bool fail_on_unsupported_events = 24; 94 95 repeated PerfConfigElement event_config = 23; 96}; 97