That fuck shit the fascists are using
at master 151 lines 3.8 kB view raw
1/* 2 * Copyright (C) 2018 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 17 18syntax = "proto2"; 19 20package signal; 21 22option java_package = "org.signal.core.util.tracing"; 23option java_outer_classname = "TraceProtos"; 24 25/* 26 * Minimal interface needed to work with Perfetto. 27 * 28 * https://cs.android.com/android/platform/superproject/+/master:external/perfetto/protos/perfetto/trace/trace.proto 29 */ 30message Trace { 31 repeated TracePacket packet = 1; 32} 33 34message TracePacket { 35 optional uint64 timestamp = 8; 36 optional uint32 timestamp_clock_id = 58; 37 38 oneof data { 39 TrackEvent track_event = 11; 40 TrackDescriptor track_descriptor = 60; 41 bytes synchronization_marker = 36; 42 } 43 44 oneof optional_trusted_packet_sequence_id { 45 uint32 trusted_packet_sequence_id = 10; 46 } 47} 48 49message TrackEvent { 50 repeated uint64 category_iids = 3; 51 repeated string categories = 22; 52 53 repeated DebugAnnotation debug_annotations = 4; 54 55 oneof name_field { 56 uint64 name_iid = 10; 57 string name = 23; 58 } 59 60 enum Type { 61 TYPE_UNSPECIFIED = 0; 62 TYPE_SLICE_BEGIN = 1; 63 TYPE_SLICE_END = 2; 64 TYPE_INSTANT = 3; 65 TYPE_COUNTER = 4; 66 } 67 68 optional Type type = 9; 69 optional uint64 track_uuid = 11; 70 optional int64 counter_value = 30; 71 72 oneof timestamp { 73 int64 timestamp_delta_us = 1; 74 int64 timestamp_absolute_us = 16; 75 } 76 77 oneof thread_time { 78 int64 thread_time_delta_us = 2; 79 int64 thread_time_absolute_us = 17; 80 } 81} 82 83message TrackDescriptor { 84 optional uint64 uuid = 1; 85 optional uint64 parent_uuid = 5; 86 optional string name = 2; 87 optional ThreadDescriptor thread = 4; 88 optional CounterDescriptor counter = 8; 89} 90 91 92message ThreadDescriptor { 93 optional int32 pid = 1; 94 optional int32 tid = 2; 95 96 optional string thread_name = 5; 97} 98 99message CounterDescriptor { 100 enum BuiltinCounterType { 101 COUNTER_UNSPECIFIED = 0; 102 COUNTER_THREAD_TIME_NS = 1; 103 COUNTER_THREAD_INSTRUCTION_COUNT = 2; 104 } 105 106 enum Unit { 107 UNIT_UNSPECIFIED = 0; 108 UNIT_TIME_NS = 1; 109 UNIT_COUNT = 2; 110 UNIT_SIZE_BYTES = 3; 111 } 112 optional BuiltinCounterType type = 1; 113 repeated string categories = 2; 114 optional Unit unit = 3; 115 optional int64 unit_multiplier = 4; 116 optional bool is_incremental = 5; 117} 118 119message DebugAnnotation { 120 message NestedValue { 121 enum NestedType { 122 UNSPECIFIED = 0; 123 DICT = 1; 124 ARRAY = 2; 125 } 126 127 optional NestedType nested_type = 1; 128 repeated string dict_keys = 2; 129 repeated NestedValue dict_values = 3; 130 repeated NestedValue array_values = 4; 131 optional int64 int_value = 5; 132 optional double double_value = 6; 133 optional bool bool_value = 7; 134 optional string string_value = 8; 135 } 136 137 oneof name_field { 138 uint64 name_iid = 1; 139 string name = 10; 140 } 141 142 oneof value { 143 bool bool_value = 2; 144 uint64 uint_value = 3; 145 int64 int_value = 4; 146 double double_value = 5; 147 string string_value = 6; 148 uint64 pointer_value = 7; 149 NestedValue nested_value = 8; 150 } 151}