1/* 2 * Copyright (C) 2019 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/data_source_descriptor.proto"; 22 23// Reports the state of the tracing service. Used to gather details about the 24// data sources connected. 25// See ConsumerPort::QueryServiceState(). 26message TracingServiceState { 27 // Describes a producer process. 28 message Producer { 29 // Unique ID of the producer (monotonic counter). 30 optional int32 id = 1; 31 32 // Typically matches the process name. 33 optional string name = 2; 34 35 // Unix uid of the remote process. 36 optional int32 uid = 3; 37 38 // The version of the client library used by the producer. 39 // This is a human readable string with and its format varies depending on 40 // the build system and the repo (standalone vs AOSP). 41 // This is intended for human debugging only. 42 optional string sdk_version = 4; 43 } 44 45 // Describes a data source registered by a producer. Data sources are listed 46 // regardless of the fact that they are being used or not. 47 message DataSource { 48 // Descriptor passed by the data source when calling RegisterDataSource(). 49 optional DataSourceDescriptor ds_descriptor = 1; 50 51 // ID of the producer, as per Producer.id. 52 optional int32 producer_id = 2; 53 } 54 55 // Lists all the producers connected. 56 repeated Producer producers = 1; 57 58 // Lists the data sources available. 59 repeated DataSource data_sources = 2; 60 61 // Total number of tracing sessions. 62 optional int32 num_sessions = 3; 63 64 // Number of tracing sessions in the started state. Always <= num_sessions. 65 optional int32 num_sessions_started = 4; 66 67 // The version of traced (the same returned by `traced --version`). 68 // This is a human readable string with and its format varies depending on 69 // the build system and the repo (standalone vs AOSP). 70 // This is intended for human debugging only. 71 optional string tracing_service_version = 5; 72} 73