Commit Graph

172 Commits

Author SHA1 Message Date
Ben Konyi 27d0731ca5 [ VM / Service ] s/boolean/bool/ in service.md
Change-Id: I62a25b21da7072041b972518794994d5ea1617b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106983
Reviewed-by: Ben Konyi <bkonyi@google.com>
2019-06-21 19:45:24 +00:00
Ben Konyi 6af218685e [ VM / Service ] Add getInstances and InstanceSet to the service protocol.
Change-Id: Ia5aab0f1bbdb99a7690a107eeef08de6a1f33656
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106561
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-06-19 23:59:32 +00:00
Ryan Macnak 92701dfa48 [vm] Document clock compatibility between Timeline.now and Dart_TimelineGetMicros.
Change-Id: Ife4b5360b9c42221b9dac84014d072f60cd8f11c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106720
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-06-19 21:17:51 +00:00
Ben Konyi a75ded625e [ VM / Service ] Made VM timeline functionality public through the service API.
Change-Id: I8228f0417047af53edc6f570940d452da3155bbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106061
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-06-19 16:06:12 +00:00
Ben Konyi 74af4a00b2 [ VM / Service ] Created public implementation of getAllocationProfile RPC
Change-Id: I8c8cb4d47466ae6a298961652eeded762c769568
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105730
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-06-13 23:45:52 +00:00
Ben Konyi 4b009e1d01 [ Service ] Updated Q/A with section on adding experimental functionality
Change-Id: I9cc051e7b53f1d9850f6129656196ab47b7f2bf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105022
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-06-07 19:51:31 +00:00
Ben Konyi 37b7db8fff [ VM / Service ] Added document outlining service protocol design principles.
Change-Id: Iac4d0095b9dab220609f9df6a732506352abf077
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104804
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-06-04 22:25:32 +00:00
Ben Konyi 554f9db768 [ VM / Service ] Made Logging event and LogRecord public
Change-Id: Ib1c99a1f2483b98bc414edb9ad0b109ce909cecb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100661
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-05-28 19:20:40 +00:00
Devon Carew 87a3256e8f Add lineOffset and columnOffset fields to the Script service protocol class.
Change-Id: I90c482fb3450bb6bbef5d5fa77ae736e6ed76b95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99191
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-04-29 22:52:17 +00:00
Devon Carew 1bc1e483e0 Fix a typo in the service protocol docs.
Change-Id: Ib2299023c8284e39976cbf8bae8d0edf2a13d330
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98800
Reviewed-by: Ben Konyi <bkonyi@google.com>
2019-04-09 23:31:21 +00:00
Ben Konyi 1efe7e2518 [ VM / Service ] Added getMemoryUsage RPC and MemoryUsage object to service protocol
Change-Id: If15e49d7aab93382c15529a738b492552faf5376
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95489
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-03-14 21:53:49 +00:00
Ben Konyi 585eb7f507 [ VM / Service ] Added disableBreakpoints parameter to evaluate, evaluateInFrame and invoke RPCs
- Setting the `disableBreakpoints` parameter to true will result in any
breakpoints hit during execution resulting from an evaluate or invoke
call to be ignored.
- Default behavior is the same (break on breakpoints).
- Updated Observatory eval box to disable breakpoints.
- Added tests

Change-Id: Ibf40f8a8de018718435118e13cc2e969f8ed7944
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95320
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2019-03-08 02:19:06 +00:00
Ben Konyi 435a52eafa [ VM / Service ] Fixed inconsistencies in service protocol spec.
Change-Id: Ifdb3f37883db215f6a7edcde14b08cba653b8f08
Reviewed-on: https://dart-review.googlesource.com/c/93860
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-02-20 23:15:47 +00:00
Devon Carew b0b055541b Make Script.tokenPosTable optional.
Change-Id: I681f6c3c762e16a2eff8a9aac1d680856aa94935
Reviewed-on: https://dart-review.googlesource.com/c/90321
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-01-18 22:46:23 +00:00
Ben Konyi a10ddca1b1 [ VM / Service ] Allow for profile_period flag to be set via the service protocol
`profile_period` has been added to the list of flags which can be
changed at runtime via the `setFlag` RPC. Changing this flag at runtime will
cause the ThreadInterrupter to be shutdown, reinitialized, and started with the
new profiling period.

Fixes #35654.

Change-Id: I2f365fdf8e404270f2eed1e172c8d21b48e0aff9
Reviewed-on: https://dart-review.googlesource.com/c/89445
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2019-01-16 18:08:19 +00:00
Mouad Debbar 6bb1dcdfa4 Fix wording
The current wording seems to be saying the opposite of what it's supposed to.

Closes #35507
https://github.com/dart-lang/sdk/pull/35507

GitOrigin-RevId: cd1493d8bebf468459b3bd44544a24e18cda24cf
Change-Id: I200327ff152e23b56b11d0d503212926da3fe084
Reviewed-on: https://dart-review.googlesource.com/c/88123
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2019-01-09 15:41:31 +00:00
Stan Manilov 78f913273b Fix link to 'getScripts'
This was perhaps overlooked during refactoring. The current link doesn't
work.

