Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
Josh Gao | d3df0ae | 2021-02-01 14:35:30 -0800 | [diff] [blame] | 3 | option java_package = "com.android.server.os"; |
| 4 | option java_outer_classname = "TombstoneProtos"; |
| 5 | |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 6 | // NOTE TO OEMS: |
| 7 | // If you add custom fields to this proto, do not use numbers in the reserved range. |
| 8 | |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 9 | message Tombstone { |
| 10 | Architecture arch = 1; |
| 11 | string build_fingerprint = 2; |
| 12 | string revision = 3; |
| 13 | string timestamp = 4; |
| 14 | |
| 15 | uint32 pid = 5; |
| 16 | uint32 tid = 6; |
| 17 | uint32 uid = 7; |
| 18 | string selinux_label = 8; |
| 19 | |
| 20 | string process_name = 9; |
| 21 | |
| 22 | Signal signal_info = 10; |
| 23 | string abort_message = 14; |
Peter Collingbourne | 1a1f7d7 | 2021-03-08 16:53:54 -0800 | [diff] [blame] | 24 | repeated Cause causes = 15; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 25 | |
| 26 | map<uint32, Thread> threads = 16; |
| 27 | repeated MemoryMapping memory_mappings = 17; |
| 28 | repeated LogBuffer log_buffers = 18; |
| 29 | repeated FD open_fds = 19; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 30 | |
| 31 | reserved 20 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | enum Architecture { |
| 35 | ARM32 = 0; |
| 36 | ARM64 = 1; |
| 37 | X86 = 2; |
| 38 | X86_64 = 3; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 39 | |
| 40 | reserved 4 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | message Signal { |
| 44 | int32 number = 1; |
| 45 | string name = 2; |
| 46 | |
| 47 | int32 code = 3; |
| 48 | string code_name = 4; |
| 49 | |
| 50 | bool has_sender = 5; |
| 51 | int32 sender_uid = 6; |
| 52 | int32 sender_pid = 7; |
| 53 | |
| 54 | bool has_fault_address = 8; |
| 55 | uint64 fault_address = 9; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 56 | |
| 57 | reserved 10 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 58 | } |
| 59 | |
Peter Collingbourne | 1a1f7d7 | 2021-03-08 16:53:54 -0800 | [diff] [blame] | 60 | message HeapObject { |
| 61 | uint64 address = 1; |
| 62 | uint64 size = 2; |
| 63 | |
| 64 | uint64 allocation_tid = 3; |
| 65 | repeated BacktraceFrame allocation_backtrace = 4; |
| 66 | |
| 67 | uint64 deallocation_tid = 5; |
| 68 | repeated BacktraceFrame deallocation_backtrace = 6; |
| 69 | } |
| 70 | |
| 71 | message MemoryError { |
| 72 | enum Tool { |
| 73 | GWP_ASAN = 0; |
| 74 | SCUDO = 1; |
| 75 | |
| 76 | reserved 2 to 999; |
| 77 | } |
| 78 | Tool tool = 1; |
| 79 | |
| 80 | enum Type { |
| 81 | UNKNOWN = 0; |
| 82 | USE_AFTER_FREE = 1; |
| 83 | DOUBLE_FREE = 2; |
| 84 | INVALID_FREE = 3; |
| 85 | BUFFER_OVERFLOW = 4; |
| 86 | BUFFER_UNDERFLOW = 5; |
| 87 | |
| 88 | reserved 6 to 999; |
| 89 | } |
| 90 | Type type = 2; |
| 91 | |
| 92 | oneof location { |
| 93 | HeapObject heap = 3; |
| 94 | } |
| 95 | |
| 96 | reserved 4 to 999; |
| 97 | } |
| 98 | |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 99 | message Cause { |
| 100 | string human_readable = 1; |
Peter Collingbourne | 1a1f7d7 | 2021-03-08 16:53:54 -0800 | [diff] [blame] | 101 | oneof details { |
| 102 | MemoryError memory_error = 2; |
| 103 | } |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 104 | |
Peter Collingbourne | 1a1f7d7 | 2021-03-08 16:53:54 -0800 | [diff] [blame] | 105 | reserved 3 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 106 | } |
| 107 | |
| 108 | message Register { |
| 109 | string name = 1; |
| 110 | uint64 u64 = 2; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 111 | |
| 112 | reserved 3 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 113 | } |
| 114 | |
| 115 | message Thread { |
| 116 | int32 id = 1; |
| 117 | string name = 2; |
| 118 | repeated Register registers = 3; |
| 119 | repeated BacktraceFrame current_backtrace = 4; |
| 120 | repeated MemoryDump memory_dump = 5; |
Peter Collingbourne | 1a1f7d7 | 2021-03-08 16:53:54 -0800 | [diff] [blame] | 121 | int64 tagged_addr_ctrl = 6; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 122 | |
Peter Collingbourne | 1a1f7d7 | 2021-03-08 16:53:54 -0800 | [diff] [blame] | 123 | reserved 7 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 124 | } |
| 125 | |
| 126 | message BacktraceFrame { |
| 127 | uint64 rel_pc = 1; |
| 128 | uint64 pc = 2; |
| 129 | uint64 sp = 3; |
| 130 | |
| 131 | string function_name = 4; |
| 132 | uint64 function_offset = 5; |
| 133 | |
| 134 | string file_name = 6; |
| 135 | uint64 file_map_offset = 7; |
| 136 | string build_id = 8; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 137 | |
| 138 | reserved 9 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 139 | } |
| 140 | |
| 141 | message MemoryDump { |
| 142 | string register_name = 1; |
| 143 | string mapping_name = 2; |
| 144 | uint64 begin_address = 3; |
| 145 | bytes memory = 4; |
Peter Collingbourne | 1a1f7d7 | 2021-03-08 16:53:54 -0800 | [diff] [blame] | 146 | bytes tags = 5; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 147 | |
Peter Collingbourne | 1a1f7d7 | 2021-03-08 16:53:54 -0800 | [diff] [blame] | 148 | reserved 6 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 149 | } |
| 150 | |
| 151 | message MemoryMapping { |
| 152 | uint64 begin_address = 1; |
| 153 | uint64 end_address = 2; |
| 154 | uint64 offset = 3; |
| 155 | |
| 156 | bool read = 4; |
| 157 | bool write = 5; |
| 158 | bool execute = 6; |
| 159 | |
| 160 | string mapping_name = 7; |
| 161 | string build_id = 8; |
| 162 | uint64 load_bias = 9; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 163 | |
| 164 | reserved 10 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 165 | } |
| 166 | |
| 167 | message FD { |
| 168 | int32 fd = 1; |
| 169 | string path = 2; |
| 170 | string owner = 3; |
| 171 | uint64 tag = 4; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 172 | |
| 173 | reserved 5 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 174 | } |
| 175 | |
| 176 | message LogBuffer { |
| 177 | string name = 1; |
| 178 | repeated LogMessage logs = 2; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 179 | |
| 180 | reserved 3 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 181 | } |
| 182 | |
| 183 | message LogMessage { |
| 184 | string timestamp = 1; |
| 185 | uint32 pid = 2; |
| 186 | uint32 tid = 3; |
| 187 | uint32 priority = 4; |
| 188 | string tag = 5; |
| 189 | string message = 6; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 190 | |
| 191 | reserved 7 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 192 | } |