Commit graph

54 commits

Author SHA1 Message Date
Ryan Macnak b3a569ea8d [vm] Prevent Dart_NewSendPort from bypassing the arbitrary object checks.
In particular this affects SendPorts from dart:io's IOService and Flutter's IsolateNameServer.

TEST=ci
Bug: https://github.com/flutter/flutter/issues/109248
Change-Id: I28ed3073a6fe5583729637ae7914d914edc709e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255261
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2022-08-19 18:10:15 +00:00
Ben Konyi ea48265725 Reland "[ VM / Service ] Omit private fields from service responses by default"
Adds better error handling in DDS to prevent google3 breakages due to
Flutter binary update lag times.

This reverts commit 28e958febb.

TEST=N/A

Change-Id: Ida454f0ef3caeedd1b0326c37fef58d4b73557d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227620
Reviewed-by: Siva Annamalai <asiva@google.com>
2022-01-11 23:35:28 +00:00
Ryan Macnak 28e522ed97 [vm] Don't include an isolate in getVM until it has been registered with the service isolate routing.
TEST=low probability Collected error on all uses of vm service
Bug: https://github.com/dart-lang/sdk/issues/33747
Bug: https://github.com/dart-lang/sdk/issues/46450
Change-Id: I7b8d08a734033d0678a539230d13ec3d66413961
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/63645
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-01-11 18:19:15 +00:00
Ivan Inozemtsev 28e958febb Revert "Reland "[ VM / Service ] Omit private fields from service responses by default""
This reverts commit 91a496e5db.

Reason for revert: breaks hot reloads internally

Original change's description:
> Reland "[ VM / Service ] Omit private fields from service responses by default"
>
> This reverts commit 7d39d2dd51.
>
> TEST=N/A
>
> Change-Id: I2119c841719c77be5380857ce209532ed036bd0e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226322
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I6e751343244a4788a1f080ea1aef5fdd18417109
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227503
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2022-01-11 14:06:04 +00:00
Ben Konyi 91a496e5db Reland "[ VM / Service ] Omit private fields from service responses by default"
This reverts commit 7d39d2dd51.

TEST=N/A

Change-Id: I2119c841719c77be5380857ce209532ed036bd0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226322
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-06 18:05:36 +00:00
Ben Konyi 0c071662a7 [ VM / Service ] Add support for streaming CPU samples with specific
user tags

TEST=cpu_sample_streaming_test.dart

Change-Id: Ia983217ae2a5da8c3252fafbed8197b4f4a20e2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224040
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-12-17 00:15:09 +00:00
Michal Terepeta 7d39d2dd51 Revert "[ VM / Service ] Omit private fields from service responses by default"
This reverts commit 75abd86407.