Change-Id: Ia4f1378ba5c16a3ca1386e5fbebd1c78d824aa4e
Reviewed-on: https://dart-review.googlesource.com/c/87076
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-12-14 10:49:18 +00:00
Régis Crelier cb8c0ab8f5 [vm] Remove MixinAppType VM class and VM code supporting type resolution.
In Dart2, mixin application classes are generated by kernel and type resolution
is performed by kernel. In Dart1, using the VM parser, these tasks were done
during class and type finalization.

Change-Id: I927b1446d906ffd76ed9591c96e0d974df09f3bf
Reviewed-on: https://dart-review.googlesource.com/c/87025
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-12-13 20:18:36 +00:00
Keerti Parthasarathy 531551c7f1 Remove trailing comma in json
Change-Id: Ia51ed56fc6c63ce93cb0771dc68a5d94f53bc9e0
Reviewed-on: https://dart-review.googlesource.com/c/86060
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-12-04 20:08:33 +00:00
Keerti Parthasarathy 4bda0fe427 Remove trailing comma from json
Change-Id: I2df9b3342b5d166606c3bc13569896dfeac20fe4
Reviewed-on: https://dart-review.googlesource.com/c/85960
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2018-12-04 17:22:20 +00:00
Jens Johansen 55f3cc98d9 Fix missing comma in service.md
Change-Id: I324049327cc7454edcc56bf172707e174c3fa729
Reviewed-on: https://dart-review.googlesource.com/c/82996
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-11-07 06:32:07 +00:00
Ben Konyi 7c0b225666 [ VM / Service ] Added 'getScripts' RPC.
'getScripts' returns a 'ScriptList' object which represents all loaded
scripts for the isolate. This is the fix for issue 30061 and b/115567301.

Change-Id: I41248e97cb78a39d286020c7fdd7ee72f0cc55db
Reviewed-on: https://dart-review.googlesource.com/c/82360
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2018-11-01 17:44:30 +00:00
Danny Tuppeny 816ab3208c Fix versions in spec titles to match the description below
Change-Id: I1c3ddadd292aedb83495fee1f90caf331c7241d7
Reviewed-on: https://dart-review.googlesource.com/c/81271
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-10-25 00:37:35 +00:00
Devon Carew 45a5bc063a Mark the Script.source field as nullable.
Change-Id: I1f176c7aa75eb9a15d3e237d894395632830291e
Reviewed-on: https://dart-review.googlesource.com/c/77981
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-10-03 22:59:17 +00:00
Ryan Macnak 7f9a9feae1 [vm, service] Rename 'invoke' parameter 'receiverId' to 'targetId'.
For consistency with the documentation and other service methods.

Change-Id: Ife4a4cf2445b7dad72e0a911fe1b94cec6ab5db5
Reviewed-on: https://dart-review.googlesource.com/77007
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-09-27 22:02:42 +00:00
Danny Tuppeny 805c92cf32 Add @TypeArguments as a valid type for BoundVariable.value
Change-Id: I47075c5ed5228f112b45ce4a7966e809aadc8682
Reviewed-on: https://dart-review.googlesource.com/73540
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2018-09-11 02:26:39 +00:00
Ryan Macnak 7b9fb893d2 [vm] Add a service method for 'invoke' as the dual to 'eval'.
Refactor the implementation of 'invoke' for sharing between the embedding API, mirrors, and the VM service. The fixes various issues in the embedding API:
 - Dart_Invoke, Dart_GetField and Dart_SetField now generate the same NoSuchMethodErrors as dart:mirrors and ordinary Dart code.
 - Dart_GetField and Dart_SetField now accept a null receiver.
 - Dart_GetField now handles closurization.
 - Dart_Invoke now handles calls through function-typed getters.
In mirrors, it also changes:
 - LibraryMirror.invoke/getField/setField now see members in the export namespace, not just local declarations. I.e., invocation with a LibraryMirror behaves the same ways as invocation against a library prefix in ordinary Dart code.

Bug: https://github.com/dart-lang/sdk/issues/11870
Bug: https://github.com/dart-lang/sdk/issues/13643
Bug: https://github.com/dart-lang/sdk/issues/29893
Bug: https://github.com/dart-lang/sdk/issues/33417
Bug: https://github.com/dart-lang/sdk/issues/34006
Change-Id: I913e8eef16943a3e86eda55c8d122819e41ad7cc
Reviewed-on: https://dart-review.googlesource.com/67302
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-08-09 18:16:03 +00:00
Alexander Aprelev a5e41681e5 Add support for expression compilation via service.
If there is registered expression compiler, VM debugger uses it to compile expressions. Otherwise, it will fallback to use kernel service compiler.
This is needed to support Flutter use case where compiler is running on developer's host machine, not on the device where VM is running.

