Commit graph

62 commits

Author SHA1 Message Date
Ryan Macnak 53fb57ea5e [vm, io] Restore global destructors for normal shutdown path.
Cf. ef4984566b.

TEST=samples/hello_world
Bug: https://github.com/dart-lang/samples/issues/195
Change-Id: I05cac92500a912c5d3e0771f626878decac18a9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324267
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-09-05 22:15:58 +00:00
Ryan Macnak ef4984566b [vm, io] Skip global destructors when using dart:io's exit.
TEST=msan
Bug: https://github.com/dart-lang/sdk/issues/51271
Bug: https://github.com/dart-lang/sdk/issues/51560
Change-Id: Ie3a487656173790d48c41c272a131ce51f667a9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321921
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-08-22 16:24:40 +00:00
Ryan Macnak b68351fbc3 [vm] Update NULL to nullptr in runtime/bin.
TEST=build
Change-Id: Ie3be570c274b0275a995a0f54b5e6ccdfc77ccd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292287
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2023-04-12 01:11:05 +00:00
Ryan Macnak 1eae028526 [vm] Fix zero-as-null-pointer-constant warnings in the VM.
Unfortunately we cannot enable -Wzero-as-null-pointer-constant because of zlib and icu headers we include.

TEST=build
Change-Id: I9ffd7d7e26f2b3dd616ce54d164b92e60a2366dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293882
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-04-10 21:38:57 +00:00
Tess Strickland 24683da915 [vm] Add OS and architecture to non-symbolic stack traces.
Examples of the new line added to non-symbolic stack traces:

os: linux arch: x64 comp: yes sim: no
(Running on linux-x64c)

os: macos arch: arm64 comp: no sim: yes
(Running on mac-simarm64)

This CL also abstracts out the separate hardcoded strings across
the codebase for host and target OS and architecture into
definitions in platform/globals.h to ensure that they stay
in sync across different uses.

TEST=vm/dart{,_2}/use_dwarf_stack_traces_flag

Issue: https://github.com/flutter/flutter/pull/101586
Change-Id: Ifdfea5138dd1003f561da0174e89aebc165bf9b0
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm_x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-mac-product-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm_x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-ffi-android-release-arm-try,vm-ffi-android-release-arm64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253283
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2022-08-05 11:53:37 +00:00
Ryan Macnak 70e3178215 [standalone] Set the process title based on the main script.
This makes it easier to identify the responsible program when a Dart process has high CPU or memory usage.

TEST=look at top
Change-Id: I0bf9e2f5c81aa82a4721b177b8db2bb6bf3fb002
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211303
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-08-31 19:33:10 +00:00
Martin Kustermann d511d177b3 [vm] Use atomic to avoid racy resolved platform string initialization
Issue https://github.com/dart-lang/sdk/issues/46626

TEST=This fixes TSAN reports on iso-stress builder.

Change-Id: I6797ff11f4d9b44ea72b2bb7beac715e2828f3a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207024
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-07-15 15:26:55 +00:00
Zach Anderson f407419d0a [vm] Reland: Prefix HOST_OS_* and TARGET_OS_* with DART_
This relands https://dart-review.googlesource.com/c/sdk/+/205633
but without renaming TARGET_OS_IPHONE to DART_TARGET_OS_IPHONE.
It also changes uses of TARGET_OS_IOS to
DART_TARGET_OS_MACOS_IOS to be consistent with the rest of the
VM.

TargetConditionals.h for XCode 13 defines several
TARGET_OS_* preprocessor symbols that confuse the
Dart build. There is probably a more targeted fix
for this, but renaming the symbols that Dart uses
will also prevent this problem if more symbols
are added to the platform headers in the future.

See: https://github.com/dart-lang/sdk/issues/46499

TEST=It builds.

Change-Id: Ie775c19dd23cfdf5f65e5ebc6ee4ec3a561676fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205860
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-07-02 19:06:45 +00:00
Slava Egorov 42164cc140 Revert "[vm] Prefix HOST_OS_* and TARGET_OS_* with DART_"
This reverts commit aa9201b76b.

Reason for revert: blocks G3 roll (b/192627187)

