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