blob: 433c406acc82bc87fca97846c1f9c17eb9ced274 [file] [log] [blame]
Josh Gao76e1e302021-01-26 15:53:11 -08001syntax = "proto3";
2
Josh Gaod3df0ae2021-02-01 14:35:30 -08003option java_package = "com.android.server.os";
4option java_outer_classname = "TombstoneProtos";
5
Josh Gaofc4fb212021-02-10 16:59:50 -08006// NOTE TO OEMS:
7// If you add custom fields to this proto, do not use numbers in the reserved range.
8
Josh Gao76e1e302021-01-26 15:53:11 -08009message 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 Collingbourne1a1f7d72021-03-08 16:53:54 -080024 repeated Cause causes = 15;
Josh Gao76e1e302021-01-26 15:53:11 -080025
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 Gaofc4fb212021-02-10 16:59:50 -080030
31 reserved 20 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -080032}
33
34enum Architecture {
35 ARM32 = 0;
36 ARM64 = 1;
37 X86 = 2;
38 X86_64 = 3;
Josh Gaofc4fb212021-02-10 16:59:50 -080039
40 reserved 4 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -080041}
42
43message 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 Gaofc4fb212021-02-10 16:59:50 -080056
57 reserved 10 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -080058}
59
Peter Collingbourne1a1f7d72021-03-08 16:53:54 -080060message 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
71message 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 Gao76e1e302021-01-26 15:53:11 -080099message Cause {
100 string human_readable = 1;
Peter Collingbourne1a1f7d72021-03-08 16:53:54 -0800101 oneof details {
102 MemoryError memory_error = 2;
103 }
Josh Gaofc4fb212021-02-10 16:59:50 -0800104
Peter Collingbourne1a1f7d72021-03-08 16:53:54 -0800105 reserved 3 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800106}
107
108message Register {
109 string name = 1;
110 uint64 u64 = 2;
Josh Gaofc4fb212021-02-10 16:59:50 -0800111
112 reserved 3 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800113}
114
115message 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 Collingbourne1a1f7d72021-03-08 16:53:54 -0800121 int64 tagged_addr_ctrl = 6;
Josh Gaofc4fb212021-02-10 16:59:50 -0800122
Peter Collingbourne1a1f7d72021-03-08 16:53:54 -0800123 reserved 7 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800124}
125
126message 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 Gaofc4fb212021-02-10 16:59:50 -0800137
138 reserved 9 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800139}
140
141message MemoryDump {
142 string register_name = 1;
143 string mapping_name = 2;
144 uint64 begin_address = 3;
145 bytes memory = 4;
Peter Collingbourne1a1f7d72021-03-08 16:53:54 -0800146 bytes tags = 5;
Josh Gaofc4fb212021-02-10 16:59:50 -0800147
Peter Collingbourne1a1f7d72021-03-08 16:53:54 -0800148 reserved 6 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800149}
150
151message 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 Gaofc4fb212021-02-10 16:59:50 -0800163
164 reserved 10 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800165}
166
167message FD {
168 int32 fd = 1;
169 string path = 2;
170 string owner = 3;
171 uint64 tag = 4;
Josh Gaofc4fb212021-02-10 16:59:50 -0800172
173 reserved 5 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800174}
175
176message LogBuffer {
177 string name = 1;
178 repeated LogMessage logs = 2;
Josh Gaofc4fb212021-02-10 16:59:50 -0800179
180 reserved 3 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800181}
182
183message 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 Gaofc4fb212021-02-10 16:59:50 -0800190
191 reserved 7 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800192}