Original change's description:
> [vm] Prefix HOST_OS_* and TARGET_OS_* with DART_
>
> TargetConditionals.h for XCode 13 defines several
> TARGET_OS_* preprocessor symbols that confuse the
> Dart build. There is probably a more targeted fix
> for this, but renaming the symbols that Dart uses
> will also prevent this problem if more symbols
> are added to the platform headers in the future.
>
> See: https://github.com/dart-lang/sdk/issues/46499
>
> TEST=It builds.
> Change-Id: I3b33a03b4a9a14b76d55fe12f8cdefec4b3c3664
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205633
> Commit-Queue: Zach Anderson <zra@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

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

Change-Id: Ib06ca418c7e9d3b4df62c72c033cd39f462f7667
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205790
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2021-07-02 14:02:02 +00:00
Zach Anderson aa9201b76b [vm] Prefix HOST_OS_* and TARGET_OS_* with DART_
TargetConditionals.h for XCode 13 defines several
TARGET_OS_* preprocessor symbols that confuse the
Dart build. There is probably a more targeted fix
for this, but renaming the symbols that Dart uses
will also prevent this problem if more symbols
are added to the platform headers in the future.

See: https://github.com/dart-lang/sdk/issues/46499

TEST=It builds.
Change-Id: I3b33a03b4a9a14b76d55fe12f8cdefec4b3c3664
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205633
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-07-02 06:02:48 +00:00
Ben Konyi 103d54b304 Revert "[ VM ] Update embedding API to perform Platform initialization"
This reverts commit 729099cc5b.

Reason for revert: Causing crashes in google3 after roll (b/270314587).

Original change's description:
> [ VM ] Update embedding API to perform Platform initialization
> 
> Platform::Init (now Platform::InitOnce) was only being called directly
> from the CL embedder and could not be invoked via any path in the embedding
> API. Platform::InitOnce is now invoked in both dart::bin::BootstrapDartIo and
> dart::embedder::InitOnce.
> 
> Fixes https://github.com/dart-lang/sdk/issues/37586
> 
> Change-Id: I594908895c19e3058f707f920e265e79ca4cecd7
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117591
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Zach Anderson <zra@google.com>

TBR=bkonyi@google.com,zra@google.com,kpozin@google.com

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

Change-Id: I23253631e13d703e9e5384f9ec4ff6b79ef4ef21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118643
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-09-24 20:43:20 +00:00
Ben Konyi 729099cc5b [ VM ] Update embedding API to perform Platform initialization
Platform::Init (now Platform::InitOnce) was only being called directly
from the CL embedder and could not be invoked via any path in the embedding
API. Platform::InitOnce is now invoked in both dart::bin::BootstrapDartIo and
dart::embedder::InitOnce.

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

Change-Id: I594908895c19e3058f707f920e265e79ca4cecd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117591
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2019-09-20 18:26:19 +00:00
Jens Johansen 9f0872847d [VM] Linux with symbolic link to dart: still find kernel-service snapshot
Prior to this change, on Linux, if one created a symbolic link to the
dart executable and ran that, the kernel-service snapshot would not be
found. This has the effect of compiling the input script on a
non-trained kernel service, meaning the startup is slower.

This is particularly bad as the debian install of dart creates a symbolic
link to dart as /usr/bin/dart with the target being /usr/lib/dart/bin/dart
meaning that for instance running a hello-world script like one normally
would, `dart hello.dart` would take something along the lines of 3-4 times
longer than if running `/usr/lib/dart/bin/dart hello.dart`.
On my Pixelbook (in crostini) this is ~755 ms vs ~210 ms.

This change does *NOT* fix it on other platforms.

Change-Id: I6c9105d49205f3e4b9ea64e8ddb95a1d36ae21a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117144
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-17 07:25:38 +00:00
Ryan Macnak ebc4a59b61 Use Dart_PrepareToAbort in segfault handlers for consistency.
Change-Id: Ie4c838c8f8b68b16a0bda2e8a59005bee6c1bf30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111523
Reviewed-by: Samir Jindel <sjindel@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-08-01 16:41:43 +00:00
Zichang Guo 1509d9ad41 [vm] initialize sigaction for msan
msan didn't recognize instance initialized with memset or bzero. Initialize all the instances.

