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 21// Used to trace the execution of perfetto itself. 22message PerfettoMetatrace { 23 // See base/metatrace_events.h for definitions. 24 oneof record_type { 25 uint32 event_id = 1; 26 uint32 counter_id = 2; 27 28 // For trace processor metatracing. 29 string event_name = 8; 30 string counter_name = 9; 31 } 32 message Arg { 33 optional string key = 1; 34 optional string value = 2; 35 } 36 37 // Only when using |event_id|. 38 optional uint32 event_duration_ns = 3; 39 40 // Only when using |counter_id|. 41 optional int32 counter_value = 4; 42 43 // ID of the thread that emitted the event. 44 optional uint32 thread_id = 5; 45 46 // If true the meta-tracing ring buffer had overruns and hence some data is 47 // missing from this point. 48 optional bool has_overruns = 6; 49 50 // Args for the event. 51 repeated Arg args = 7; 52} 53