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