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