[ Service / package:vm_service ] Document getClassList RPC, bump VM service version to 3.32, release package:vm_service 4.0.2

Change-Id: If8430f3e5866e40934e308aeff98e46e660b0f0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144685
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This commit is contained in:
Ben Konyi 2020-04-23 22:05:52 +00:00 committed by commit-bot@chromium.org
parent ea03ea355c
commit 36159acd2d
8 changed files with 50 additions and 9 deletions

View file

@ -1,8 +1,9 @@
# Changelog
## Unreleased
## 4.0.2
- Fixed issue where RPC format did not conform to the JSON-RPC 2.0
specification.
- Added `getClassList` RPC.
## 4.0.1
- Improved documentation.

View file

@ -10,6 +10,7 @@ src/org/dartlang/vm/service/consumer/EvaluateConsumer.java
src/org/dartlang/vm/service/consumer/EvaluateInFrameConsumer.java
src/org/dartlang/vm/service/consumer/FlagListConsumer.java
src/org/dartlang/vm/service/consumer/GetAllocationProfileConsumer.java
src/org/dartlang/vm/service/consumer/GetClassListConsumer.java
src/org/dartlang/vm/service/consumer/GetCpuSamplesConsumer.java
src/org/dartlang/vm/service/consumer/GetInboundReferencesConsumer.java
src/org/dartlang/vm/service/consumer/GetInstancesConsumer.java

View file

@ -1 +1 @@
version=3.30
version=3.32

View file

@ -28,7 +28,7 @@ export 'snapshot_graph.dart'
HeapSnapshotObjectNoData,
HeapSnapshotObjectNullData;
const String vmServiceVersion = '3.30.0';
const String vmServiceVersion = '3.32.0';
/// @optional
const String optional = 'optional';
@ -194,6 +194,7 @@ Map<String, List<String>> _methodReturnTypes = {
'evaluate': const ['InstanceRef', 'ErrorRef'],
'evaluateInFrame': const ['InstanceRef', 'ErrorRef'],
'getAllocationProfile': const ['AllocationProfile'],
'getClassList': const ['ClassList'],
'getClientName': const ['ClientName'],
'getCpuSamples': const ['CpuSamples'],
'getFlagList': const ['FlagList'],
@ -497,6 +498,18 @@ abstract class VmServiceInterface {
Future<AllocationProfile> getAllocationProfile(String isolateId,
{bool reset, bool gc});
/// The `getClassList` RPC is used to retrieve a `ClassList` containing all
/// classes for an isolate based on the isolate's `isolateId`.
///
/// If `isolateId` refers to an isolate which has exited, then the `Collected`
/// [Sentinel] is returned.
///
/// See [ClassList].
///
/// This method will throw a [SentinelException] in the case a [Sentinel] is
/// returned.
Future<ClassList> getClassList(String isolateId);
/// The `getClientName` RPC is used to retrieve the name associated with the
/// currently connected VM service client. If no name was previously set
/// through the [setClientName] RPC, a default name will be returned.
@ -1257,6 +1270,11 @@ class VmServerConnection {
gc: params['gc'],
);
break;
case 'getClassList':
response = await _serviceImplementation.getClassList(
params['isolateId'],
);
break;
case 'getClientName':
response = await _serviceImplementation.getClientName();
break;
@ -1702,6 +1720,10 @@ class VmService implements VmServiceInterface {
if (gc != null && gc) 'gc': gc,
});
@override
Future<ClassList> getClassList(String isolateId) =>
_call('getClassList', {'isolateId': isolateId});
@override
Future<ClientName> getClientName() => _call('getClientName');
@ -6356,7 +6378,9 @@ class Timeline extends Response {
static Timeline parse(Map<String, dynamic> json) =>
json == null ? null : Timeline._fromJson(json);
/// A list of timeline events.
/// A list of timeline events. No order is guarenteed for these events; in
/// particular, these events may be unordered with respect to their
/// timestamps.
List<TimelineEvent> traceEvents;
/// The start of the period of time in which traceEvents were collected.

View file

@ -2,7 +2,7 @@ name: vm_service
description: >-
A library to communicate with a service implementing the Dart VM
service protocol.
version: 4.0.1
version: 4.0.2
homepage: https://github.com/dart-lang/sdk/tree/master/pkg/vm_service

View file

@ -12,7 +12,7 @@ var tests = <VMTest>[
var result = await vm.invokeRpcNoUpgrade('getVersion', {});
expect(result['type'], equals('Version'));
expect(result['major'], equals(3));
expect(result['minor'], equals(31));
expect(result['minor'], equals(32));
expect(result['_privateMajor'], equals(0));
expect(result['_privateMinor'], equals(0));
},

View file

@ -14,7 +14,7 @@
namespace dart {
#define SERVICE_PROTOCOL_MAJOR_VERSION 3
#define SERVICE_PROTOCOL_MINOR_VERSION 31
#define SERVICE_PROTOCOL_MINOR_VERSION 32
class Array;
class EmbedderServiceHandler;

View file

@ -1,8 +1,8 @@
# Dart VM Service Protocol 3.31
# Dart VM Service Protocol 3.32
> Please post feedback to the [observatory-discuss group][discuss-list]
This document describes of _version 3.31_ of the Dart VM Service Protocol. This
This document describes of _version 3.32_ of the Dart VM Service Protocol. This
protocol is used to communicate with a running Dart Virtual Machine.
To use the Service Protocol, start the VM with the *--observe* flag.
@ -710,6 +710,20 @@ collection will be actually be performed.
If _isolateId_ refers to an isolate which has exited, then the
_Collected_ [Sentinel](#sentinel) is returned.
### getClassList
```
ClassList|Sentinel getClassList(string isolateId)
```
The _getClassList_ RPC is used to retrieve a _ClassList_ containing all
classes for an isolate based on the isolate's _isolateId_.
If _isolateId_ refers to an isolate which has exited, then the
_Collected_ [Sentinel](#sentinel) is returned.
See [ClassList](#classlist).
### getClientName
```
@ -3741,5 +3755,6 @@ version | comments
3.30 | Updated return types of RPCs which require an `isolateId` to allow for `Sentinel` results if the target isolate has shutdown.
3.31 | Added single client mode, which allows for the Dart Development Service (DDS) to become the sole client of
the VM service.
3.32 | Added `getClassList` RPC and `ClassList` object.
[discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observatory-discuss