Bug: dartbug.com/31981
Change-Id: I8bdfc8ab45a57c306169abe189f1e24e1b0bcf40
Reviewed-on: https://dart-review.googlesource.com/57520
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-05 04:16:39 +00:00
Alexander Aprelev fc206a7589 Add Kill isolate service request.
This is useful when embedder needs to kill an isolate that might be paused on a breakpoint.

Change-Id: If54decda5d16c694b81a25ae43d37f8eb41e8105
Reviewed-on: https://dart-review.googlesource.com/55276
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-21 20:00:58 +00:00
Paul Berry 98d7796662 Fix some minor typos in the service protocol documentation.
Change-Id: I05481d6bf167fee57f27d769906ec1f8f5b3b6c4
Reviewed-on: https://dart-review.googlesource.com/54711
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-14 17:58:59 +00:00
Ryan Macnak 4c0a09b79f [vm-service] Add setFlag.
Bug: https://github.com/dart-lang/sdk/issues/32709
Change-Id: I7777b005c477574c93430d56ede6cde2cd421203
Reviewed-on: https://dart-review.googlesource.com/48803
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Todd Volkert <tvolkert@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-03-30 18:17:55 +00:00
Devon Carew e3c8338fad Specify sentinels in the return type for evaluateInFrame.
BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2999103002 .
2017-08-16 15:14:27 -07:00
Devon Carew ae80af3abb Add a missing comma.
BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2949243002 .
2017-06-22 09:58:52 -07:00
Ryan Macnak 03a2c24edf vm-service: Add optional 'scope' parameter to 'evaluate' and 'evaluateInFrame'.
Closes #29535

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2872503004 .
2017-05-18 18:02:49 -07:00
John McCutchan 4c4c9f2ce6 Fix test failure and add new awaiterFrames to service_dev.md
BUG=

Review-Url: https://codereview.chromium.org/2788993002 .
2017-03-31 13:18:07 -07:00
John McCutchan d8555fb5a8 Include the awaiter stack trace in the service protocol
- [x] Include the (non-empty) awaiter stack trace in every `getStack` RPC.
- [x] Append the causal stack trace to the final frame of the awaiter stack trace.
- [x] Unit test for awaiter stack trace.

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2782703002 .
2017-03-29 06:56:50 -07:00
Devon Carew 957961d7d3 Update the service protocol dev spec - some fields are now optional.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2692923004 .
2017-02-15 06:48:16 -08:00
Devon Carew a90c2e9ed1 Service protocol updates for the recent async work.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2683323004 .
2017-02-10 16:25:26 -08:00
John McCutchan f75d80317c Fix field name in ReloadReport
- The field is "success" not "status".

Fixes #28400

BUG=

Review-Url: https://codereview.chromium.org/2639603002 .
2017-01-17 07:12:24 -08:00
Andreas Kirsch e741a44734 fix ToC link to reloadSources (#28398) 2017-01-15 10:38:56 -08:00
John McCutchan de082ae041 Document the frameIndex parameter in the service protocol specification
BUG=
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2624493003 .
2017-01-10 07:09:36 -08:00
John McCutchan 514b88c745 Use actual tab character in service.md
BUG=

Review-Url: https://codereview.chromium.org/2616933002 .
2017-01-05 07:18:05 -08:00
John McCutchan ebe7d148f3 Document some recent service protocol features
Document the `reloadSources` RPC.

Document the `PausePostRequest` pause event.

Document the 'IsolateReloaded' event.

BUG=
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2614643003 .
2017-01-04 13:45:27 -08:00
John McCutchan 8061bd5a8a Add local variable declaration token position to service protocol
- [x] Add three public fields to the "BoundVariable" service type: declarationTokenPos, visibleStartTokenPos, and visibleEndTokenPos. (naming suggestions welcome!)
- [x] Extend LocalVarDescriptors to hold the declaration token position (it already had the scope visibility boundaries).
- [x] Extend ContextScope to hold the declaration token position.
- [x] Add a unit test which verifies this works for local variables, function parameters, and closure captured variables.

Fixes https://github.com/dart-lang/sdk/issues/25569

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2419013004 .
2016-10-17 11:18:24 -07:00
Carlo Bernaschina 1d0ec7b74c Always send typeClass field, if it is resolved
R=johnmccutchan@google.com, regis@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/2223543002 .
2016-08-05 12:44:55 -07:00
Todd Turnidge 5e196ada5d VMMustBePaused -> IsolateMustBePaused
Closes #24537

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1973303003 .
2016-05-16 11:19:22 -07:00
Harry Terkelsen 1745ba77f5 fix all instances of "the the"
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1980573003 .
2016-05-13 12:38:25 -07:00
Todd Turnidge 60f7970d0b Clarify definition of token position.
Closes #26389

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1965423003 .
2016-05-11 10:49:36 -07:00
Todd Turnidge 956ac4c183 Fix getSourceReport's forceCompile option for unused classes.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1916243002 .
2016-05-04 11:02:06 -07:00
Devon Carew 4771c85c95 Fix two nits in the service protocol spec.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1895163004 .
2016-04-19 10:45:06 -07:00