Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: runtime/vm/service/protocol.md

Issue 492093002: Add many response types (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Dart VM Service Protocol 1 # Dart VM Service Protocol
2 2
3 Description 3 Description
4 How to start 4 How to start
5 JSON 5 JSON
6 Websocket 6 Websocket
7 7
8 ## Types 8 ## Types
9 9
10 Every response returned by the VM Service has the <code>type</code> property. T his allows the client distinguish between different kinds of responses. For exa mple, global information about the VM is encoded in an response of type [VM](#VM ) and information about an isolate is encoded in an response of type [Isolate](# Isolate). 10 Every response returned by the VM Service has the <code>type</code> property. T his allows the client distinguish between different kinds of responses. For exa mple, global information about the VM is encoded in an response of type [VM](#VM ) and information about an isolate is encoded in an response of type [Isolate](# Isolate).
(...skipping 12 matching lines...) Expand all
23 23
24 { 24 {
25 type: "@Isolate", 25 type: "@Isolate",
26 id: "isolates/123", 26 id: "isolates/123",
27 name: "worker" 27 name: "worker"
28 entry: ... 28 entry: ...
29 heaps: ... 29 heaps: ...
30 topFrame: ... 30 topFrame: ...
31 ... 31 ...
32 } 32 }
33 33
34 ## IDs 34 ## IDs
35 35
36 Most responses returned by the VM Service have an <code>id</code> property. An id is used to request an object from the VM. 36 Most responses returned by the VM Service have an <code>id</code> property. An id is used to request an object from the VM.
37 37
38 An id is either _global_ or _relative_. Global ids can be requested from the VM directly by requesting the uri <code>/{global id}</code>. 38 An id is either _global_ or _relative_. Global ids can be requested from the VM directly by requesting the uri <code>/{global id}</code>.
39 39
40 The following is a list of known, fixed global ids: 40 The following is a list of known, fixed global ids:
41 41
42 | id | uri | type 42 | id | uri | type
43 | --- | --- | --- 43 | --- | --- | ---
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 | pauseOnExit | bool | 97 | pauseOnExit | bool |
98 | pauseEvent? | [DebuggerEvent](#DebuggerEvent) | 98 | pauseEvent? | [DebuggerEvent](#DebuggerEvent) |
99 | rootLib | [@Library](#atLibrary) | 99 | rootLib | [@Library](#atLibrary) |
100 | timers | ??? | 100 | timers | ??? |
101 | tagCounters | ??? | 101 | tagCounters | ??? |
102 | error? | [Error](#Error) | 102 | error? | [Error](#Error) |
103 | canonicalTypeArguments | | kill? | 103 | canonicalTypeArguments | | kill? |
104 | libs | List of [@Library](#atLibrary) | 104 | libs | List of [@Library](#atLibrary) |
105 | features | List of String | 105 | features | List of String |
106 106
107
108 ### <a name="atLibrary"></a>@Library 107 ### <a name="atLibrary"></a>@Library
109 108
110 | keys | values | comments 109 | keys | values | comments
111 | --- | --- | --- 110 | --- | --- | ---
112 | type | "@Library" | 111 | type | "@Library" |
113 | id | String | 112 | id | String |
114 | name | String | 113 | name | String |
115 | vmName? | String | Internal vm name. Provided only when different from 'name' . 114 | vmName? | String | Internal vm name. Provided only when different from 'name' .
116 | url | String 115 | url | String
117 116
118 ### <a name="Library"></a>Library 117 ### <a name="Library"></a>Library
119 118
120 | keys | values | comments 119 | keys | values | comments
121 | --- | --- | --- 120 | --- | --- | ---
122 | type | "Library" | 121 | type | "Library" |
123 | id | String | 122 | id | String |
124 | name | String | 123 | name | String |
125 | vmName? | String | Internal vm name. Provided only when different from 'name' . 124 | vmName? | String | Internal vm name. Provided only when different from 'name' .
126 | classes | List of [@Class](#atClass) | 125 | classes | List of [@Class](#atClass) |
127 | imports | List of [@Library](#atLibrary) | 126 | imports | List of [@Library](#atLibrary) |
128 | variables | List of ... | 127 | variables | List of ... |
129 | functions | List of [@Function](#atFunction) | 128 | functions | List of [@Function](#atFunction) |
130 | scripts | List of [@Script](#atScript) | 129 | scripts | List of [@Script](#atScript) |
131 130
131 ### <a name="atClass"></a>@Class
132 | keys | values | comments
133 | --- | --- | ---
134 | type | "@Class" |
135 | id | String |
136 | user_name | String |
137 | name | String |
138
139 ### <a name="Class"></a>Class
140 | keys | values | comments
141 | --- | --- | ---
142 | type | "@Class" |
143 | id | String |
144 | user_name | String |
145 | name | String |
146 | error? | [Error](#Error) | Error encountered during class finalization
147 | implemented | bool |
148 | abstract | bool |
149 | patch | bool |
150 | finalized | bool |
151 | const | bool |
152 | super? | [@Class](#atClass) | Super class
153 | library | [@Library](#atLibrary) | Owning library
154 | script? | [@Script](#atScript) | Script containing class source
155 | tokenPos? | int | starting token position of class source in script
156 | endTokenPos? | int | end token position of class source in script
157 | interfaces | List of [@Class](#atClass) | interfaces this class has implemente d
158 | fields | List of [@Field](#atField) |
159 | functions | List of [@Function](#atFunction) |
160 | subclasses | List of [@Class](#atClass) | classes which extend this class.
161 | canonicalTypes | [@TypeList] | kill?
162 | allocationStats | ClassHeapStats |
163
164 ### <a name="atFunction"></a>@Function
165 | keys | values | comments
166 | --- | --- | ---
167 | type | "@Function" |
168 | id | String |
169 | user_name | String |
170 | name | String |
171 | owningLibrary? | [@Library](#atLibrary) | Set for non-top level functions
172 | owningClass? | [@Class](#atClass) | Set for non-top level functions
173 | parent? | [@Function](#atFunction) | Parent function
174 | kind | String |
175
176 ### <a name="Function"></a>Function
177 | keys | values | comments
178 | --- | --- | ---
179 | type | "@Function" |
180 | id | String |
181 | user_name | String |
182 | name | String |
183 | owningLibrary | [@Library](#atLibrary) | Set for non-top level functions
184 | owningClass | [@Class](#atClass) | Set for non-top level functions
185 | parent? | [@Function](#atFunction) | Parent function
186 | kind | String |
187 | is_static | bool |
188 | is_const | bool |
189 | is_optimizable | bool |
190 | is_inlinable | bool |
191 | usage_counter | int |
192 | optimized_call_site_count | int |
193 | deoptimizations | int |
194 | script? | [@Script](#atScript) | Script containing function source
195 | tokenPos? | int | starting token position of function source in script
196 | endTokenPos? | int | end token position of function source in script
197 | unoptimized_code | [@Code](#atCode) |
198 | code | [@Code](#atCode) | Current code
199
200 ### <a name="atField"></a>@Field
201 | keys | values | comments
202 | --- | --- | ---
203 | type | "@Field" |
204 | id | String |
205 | user_name | String |
206 | name | String |
207 | value? | Instance | value associated with static field <-- do we want to inclu de this in a field reference?
208 | owner | [@Library](#atLibrary),[@Class](#atClass) | Owning library or class <- - handling of owner is inconsistent with Function
209 | declared_type | [@AbstractType](#atAbstractType) |
210 | static | bool |
211 | final | bool |
212 | const | bool |
213
214 ### <a name="Field"></a>Field
215 | keys | values | comments
216 | --- | --- | ---
217 | type | "Field" |
218 | id | String |
219 | user_name | String |
220 | name | String |
221 | value? | Instance | value associated with static field
222 | owner | [@Library](#atLibrary) | Owning library <-- handling of owner is incon sistent with Function
223 | owner | [@Class](#atClass) | Owning class <-- handling of owner is inconsisten t with Function
224 | declared_type | [@AbstractType](#atAbstractType) |
225 | static | bool |
226 | final | bool |
227 | const | bool |
228 | guard_nullable | bool | can this field hold a null?
229 | guard_class | String OR [@Class](#atClass) | "unknown", "dynamic", or a class
230 | guard_length | String OR int | "unknown", "variable", or length of array
231 | script? | [@Script](#atScript) | Script containing field source
232 | tokenPos? | int | starting token position of field source in script
233
234 ### <a name="atCode"></a>@Code
235 | keys | values | comments
236 | --- | --- | ---
237 | type | "@Code" |
238 | id | String |
239 | user_name | String |
240 | name | String |
241 | start | String | starting address of code
242 | end | String | ending address of code
243 | isOptimized | bool |
244 | isAlive | bool |
245 | kind | String
246 | function | [@Function](#atFunction) |
247
248 ### <a name="Code"></a>Code
249 | keys | values | comments
250 | --- | --- | ---
251 | type | "@Code" |
252 | id | String |
253 | user_name | String |
254 | name | String |
255 | start | String | starting address of code
256 | end | String | ending address of code
257 | isOptimized | bool |
258 | isAlive | bool |
259 | kind | String
260 | function | [@Function](#atFunction) |
261 | object_pool | List of [@Object](Object) |
262 | disassembly | List of String | See note below on disassembly list format
263
264 *Disassembly list format*
265 | index | value | description
266 | --- | --- | --- |
267 | 0 | String | Address of instruction
268 | 1 | String | Hex encoding of instruction
269 | 2 | String | Human encoding of instruction
270 | 0 + (3 * K) | String | Address of Kth instruction
271 | 1 + (3 * K) | String | Hex encoding of instruction of Kth instruction
272 | 2 + (3 * K) | String | Human encoding of instruction of Kth instruction
273
274 ### <a name="Error"></a>Error
275 | keys | values | comments
276 | --- | --- | ---
277 | type | "Error" |
278 | id | String | always empty
279 | kind | String |
280 | message | String |
281
282 ### <a name="ClassHeapStats"></a>ClassHeapStats
283 | keys | values | comments
284 | --- | --- | ---
285 | type | "ClassHeapStats" |
286 | id | String |
287 | class | [@Class](#atClass) |
288 | new | List of int | Allocation statistics for new space. See note below on all ocation statistics list format.
289 | old | List of int | Allocation statistics for old space. See note below on all ocation statistics list format.
290 | promotedInstances | int | number of instances promoted at last new-space GC.
291 | promotedBytes | int | number of bytes promoted at last new-space GC.
292
293 *Allocation statistics list format*
294 | index | value | description
295 | --- | --- | --- |
296 | 0 | int | Instances allocated before last GC |
297 | 1 | int | Bytes allocated before last GC |
298 | 2 | int | Instances alive after last GC |
299 | 3 | int | Bytes alive after last GC |
300 | 4 | int | Instances allocated since last GC |
301 | 5 | int | Bytes allocated since last GC |
302 | 6 | int | Instances allocated since last accumulator reset |
303 | 7 | int | Bytes allocated since last accumulator reset |
304
305 ### <a name="atAbstractType"></a>@AbstractType
306
307 ### <a name="AbstractType"></a>AbstractType
308
309 ### <a name="PcDescriptor"></a>PcDescriptor
310
311
132 ### <a name="atScript"></a>@Script 312 ### <a name="atScript"></a>@Script
133 | keys | values | comments | example | 313 | keys | values | comments | example |
134 | --- | --- | --- 314 | --- | --- | ---
135 | type | "@Script" | 315 | type | "@Script" |
136 | id | String 316 | id | String
137 | name | String 317 | name | String
138 | vmName? | String | Internal vm name. Provided only when different from 'name' . 318 | vmName? | String | Internal vm name. Provided only when different from 'name' .
139 | kind | String 319 | kind | String
140 320
141 ### <a name="Script"></a>Script 321 ### <a name="Script"></a>Script
142 | keys | values | comments 322 | keys | values | comments
143 | --- | --- | --- 323 | --- | --- | ---
144 | type | "@Script" | 324 | type | "@Script" |
145 | id | String 325 | id | String
146 | name | String 326 | name | String
147 | vmName? | String | Internal vm name. Provided only when different from 'name' . 327 | vmName? | String | Internal vm name. Provided only when different from 'name' .
148 | kind | String 328 | kind | String
149 | owningLibrary | [@Library](#atLibrary) | 329 | owningLibrary | [@Library](#atLibrary) |
150 | source | String 330 | source | String
151 | tokenPosTable | List of TokenLine 331 | tokenPosTable | List of list of int. See note below about token line format.
152 332
153 ### <a name="TokenLine"></a>TokenLine 333 *Token line format*
154 | index | value | comments 334 | index | value | comments
155 | --- | --- | --- 335 | --- | --- | ---
156 | 0 | integer | line number 336 | 0 | int | line number
157 | 1 | integer | first token position 337 | 1 | int | first token position
158 | 2 | integer | first column number 338 | 2 | int | first column number
159 | ... | ... | ... 339 | ... | ... | ...
160 | 1 + (2 * k) | integer | kth token position 340 | 1 + (2 * k) | int | kth token position
161 | 2 + (2 * k) | integer | kth column number 341 | 2 + (2 * k) | int | kth column number
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698