Bug: https://buganizer.corp.google.com/issues/137630695
Change-Id: I0f4adf90cd9d4daa2abe783b1e1ca892bdacb690
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109306
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2019-07-16 19:46:56 +00:00
Ryan Macnak 971f4845d7 [build] Remove last platform -> vm and bin -> vm dependencies. Fix some ODR violations.
Change some static_libraries to source_sets to make ODR violations link-time errors.

This is needed to enable (stop suppressing) -fvisibility=hidden in Fuchsia product builds.

Change-Id: I699cec8d4b516beab9cebf9db0a522a7ff99e004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99822
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-22 20:15:43 +00:00
Ryan Macnak 68946df573 [vm] Also print version information in assertion failures, not just faults.
Populate the dynamic symbol table for gen_snapshot.

Change-Id: Ib4712d2f481948f646ba4f5e353e0837b6391eab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95682
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-03-06 20:02:18 +00:00
Vyacheslav Egorov 040ef6aabb [gardening] Lower core rlimit to 0 if test is expected to crash.
We do not archive core dumps generated by tests that are expected
to crash - so there is no need to generate those dumps.

It seems that generating core dumps is very slow on Mac and causes
timeouts.

Fixes #35275

Remove Timeout expectations from Crashing tests

Change-Id: I36c89fd583a6a94521560544163f02414cbbf41a
Reviewed-on: https://dart-review.googlesource.com/c/85680
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-11-30 11:15:06 +00:00
Ryan Macnak 2048137583 Fix crash dump message not to claim the process was the standlone VM. This code is shared by other users of dart:io such as Flutter.
Change-Id: I0612670ad74fcfc2103ba93ac531c6f44ac44dc0
Reviewed-on: https://dart-review.googlesource.com/51804
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-04-19 18:16:59 +00:00
Ben Konyi 52afcba357 [ VM ] Fixed issue where process was suspended at exit when backgrounded.
Restoring console state when backgrounded causes SIGTTOU to be raised by
tcsetattr, which has the affect of suspending the process instead of
allowing it to complete. Blocking SIGTTOU results in tcsetattr failing
gracefully and the process running to completion.

Change-Id: I605dccbdbf311697881e5729e4fd64f1d60ed6b1
Reviewed-on: https://dart-review.googlesource.com/48823
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-03-30 20:33:12 +00:00
Ben Konyi 3c8d3b6870 [VM] Refactored console configuration out of platform_*.cc into console_config.h and reapplied c9700040c3 for POSIX platforms (Windows needs more work). We may also want to move code in bin/stdio.h.
Change-Id: Ic7cbc690f490e0127387d9a23866ea7eddbc84cf
Reviewed-on: https://dart-review.googlesource.com/45746
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-03-12 20:31:09 +00:00
Ryan Macnak 47ba426b62 [vm] Dump stack on SIGILL; print exception codes.
Bug: https://github.com/dart-lang/sdk/issues/32391
Change-Id: Ie75511fa17a4ef7a4794a52c34fef7bcb8b4ba81
Reviewed-on: https://dart-review.googlesource.com/44802
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-03-02 21:54:59 +00:00
Zach Anderson fe96de2858 Revert "Restore console to original state on VM exit. Fixes issue #30318."
This reverts commit c9700040c3.

Revert "[vm] Fix Fuchsia's Platform::Save/RestoreConsoleConfiguration."

This reverts commit 365f7b5a8b.

Reason for revert: newlines not printed correctly on Windows after
spawning a Dart VM process.

fixes #32172

Change-Id: I155752370bed7798fe91defdc61ccfe9f666b725
Reviewed-on: https://dart-review.googlesource.com/41840
Reviewed-by: Zach Anderson <zra@google.com>
2018-02-15 16:33:41 +00:00
Ben Konyi c9700040c3 Restore console to original state on VM exit. Fixes issue #30318.
Change-Id: I31b5da600ed5091cd788cde42b72e2fb910fe03a
Reviewed-on: https://dart-review.googlesource.com/39843
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-02-08 21:56:57 +00:00
Zachary Anderson e2bce948ed [dart:io] Adds Platform.operatingSystemVersion
fixes #30018

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/3006873002 .
2017-09-01 22:08:48 -07:00
Zachary Anderson d0295c873c [dart:io] Namespaces for file IO
Fuchsia requires the ability to sandbox Isolates w.r.t. file IO.
When a new Isolate starts, Fuchsia will pass the Isolate an object
called a namespace. We can translate the namespace object into a
file descriptor suitable for passing to the *at() family of
POSIX file system calls. The file system calls will then
have visibility only into the specified namespace.

