• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19package perfetto.protos;
20
21import "protos/perfetto/common/ftrace_descriptor.proto";
22import "protos/perfetto/common/gpu_counter_descriptor.proto";
23import "protos/perfetto/common/track_event_descriptor.proto";
24
25// This message is sent from Producer(s) to the tracing Service when registering
26// to advertise their capabilities. It describes the structure of tracing
27// protos that will be produced by the data source and the supported filters.
28message DataSourceDescriptor {
29  // e.g., "linux.ftrace", "chromium.tracing"
30  optional string name = 1;
31
32  // When non-zero, this is a unique ID within the scope of the Producer for
33  // this data source (it is NOT globally unique). This is useful to
34  // differentiate between data sources with matching names when calling
35  // UpdateDataSource(). This field has been introduced in November 2021
36  // (v22, Android T) and is not supported on older versions.
37  optional uint64 id = 7;
38
39  // When true the data source is expected to ack the stop request through the
40  // NotifyDataSourceStopped() IPC. This field has been introduced after
41  // Android P in Jul 2018 and is not supported on older versions.
42  optional bool will_notify_on_stop = 2;
43
44  // When true the data source is expected to ack the start request through the
45  // NotifyDataSourceStarted() IPC. This field has been introduced after
46  // Android P in March 2019 and is not supported on older versions.
47  optional bool will_notify_on_start = 3;
48
49  // If true, opt into receiving the ClearIncrementalState() IPC. This should be
50  // set if the data source writes packets that refer to previous trace
51  // contents, and knows how to stop referring to the already-emitted data.
52  optional bool handles_incremental_state_clear = 4;
53
54  // Optional specification about available GPU counters.
55  optional GpuCounterDescriptor gpu_counter_descriptor = 5 [lazy = true];
56
57  optional TrackEventDescriptor track_event_descriptor = 6 [lazy = true];
58
59  optional FtraceDescriptor ftrace_descriptor = 8 [lazy = true];
60}
61