Reason for revert: Breaks internal tests (http://b/207612278)

Original change's description:
> [ VM / Service ] Omit private fields from service responses by default
>
> Service responses and events previously could include "private"
> properties, which have names starting with "_". This change removes
> these properties from service objects unless explicitly requested via a
> private parameter.
>
> See go/smaller-dart-vm-service-responses for response size reduction
> data.
>
> TEST=Existing service suite
>
> Change-Id: Ia65b14872e798eaa843f7d180c57721b82371d0b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221143
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I0b015baadfcdf4211426efa9a92804b163f88649
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221280
Reviewed-by: Michal Terepeta <michalt@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Michal Terepeta <michalt@google.com>
2021-11-25 10:28:33 +00:00
Ben Konyi 75abd86407 [ VM / Service ] Omit private fields from service responses by default
Service responses and events previously could include "private"
properties, which have names starting with "_". This change removes
these properties from service objects unless explicitly requested via a
private parameter.

See go/smaller-dart-vm-service-responses for response size reduction
data.

TEST=Existing service suite

Change-Id: Ia65b14872e798eaa843f7d180c57721b82371d0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221143
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-11-24 00:34:31 +00:00
Ryan Macnak e6b05a7a90 [vm, isolate] Also apply fast copying to an isolate's initial message.
Add missing checks for FFI types disallowed in isolate messages.
Align error messages with the other serializer and test expectations.

TEST=ci
Change-Id: I3813dd8f26e5122524bdf41f9ce6e0785fdd260b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209840
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-08-12 20:25:30 +00:00
Ryan Macnak bbefc05748 [vm] Rewrite isolate message serialization.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/25559
Bug: https://github.com/dart-lang/sdk/issues/27285
Bug: https://github.com/flutter/flutter/issues/84691
Change-Id: I04608c5d337144195748d5f3509a29eb3116585d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207865
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-07-29 16:55:55 +00:00
Martin Kustermann 6f704e0e97 [vm/concurrency] Avoid invoking Dart code while holding IsolateGroup read lock
Once the vm-service isolate starts up it will iterate over all isolates
to discover already started isolates. It does so via iterating over all
isolate groups and all isolates within them. Doing so requires a read
lock.

Until now it has called into Dart while holding the read lock. This can
lead to a deadlock, since calling Dart code can trigger JIT compilation
which can trigger various things that require the same lock.

Instead, this CL accumulates a list of (isolate-main-port, isolate-name)
pairs while iterating over isolate groups and the isolates therein.
Afterwards it registers those isolates in a bulk - without holding any
locks.

Issue https://github.com/dart-lang/sdk/issues/36097

TEST=Refactoring of existing test suite. Fixes flaky timeouts.

Change-Id: Iea7013ce57cef2500700fb464972104c66357777
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182321
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-02-03 18:23:42 +00:00
Ryan Macnak b1c09ecd8f [vm] Make naming more consistent when converting between handles, tagged and untagged pointers.
Currently we have things called XPtr which are not what you get from ptr().

Old world:
handle->raw() returns RawObject* (tagged)
raw_obj->ptr() returns RawObject* (untagged)

After 6fe15f6df9:
handle->raw() returns ObjectPtr
obj_ptr->ptr() returns ObjectLayout*

New world:
handle->ptr() returns ObjectPtr
obj_ptr->untag() returns UntaggedObject*

TEST=ci
Change-Id: I6c7f34014cf20737607caaf84979838300d12df2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149367
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2021-01-15 23:32:02 +00:00
Daco Harkes 5278383736 [vm] Native API: Make Dart_NewWeakPersistentHandle not auto delete
Changes Dart_NewWeakPersistentHandle to no longer auto delete the
weak persistent handle.

Changes the signatures of WeakPersistentHandleFinalizers to no longer
have access to the handle.

Flutter PR: https://github.com/flutter/engine/pull/19843
g3 presubmit: cl/318028238

Issue: https://github.com/dart-lang/sdk/issues/42312

TEST=runtime/vm/dart_api_impl_test.cc

Change-Id: I3f77db9954d9486759f903b78c03a494f73c68ba
Cq-Include-Trybots:dart/try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-nnbd-linux-debug-x64-try,analyzer-nnbd-linux-release-try,front-end-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151525
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-03 10:27:44 +00:00
Ben Konyi e44c0b2264 [ Service ] Add 'is_system_isolate' option to Dart_IsolateFlags
Provides a general way to designate an isolate as a 'system isolate'
(formerly known as 'VM internal isolates').

Initial fix for https://github.com/dart-lang/sdk/issues/42875

Change-Id: I8798a3a1c51df1db8008d602f6303df13c958cba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158063
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-08-21 21:44:50 +00:00
Ben Konyi 9cfe19d38b [ VM / Service ] Remove _spawnUri RPC from VM service
This code doesn't appear to be used anywhere in the Dart SDK or Flutter.

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

Change-Id: Iad8537f3187caa7b2304ee2ec2aaaa8b6ba2b35c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146480
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-05-05 00:47:37 +00:00
Ryan Macnak 68d178f223 [vm] Remove FLAG_support_service and FLAG_support_reload, superseded by PRODUCT define.
When these were originally added, we thought we would be able to use them in place of ifdefs and rely on the compiler optimizations and linker GC to remove things. This turned out not to reliably remove what we wanted removed, so we ended up with the ifdefs anyway.

Change-Id: I62e74d60d92b18a688b9dffaf77b1440c10a07ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134402
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-02-04 23:31:17 +00:00
Ryan Macnak e6574a7964 [vm] Add --show-invisible-isolates.
Useful for profiling the vm-service and kernel-service isolates.

Bug: https://github.com/dart-lang/sdk/issues/38553
Change-Id: I9cc562b5089ad01a5f797799d1105a4a8cf910e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118650
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-09-25 21:41:55 +00:00
Daco Harkes 14ff2110ce [vm] refactor native entry and native entry type arguments
Change-Id: I03efbbf4340de1c8f23c60854ed991671ca2b647
Reviewed-on: https://dart-review.googlesource.com/c/87077
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2018-12-13 19:29:26 +00:00
Liam Appelbe 8371240565 Reland https://dart-review.googlesource.com/c/sdk/+/84683
The timeout issue in app-kernel-linux-product-x64-try seems to have resolved itself.

Bug: https://github.com/dart-lang/sdk/issues/34895
Change-Id: If503aa4e63628c38d8ee86a5b6b5202ea953d6a8
Reviewed-on: https://dart-review.googlesource.com/c/85406
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2018-11-27 16:56:07 +00:00
Liam Appelbe 0b46639335 Revert "Hide vmservice.cc behind PRODUCT macro."
This reverts commit 1def1f5007.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Hide vmservice.cc behind PRODUCT macro.
> 
> This removes vmservice.cc from the flutter engine release binary, which saves a few kB.
> 
> Tested using tools/test.py in product mode. Verified the binary savings using run_binary_size_analysis.py
> 
> Bug: https://github.com/dart-lang/sdk/issues/34895
> Change-Id: I74d50d3e177842310e488072f35bc11d1c597036
> Reviewed-on: https://dart-review.googlesource.com/c/84683
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

TBR=rmacnak@google.com,asiva@google.com,liama@google.com

Change-Id: I5df5882c8f4ec46480a89c2a6549e69ed83f5a2c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/34895
Reviewed-on: https://dart-review.googlesource.com/c/84832
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2018-11-19 23:04:17 +00:00
Liam Appelbe 1def1f5007 Hide vmservice.cc behind PRODUCT macro.
This removes vmservice.cc from the flutter engine release binary, which saves a few kB.

Tested using tools/test.py in product mode. Verified the binary savings using run_binary_size_analysis.py

Bug: https://github.com/dart-lang/sdk/issues/34895
Change-Id: I74d50d3e177842310e488072f35bc11d1c597036
Reviewed-on: https://dart-review.googlesource.com/c/84683
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2018-11-19 19:11:41 +00:00
Ryan Macnak 7514ce941e [vm] Assert handles are only allocated when the thread is preventing safepoints.
Threads in the native or blocked states don't prevent safepoints, so they may run concurrently with a safepoint operation like GC. It is not safe for handles to be allocated while the GC is visiting them, so these threads must not allocate handles. Assert only threads in the VM or generated states, which prevent safepoints until they check in, may allocate handles. (Generated code does not allocate handles, but leaf runtime entries remain in the generated state.)

Bug: https://github.com/dart-lang/sdk/issues/34883
Change-Id: I1a211778f7ef96b53a2405f0ee9dde7871b122b6
Reviewed-on: https://dart-review.googlesource.com/c/81540
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-10-31 19:51:52 +00:00
Siva Annamalai b82c1f979f Revert "[VM] Fix for issue 34839 - Dart_Cleanup may hang while shutting down"
This reverts commit 89c845eba2.

Reason for revert: Seems to cause ASAN failures

Original change's description:
> [VM] Fix for issue 34839 - Dart_Cleanup may hang while shutting down
>      the service isolate.
> 
>      The service isolate request for shutdown uses a Dart level message
>      for exiting the isolate, this shuts down the isolate but does not
>      completely bring the isolate down if there are some open ports. We
>      have a timer isolate started in the VM isolate and if the shutdown
>      happens soon enough this port is still open.
> 
> Change-Id: Icfa07c91b8692eb76ba8502063cf6f5cf04832a5
> Reviewed-on: https://dart-review.googlesource.com/c/81200
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

TBR=rmacnak@google.com,asiva@google.com

Change-Id: I0fd4472d277a380b739e602aa3910cc1f96ed89e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/81223
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-10-23 04:41:13 +00:00
asiva 89c845eba2 [VM] Fix for issue 34839 - Dart_Cleanup may hang while shutting down
the service isolate.

     The service isolate request for shutdown uses a Dart level message
     for exiting the isolate, this shuts down the isolate but does not
     completely bring the isolate down if there are some open ports. We
     have a timer isolate started in the VM isolate and if the shutdown
     happens soon enough this port is still open.

Change-Id: Icfa07c91b8692eb76ba8502063cf6f5cf04832a5
Reviewed-on: https://dart-review.googlesource.com/c/81200
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-10-23 03:00:00 +00:00
Ryan Macnak 3e59362747 [vm] Shut down application isolates before the kernel isolate.
Bug: https://github.com/dart-lang/sdk/issues/32134
Change-Id: I9609e8a5df77d91e2d9c007571f6388dd72d059d
Reviewed-on: https://dart-review.googlesource.com/64462
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-07-11 19:29:15 +00:00
Ryan Macnak ade0e93090 [vm] Normalize external string finalizers.
- Remove a level of indirection when accessing code units.
 - Require a finalizer when constructing an external string.

Change-Id: I3f65246bf0ac50ffad900e2c338623a7684a9d3d
Reviewed-on: https://dart-review.googlesource.com/54300
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-06-04 23:44:39 +00:00
Ryan Macnak cff0e751a5 [vm] Add Dart_NewExternalTypedDataWithFinalizer.
Allows the finalizer to be associated with the correct object when creating ByteData. The finalizer should be associated with the underlying ExternalUint8List, since it can outlive the ByteData via byteData.buffer.asUint8List()

Bug: b/78150644
Change-Id: I3db58792bbe3abf7ed41d2adaf225fa554b8fb25
Reviewed-on: https://dart-review.googlesource.com/52860
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-01 01:57:41 +00:00
Ryan Macnak 3f40488ec4 [vm, isolate] Refactor isolate message snapshotting to centralize construction of the Message.
Remove unused special case in ApiMessageWriter for lists of int.

This is in preparation for ensuring we always free any external data that ends up in an isolate message.

Bug: https://github.com/dart-lang/sdk/issues/31959
Change-Id: I999656fc11d2aee9aebe70852be5bb075f234b4d
Reviewed-on: https://dart-review.googlesource.com/41020
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-02-14 00:28:01 +00:00
Ryan Macnak 8879e6a2c0 [vm, gardening] Move --trace-service output to stderr.
Prevents interleaving with output on stdout that is parsed. E.g.,

R=cbernaschina@google.com

FormatException: Invalid character (at character 24)
http://127.0.0.1:59909/[+400ms] Isolate kernel-service.dart.snapshot$main-5...
Review-Url: https://codereview.chromium.org/2998713002 .
2017-08-09 13:06:14 -07:00
Zachary Anderson 6cd8a79078 VM: Re-format to use at most one newline between functions
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
John McCutchan a4adbffb50 Remove legacy restart code
Also fixes #29092 by threading Error objects back to the message handler.

BUG=
R=asiva@google.com, rmacnak@google.com

Review-Url: https://codereview.chromium.org/2759533002 .
2017-03-20 08:47:39 -07:00
Jens Johansen 137b85c114 Hide kernel isolate from isolate list; do not register it either
This is basically a copy of https://codereview.chromium.org/2689563010/
and https://codereview.chromium.org/2695013002/ - just hiding the kernel
isolate too.
That way, we won't see it and be confused when debugging via observatory.
Also, service tests could probably start working with the kernel isolate
too.

Still show isolate if passing "--show_kernel_isolate" though.

R=hausner@google.com

Review-Url: https://codereview.chromium.org/2690323003 .
2017-03-07 08:27:14 +01:00
Florian Schneider 2dd8946fc4 Fix service isolate initialization in PRODUCT mode.
My previous CL (removing noopt) incorrectly refactored this code and
broke PRODUCT mode.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2627203002 .
2017-01-11 18:08:35 -08:00
Florian Schneider bef4967ea1 Remove dart_noopt and related parts from the VM.
dart_noopt is not needed anymore because we have testing
and builbot integration of the real precompilation pipeline in place now.

Fixes #24569
Fixes #25726
Fixes #25845

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2624393002 .
2017-01-11 16:55:55 -08:00
Ryan Macnak 2ec03cba70 Fix leak of message snapshot buffer when attempting to send an illegal object.
Fix leak with FLAG_enable_debug_break.

R=asiva@google.com, fschneider@google.com

Review-Url: https://codereview.chromium.org/2629533002 .
2017-01-11 16:50:04 -08:00
Ben Konyi 7eef11a0e8 Added method to IsolateVisitor to check for special isolates (i.e., service / vm isolates) since this check is done frequently.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2567193002 .
2016-12-12 14:54:05 -08:00
Zachary Anderson 2e4dfd3a2d clang-format runtime/lib
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2468093007 .
2016-11-04 12:14:41 -07:00
Siva Annamalai 39ae4337dd Fix issue 27006 (safepoint assertion failure).
BUG=27006
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2206423002 .
2016-08-03 14:28:41 -07:00
Zachary Anderson 64e9017629 Fuchsia: Platform specific calls needed to Initialize and Cleanup VM.
fuchsia_test now succeeds.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2148533002 .
2016-07-13 09:12:28 -07:00
Ryan Macnak 3fec7d2017 Fix debug and release builds.
Review URL: https://codereview.chromium.org/2139403002 .
2016-07-12 11:05:01 -07:00
Ryan Macnak c7e6ed1e9f Fix product build.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2141003003 .
2016-07-12 11:01:00 -07:00
Todd Turnidge 3a51fceaba First cut at _spawnUri rpc in the vm service.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2072543002 .
2016-07-11 14:25:27 -07:00
John McCutchan 1a4c2005cc DevFS initial implementation.
This cl implements an experimental filesystem maintained in the vm, called dart-devfs.  This will allow service protocol users to read and write source files while the vm is running.  This is needed for the reload support for flutter.

R=turnidge@google.com

Review URL: https://codereview.chromium.org/2059883003 .
2016-06-10 12:33:50 -07:00
John McCutchan 6fd8fd7987 Rework standalone to use a synchronous loader that does not invoke Dart code
- [x] The first caller of the tag handler blocks, recursive callers queue work and exit.
- [x] Use a NativeMessageHandler to receive I/O results from the service isolate.
- [x] Preserve load error message format.
- [x] Move packages map into service isolate.
- [x] Wire up Todd's native URI code.

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1998963003 .
2016-06-06 14:15:01 -07:00
Ivan Posva b2ac279269 - Use a map to lookup libraries by URL.
- Ensure the uniqueness of private keys without having to
  search the existing key space.
- Pass a thread parameter where useful to library methods.

BUG=

Review URL: https://codereview.chromium.org/1947393003 .
2016-05-05 10:42:28 -07:00
John McCutchan e2e7af1229 Remove more feature in product mode
- Remove Timeline.
- Remove more vmservice code.
- Remove AST printing.
- Remove IL printing.
- Remove profiler.
- Remove thread interrupter.
- Remove disassembler.
- Remove Library::CheckFunctionFingerprints.

- Update test status files for product mode.

Size of dart_bootstrap before: 5287631
Size of dart_bootstrap after: 5112783

Reduction in size: 174848 bytes.

Total reduction in size (382734 + 174848): 557582 bytes.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1678203002 .
2016-02-09 08:45:32 -08:00
John McCutchan d295b9c311 Remove many features when building product mode
Move all JSON printing code from object.cc to object_service.cc.

Not compiled in:

- Service protocol
- Debugger
- Debugger API
- JSONStream
- ObjectIdRing
- Profiler service
- Object JSON printing

Size of dart_bootstrap before: 5670365 bytes
Size of dart_bootstrap after: 5287631 bytes

Reduction in size: 382734 bytes.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1660063002 .
2016-02-05 09:55:51 -08:00
Siva Annamalai e72c1fb47d Implement safepointing of threads :
- uses thread execution status transition to track when a thread is in a safepoint or needs to block for a safepoint
 - introduces a monitor per Thread object
 - uses a per thread safepoint handshake between the thread requesting a safepoint and the requested thread.

The ThreadRegistry class now contains only the thread list for an isolate and the functionality of scheduling a thread onto an Isolate and unscheduling it from teh isolate. We could fold this functionality into the Isolate class in a different CL.

R=rmacnak@google.com, zra@google.com

Review URL: https://codereview.chromium.org/1541073002 .
2016-02-01 10:57:34 -08:00
John McCutchan 87d8d3a719 Make it possible to share the embedder's dart sources for the service isolate.
- Cleanups to the embedder's Dart sources for the service isolate. This lets us stop keeping a local copy in the mojo and flutter trees.
- Let the VM know Observatory's server address.

R=zra@google.com

Review URL: https://codereview.chromium.org/1640773005 .
2016-01-29 07:43:21 -08:00
Zachary Anderson 5ee95b085f Move tar archive parsing to C++
This gives a 30+ms speedup to startup.

Also uses HashMap instead of Map for assets.

BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org/1474603003 .
2015-11-25 14:39:19 -08:00