We also plumb Namespaces through on all the other platforms as well to
make the change easier to test and so that in the future we can
implement e.g. per-isolate cwds.

This change adds a new internal class to dart:io called _Namespace,
which is implemented in a patch file. See:

sdk/lib/io/namespace_impl.dart
runtime/bin/namespace_patch.dart

The embedder can set up a non-default namespace by calling
_Namespace._setupNamespace during Isolate setup.

Instances of _Namespace have a native field that holds a pointer
to a native Namespace object. See:

runtime/bin/namespace.h

Calls from e.g. file_impl.dart are now also passed a
_Namespace object. The implementations in e.g. file.cc and
file_linux.cc then extract the namespace, and use it to compute a
file descriptor and path suitable for passing to e.g. openat().

related US-313

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

Review-Url: https://codereview.chromium.org/3007703002 .
2017-08-30 09:34:36 -07:00
Ryan Macnak a86bc67d9b [standalone] Register a segfault handler on Android as already done on Linux.
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2985963002 .
2017-07-27 09:47:24 -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
Zachary Anderson 07725f3dfa [Fuchsia] Fix Platform.executable and Platform.resolvedExecutable
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2941873002 .
2017-06-15 09:05:54 -07:00
Zachary Anderson be9c9f2237 [dart:io] Make Platform.localeName fall back on en_US if LANG is not defined
LANG is not defined on Fuchsia buildbots, causing some build-breakage.

R=pylaligand@google.com

Review URL: https://codereview.chromium.org/2843343002 .
2017-04-26 23:22:15 -07:00
Zach Anderson bc923bed16 [dart:io] Reland: Adds Platform.localeName
The Mac OS build broke because a typedef wasn't added until 10.12.

related #29126

Review-Url: https://codereview.chromium.org/2786183003 .
2017-03-30 13:51:46 -07:00
Zachary Anderson e75df3cce3 Revert "[dart:io] Adds Platform.localeName"
This reverts commit ae6d854ec6.

The build failed on the mac build bots. Need to investigate.

Review-Url: https://codereview.chromium.org/2791453002 .
2017-03-30 13:35:02 -07:00
Zachary Anderson ae6d854ec6 [dart:io] Adds Platform.localeName
related #29126

R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2785073002 .
2017-03-30 13:31:11 -07:00
Zach Anderson b3093ecee6 [dart:io] Move Platform.ansiSupported to {Stdin,Stdout}.supportsAnsiEscapes
On Windows, some Windows 10 builds support only ANSI output, but not
input, so these need to be separated.

I'm also improving the detection on Mac and Linux to avoid hardcoding
the result. Instead, supportsAnsiEscapes will be true if isatty() and
the TERM environment variable contains the string 'xterm'.

related #28614

R=lrn@google.com

Review-Url: https://codereview.chromium.org/2753233002 .
2017-03-17 12:35:36 -07:00
Ryan Macnak 877284947b Rename TARGET_OS_* to HOST_OS_*.
Like HOST_ARCH_*, HOST_OS_* describes the OS the VM is running on, which may be different from the OS the VM is generating code for during AOT compilation.

Currently we conflate the two when emitting AOT as assembly, and we get away with it because Flutter only uses assembly for targeting iOS and one can only target iOS from a Mac, but we expect to use assembly for Android as well so native tools can unwind Dart frames.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2750843003 .
2017-03-15 13:11:05 -07:00
Zach Anderson a8bf498e56 [dart:io] Adds Platform.ansiSupported
This is so that flutter_tool can determine whether it can print
ANSI codes to the terminal on windows.

fixes #28614,#28984

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2739683005 .
2017-03-15 08:51:50 -07:00
Ryan Macnak dfd471eea2 Make the segfault handler attempt to symbolize Dart frames.
R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2668443004 .
2017-01-30 16:38:50 -08:00
Florian Schneider 6cfce40fab Fix product and Mac build.
BUG=

