| // AUTOGENERATED - DO NOT EDIT |
| // --------------------------- |
| // This file has been generated by |
| // AOSP://external/perfetto/tools/gen_merged_trace_config |
| // merging the perfetto config protos. |
| // This fused proto is intended to be copied in: |
| // - Android tree, for statsd. |
| // - Google internal repos. |
| |
| syntax = "proto2"; |
| |
| package perfetto.protos; |
| |
| // Begin of protos/perfetto/config/chrome/chrome_config.proto |
| |
| // When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py |
| // to reflect changes in the corresponding C++ headers. |
| |
| message ChromeConfig { |
| optional string trace_config = 1; |
| } |
| |
| // End of protos/perfetto/config/chrome/chrome_config.proto |
| |
| // Begin of protos/perfetto/config/data_source_config.proto |
| |
| // When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py |
| // to reflect changes in the corresponding C++ headers. |
| |
| // The configuration that is passed to each data source when starting tracing. |
| message DataSourceConfig { |
| // Data source unique name, e.g., "org.chromium.trace_events". This must match |
| // the name passed by the data source when it registers (see |
| // RegisterDataSource()). |
| optional string name = 1; |
| |
| // The index of the logging buffer where TracePacket(s) will be stored. |
| // This field doesn't make a major difference for the Producer(s). The final |
| // logging buffers, in fact, are completely owned by the Service. We just ask |
| // the Producer to copy this number into the chunk headers it emits, so that |
| // the Service can quickly identify the buffer where to move the chunks into |
| // without expensive lookups on its fastpath. |
| optional uint32 target_buffer = 2; |
| |
| // Gets set by the service to indicate the duration of the trace. |
| // DO NOT SET in consumer as this will be overridden by the service. |
| optional uint32 trace_duration_ms = 3; |
| |
| // Keeep the lower IDs (up to 99) for fields that are *not* specific to |
| // data-sources and needs to be processed by the traced daemon. |
| |
| optional FtraceConfig ftrace_config = 100; |
| optional ChromeConfig chrome_config = 101; |
| |
| // This field is only used for testing. |
| optional TestConfig for_testing = |
| 536870911; // 2^29 - 1, max field id for protos. |
| } |
| |
| // End of protos/perfetto/config/data_source_config.proto |
| |
| // Begin of protos/perfetto/config/ftrace/ftrace_config.proto |
| |
| // When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py |
| // to reflect changes in the corresponding C++ headers. |
| |
| message FtraceConfig { |
| repeated string ftrace_events = 1; |
| repeated string atrace_categories = 2; |
| repeated string atrace_apps = 3; |
| // *Per-CPU* buffer size. |
| optional uint32 buffer_size_kb = 10; |
| optional uint32 drain_period_ms = 11; |
| } |
| |
| // End of protos/perfetto/config/ftrace/ftrace_config.proto |
| |
| // Begin of protos/perfetto/config/test_config.proto |
| |
| // When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py |
| // to reflect changes in the corresponding C++ headers. |
| |
| // The configuration for a fake producer used in tests. |
| message TestConfig { |
| // The number of messages the fake producer should send. |
| optional uint32 message_count = 1; |
| |
| // The seed value for a simple multiplicative congruential pseudo-random |
| // number sequence. |
| optional uint32 seed = 2; |
| |
| // The size of each message in bytes. Should be greater than or equal 5 to |
| // account for the number of bytes needed to encode the random number and a |
| // null byte for the string. |
| optional uint64 message_size = 3; |
| } |
| |
| // End of protos/perfetto/config/test_config.proto |
| |
| // Begin of protos/perfetto/config/trace_config.proto |
| |
| // When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py |
| // to reflect changes in the corresponding C++ headers. |
| |
| // The overall config that is used when starting a new tracing session through |
| // ProducerPort::StartTracing(). |
| // It contains the general config for the logging buffer(s) and the configs for |
| // all the data source being enabled. |
| // |
| // Next id: 8. |
| message TraceConfig { |
| message BufferConfig { |
| optional uint32 size_kb = 1; |
| |
| reserved 2; // |page_size|, now deprecated. |
| reserved 3; // |optimize_for|, now deprecated. |
| |
| enum FillPolicy { |
| UNSPECIFIED = 0; |
| RING_BUFFER = 1; |
| // TODO: not implemented yet. |
| // STOP_WHEN_FULL = 2; |
| } |
| optional FillPolicy fill_policy = 4; |
| } |
| repeated BufferConfig buffers = 1; |
| |
| message DataSource { |
| // Filters and data-source specific config. It contains also the unique name |
| // of the data source, the one passed in the DataSourceDescriptor when they |
| // register on the service. |
| optional protos.DataSourceConfig config = 1; |
| |
| // Optional. If multiple producers (~processes) expose the same data source |
| // and |producer_name_filter| != "", the data source is enabled only for |
| // producers whose names match any of the producer_name_filter below. |
| // The |producer_name_filter| has to be an exact match. (TODO: |
| // support wildcards or regex). |
| // This allows to enable a data source only for specific processes. |
| // The "repeated" field has OR sematics: specifying a filter ["foo", "bar"] |
| // will enable data source on both "foo" and "bar" (if existent). |
| repeated string producer_name_filter = 2; |
| } |
| repeated DataSource data_sources = 2; |
| |
| optional uint32 duration_ms = 3; |
| |
| // This is set when --dropbox is passed to the Perfetto command line client |
| // and enables guardrails that limit resource usage for traces requested |
| // by statsd. |
| optional bool enable_extra_guardrails = 4; |
| |
| enum LockdownModeOperation { |
| LOCKDOWN_UNCHANGED = 0; |
| LOCKDOWN_CLEAR = 1; |
| LOCKDOWN_SET = 2; |
| } |
| // Reject producers that are not running under the same UID as the tracing |
| // service. |
| optional LockdownModeOperation lockdown_mode = 5; |
| |
| message ProducerConfig { |
| // Identifies the producer for which this config is for. |
| optional string producer_name = 1; |
| |
| // Specifies the preferred size of the shared memory buffer. If the size is |
| // larger than the max size, the max will be used. If it is smaller than |
| // the page size or doesn't fit pages evenly into it, it will fall back to |
| // the size specified by the producer or finally the default shared memory |
| // size. |
| optional uint32 shm_size_kb = 2; |
| |
| // Specifies the preferred size of each page in the shared memory buffer. |
| // Must be an integer mutiple of 4K. |
| optional uint32 page_size_kb = 3; |
| } |
| |
| repeated ProducerConfig producers = 6; |
| |
| // Contains statsd-specific metadata about an alert associated with the trace. |
| message StatsdMetadata { |
| // The identifier of the alert which triggered this trace. |
| optional int64 triggering_alert_id = 1; |
| // The uid which registered the triggering configuration with statsd. |
| optional int32 triggering_config_uid = 2; |
| // The identifier of the config which triggered the alert. |
| optional int64 triggering_config_id = 3; |
| } |
| |
| // Statsd-specific metadata. |
| optional StatsdMetadata statsd_metadata = 7; |
| |
| // When true, the EnableTracing() request must also provide a file descriptor. |
| // The service will then periodically read packets out of the trace buffer and |
| // store it into the passed file. |
| optional bool write_into_file = 8; |
| |
| // Optional. If non-zero tunes the write period. A min value of 100ms is |
| // enforced (i.e. smaller values are ignored). |
| optional uint32 file_write_period_ms = 9; |
| |
| // Optional. When non zero the periodic write stops once at most X bytes |
| // have been written into the file. Tracing is disabled when this limit is |
| // reached, even if |duration_ms| has not been reached yet. |
| optional uint64 max_file_size_bytes = 10; |
| } |
| |
| // End of protos/perfetto/config/trace_config.proto |