Review URL: https://codereview.chromium.org/2518063008 .
2016-11-23 10:47:44 -08:00
Florian Schneider 6cd141def5 Dump stack trace on segfault in the VM.
Install a signal handler in the standalone VM that dumps a backtrace
similar to what we already do on assertion failures.

For now only Linux and MacOS are supported.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2514113002 .
2016-11-23 10:29:07 -08:00
Zachary Anderson 479a97b129 clang-format runtime/bin
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2480793002 .
2016-11-04 12:30:56 -07:00
Zachary Anderson 1336e6149f Search for a native extension for the host architecture
R=iposva@google.com

Review URL: https://codereview.chromium.org/1896203002 .
2016-04-20 08:02:16 -07:00
Zachary Anderson 7308e58c3f Really remove io support when dart:io is unsupported.
Previously we would compile in implementaitions of native calls for
IO functions that would never be used. This CL provides implementations
that throw a Dart exception if they're called by mistake. It also uses
a DART_IO_DISABLED preprocessor define to clean up the build files and
check that we're not including code we shouldn't.

R=iposva@google.com, johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1839463002 .
2016-03-29 11:22:03 -07:00
Zachary Anderson c75a817ee0 Fixes some memory leaks in //runtime/bin
Also some style cleanups.

Decided to fix these leaks by using Dart_ScopeAllocate
instead of malloc and new. Leaks are noted in the CL.

I haven't finished looking over all the code in
//runtime/bin yet, but this CL was getting big.

Review URL: https://codereview.chromium.org/1781883002 .
2016-03-14 11:08:52 -07:00
Zachary Anderson 3563dc0fb0 Use ExitProcess on Windows.
Even after joining threads, it is still possible for the exit code to be
polluted. NaCL uses ExitProcess to avoid this problem:

https://code.google.com/p/chromium/codesearch#chromium/src/native_client/src/shared/platform/win/nacl_exit.c

This change also cleans up thread local storage for the last Thread.

BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org/1410293006 .
2015-10-29 23:35:46 -07:00
Søren Gjesse e03ab17437 Make Platform.executable return the fully qualified path of the executable
BUG=http://dartbug.com/16994
R=kustermann@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//1145053002
2015-05-20 13:14:51 +02:00
johnmccutchan@google.com 172baa03ff Service isolate rework take 2
Review URL: https://codereview.chromium.org//889443002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43306 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-29 18:31:27 +00:00
johnmccutchan@google.com db271b0477 Revert r43217, r43215, r43208, r43207, and r43202.
Reverting because of some isolate spawn issues (on Windows, and pub bots).

Review URL: https://codereview.chromium.org//867113003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43219 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-27 22:56:18 +00:00
johnmccutchan@google.com 66aa470fc6 * Create vm-service isolate at Dart_Initialize time.
* Remove Service create callback.
* Simplify creation of service isolate.
* Creation is done on thread pool.
* Use vm-service isolate for loading in standalone embedder.
* Remove import of dart:io from builtin library.

performance changes:

no service isolate:

$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:27 | 100% | +12363 | -    0]

$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:27 | 100% | +12363 | -    0]

always start service isolate (as a thread pool task):

$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:45 | 100% | +12363 | -    0]

$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:44 | 100% | +12363 | -    0]

service does I/O (calls to Dart_LoadScript block until service is running):

$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:55 | 100% | +12363 | -    0]

$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:55 | 100% | +12363 | -    0]

R=asiva@google.com

Review URL: https://codereview.chromium.org//584023004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43202 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-27 19:45:48 +00:00
ajohnsen@google.com 0f52be7f63 Make std* blocking file-descriptors.
This will most likely be a performance regression when piping, that
we'll have to look into in the future (copying data through
    message-passing).

BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//154273003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32715 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-17 10:06:35 +00:00
ajohnsen@google.com b71e57617e Always mark stdout and stderr as blocking on exit.
This is required by some shell systems, such as Emacs.

BUG=https://code.google.com/p/dart/issues/detail?id=14301
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//59393003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29895 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 11:57:52 +00:00