Commit Graph

91 Commits

Author SHA1 Message Date
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
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
Zichang Guo ed83a28d3e [dart:io] support Unix domain communications
Support Unix domain sockets communication on Linux, MacOS and Android.

Changes:
1. Add a field for InternetAddressType named unix.
2. Constructor of InternetAddress gains one more optional field: type. InternetAddress(String address, {InternetAddressType type});
3. Add another constructor to InternetAddress which taks raw address/path for ip/unix addresses as an argument. InternetAddress.fromRawAddress(Uint8List rawAddress, {InternetAddressType type});

The operation for unix domain sockets communication is basically the same as normal sockets except an InternetAddress with type unix should be passed.

Change-Id: I6a1135bbdd7f4e4fc745ccf8f95dec5272b6839b
Bug: https://github.com/dart-lang/sdk/issues/21403
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125932
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-03-23 03:51:40 +00:00
Zichang Guo 46ae3e4e7a [vm] not remove port if socket was listening by other isolates
Crashes come from assertion in ReturnTokens() and new_mask() in Eventhandler.
Another issue is when multiple serversockets bind to the same address, Socket will be reused to all Dart_Ports. But Socket didn't keep track of corresponding Dart Port.
When one of isolates is killed, finalizer wakes up and close most recent Dart Port that sends data.

After this cl, Socket may not be reused by different Dart Sockets. All Dart socket will has its own Socket object. But Sockets can have same fd.
This will guarantee finalizer will close right Dart Port.

Bug: https://github.com/dart-lang/sdk/issues/36106
Change-Id: Ib4620ada5f120ffda719052297009280c73b4315
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122490
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-11-06 16:28:12 +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
Dan Field 50418e07a1 Fix multicast_ttl patch for windows - previous patch made incorrect
call for setsockopt on Windows machines.


collapse if block


move raw_datagram_socket_test to standalone_2


update test, check for success


fix windows


Fix bug in TTL logic for IPv6

Change-Id: I7940e2e1a3c355ebef752f951464e5ade96d2153
Reviewed-on: https://dart-review.googlesource.com/c/83360
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-11-07 18:26:04 +00:00
Zach Anderson f3d21a8c0d Revert "Fix bug in TTL logic for IPv6"
This reverts commit ffe2116c27.

Reason for revert: Windows test failures on the bots.

Original change's description:
> Fix bug in TTL logic for IPv6
> 
> This was introduced by my previous CL - there is existing logic to set
> the TTL for multicast that works for IPv4 and IPv6, this patch ensures
> the correct call is made.
> 
> Change-Id: I8db7325ca79eb38c9de6d6e431231ed2ec1b0f47
> Reviewed-on: https://dart-review.googlesource.com/c/82023
> Reviewed-by: Zach Anderson <zra@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Zach Anderson <zra@google.com>

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

Change-Id: I06abb9f1aac638ab31541d66b55a3f5a29b0e5a9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/82885
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-11-05 21:16:45 +00:00
Dan Field ffe2116c27 Fix bug in TTL logic for IPv6
This was introduced by my previous CL - there is existing logic to set
the TTL for multicast that works for IPv4 and IPv6, this patch ensures
the correct call is made.

Change-Id: I8db7325ca79eb38c9de6d6e431231ed2ec1b0f47
Reviewed-on: https://dart-review.googlesource.com/c/82023
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-11-05 19:00:16 +00:00
Dan Field 055ce6f101 fix syntax error on android
Change-Id: Ibb16959dd31ea2e43de5ffc796bd93181f9fc6a7
Reviewed-on: https://dart-review.googlesource.com/c/80461
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-10-17 05:31:55 +00:00
Dan Field 130f57f7f3 missing include for android
Change-Id: I00cbf15b059d2a56ddf271a2c309bc210679bd7c
Reviewed-on: https://dart-review.googlesource.com/c/80460
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-10-17 04:44:35 +00:00
Dan Field 6e23c3b3cb Support SO_REUSEPORT and IP_MULTICAST_TTL for datagram sockets.
mDNS queries (and many other local queries) should be allowed to set
their TTL to 255.  This patch enables that on all platforms.

On macOS in particular, a system service reserves the mDNS port. The
socket option SO_REUSEPORT is required in addition to SO_REUSEADDR to
successfully bind there; the flag is also supported on Linux, so this
patch allows it to be used there as well (but prints an error message if
it's used on any other platform).

I could use some guidance as to tests for this - is it support availble
for running tests only on specific platforms?

Bug: https://github.com/dart-lang/sdk/issues/34799 and
Change-Id: I29b620d8ec04343f356a8171bae3d385ddfa9564
https://github.com/dart-lang/sdk/issues/34782
Reviewed-on: https://dart-review.googlesource.com/c/80082
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-10-17 01:48:52 +00:00
Ben Konyi 217e3e56fa [VM] Release SignalInfo objects on Isolate shutdown. Fixes #30042.
Change-Id: I611d6729e684e2b67acaa95ec304f5242c8ef946
Reviewed-on: https://dart-review.googlesource.com/46125
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-03-14 23:14:52 +00:00
Siva Annamalai 1e15e6f2d7 Fix for flutter issue 11260 (flutter/flutter#11260)
Do not rely on the udp_receive_buffer field from IsolateData as a buffer for
reading data in the recvfrom call.

Bug:
Change-Id: I43d19f624fd2a406429cc5387bd536524472b4f7
Reviewed-on: https://dart-review.googlesource.com/10212
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-03 15:09:31 +00:00
Zachary Anderson 747868f2b1 [dart:io] Remove DART_IO_DISABLED
This was only used by Dartium.

Review-Url: https://codereview.chromium.org/3009523002 .
2017-08-24 11:17:52 -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
Ben Konyi 6fbdd19ddb Various fixes for sync socket implementation.
Revert "Revert "Added sync_socket.h include in sync_socket_win.cc""

This reverts commit 2bd6168e1ebf35f6dbd9b2724339362c493377fc.

Revert "Revert "Added synchronous socket implementation to dart:io.""

This reverts commit a47bce03f5502dac7fb12e777e87b5aa1cfc830b.

BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2814773004 .
2017-04-12 14:20:48 -07:00
Ben Konyi b439bd9a54 Revert "Added synchronous socket implementation to dart:io."
This reverts commit a1f87ebdb8.

Revert "Added sync_socket.h include in sync_socket_win.cc"

This reverts commit bdec13e865.

BUG=

Review-Url: https://codereview.chromium.org/2812153002 .
2017-04-11 15:18:46 -07:00
Ben Konyi a1f87ebdb8 Added synchronous socket implementation to dart:io.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2803543006 .
2017-04-11 14:41:09 -07:00
Ben Konyi ddc4f30d75 Re-land socket refactor with fixes for Windows.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2797993005 .
2017-04-05 12:45:31 -07:00
Ben Konyi 0386f7ab6f Reverting until bots clear up.
Revert "Pulled a significant portion of Socket implementation into BaseSocket in order to prepare for the synchronous socket impementations which will also use these common methods."

This reverts commit 0422920142.

Revert "Updated incorrect call to Write in process_win.cc"

This reverts commit 9e1435148b.

Revert "Fixed incorrect call to Write from process_win.cc"

This reverts commit 11dcab2bed3c9ec8ec76bc200206ac202a4a5681.

Fixed incorrect call to Write from process_win.cc

BUG=

Review-Url: https://codereview.chromium.org/2791163004 .
2017-04-03 17:25:47 -07:00
Ben Konyi 0422920142 Pulled a significant portion of Socket implementation into BaseSocket in order to prepare for the synchronous socket impementations which will also use these common methods.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2780063002 .
2017-04-03 17:05:11 -07:00
Zachary Anderson 89dba57bcf [dart:io] Adds a finalizer to _NativeSocket to avoid socket leaks
The finalizer sends the "close" message to the EventHandler for the
file descriptor in the _NativeSocket's native field. To avoid races and
spurious messages, this CL stores a pointer to a wrapper object in the
native field instead of the file descriptor. All messsages about the
_NativeSocket sent to the EventHandler use the wrapper object instead of
the file descriptor. When the EventHandler closes the file, the file
descriptor in the wrapper object is set to -1 so that the finalizer will
instead do nothing.

On Windows, there is another level of indirection since the OS HANDLEs
were already wrapped in various kinds of Handle objects. As an additional
complication, ClientSocket close on Windows is asynchronous, so the
EventHandler may shutdown before all of the ClientSocket Handles can be
destroyed.

related #27898, #28081

R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2760293002 .
2017-03-28 07:44:05 -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
Zachary Anderson bb7aae9c4f Fix android build
Review URL: https://codereview.chromium.org/2516323002 .
2016-11-20 22:46:54 -08:00
Zachary Anderson 14233482d9 Fuchsia: Partial implementation of dart:io sockets
This changes the eventhandler to epoll and adds some code for sockets
to runtime/bin/sockets_fuchsia.cc. It also adds some simple tests
to hello_fuchsia.dart.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2515643004 .
2016-11-20 22:04:14 -08:00
Zachary Anderson 43a506bcc8 Adds some error handling to the socket implementation.
I'm starting to try to track down the hang in socket_test in
a call to read() on Mac. We weren't checking that the calls
to set fds non-blocking were successful, so I'll start with
adding code to do that.

This CL also fixes the GN arm android build.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2495003003 .
2016-11-11 21:15:16 -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
Florian Loitsch ef4933df25 Better error-message when bind fails.
See #26790.

R=sgjesse@google.com

Committed: https://github.com/dart-lang/sdk/commit/34aed6a08b8547a985ac701cf3910a5f5450dd52

Reverted: https://github.com/dart-lang/sdk/commit/a1005bad7e249a5510b30683a5ca52b16baafbc4

Committed: https://github.com/dart-lang/sdk/commit/8c4954492f0593f41d270691bb82c26d8509c894

Reverted: https://github.com/dart-lang/sdk/commit/5ebcd3cda0f34be580be1a8ed816849a82691427

Committed: https://github.com/dart-lang/sdk/commit/eaeb260244d524b54d3ec842af2f8400cd543b12

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

Reverted: https://github.com/dart-lang/sdk/commit/90a194be3c03c058c4e087e1bd11823817982393
2016-08-04 14:45:01 +02:00
Florian Loitsch 90a194be3c Enter a description of the change.
Merge branch 'master' into revert

Revert "Better error-message when bind fails."

This reverts commit eaeb260244.

Review URL: https://codereview.chromium.org/2213533002 .
2016-08-03 23:18:39 +02:00
Florian Loitsch eaeb260244 Better error-message when bind fails.
See #26790.

R=sgjesse@google.com

Committed: https://github.com/dart-lang/sdk/commit/34aed6a08b8547a985ac701cf3910a5f5450dd52

Reverted: https://github.com/dart-lang/sdk/commit/a1005bad7e249a5510b30683a5ca52b16baafbc4

Committed: https://github.com/dart-lang/sdk/commit/8c4954492f0593f41d270691bb82c26d8509c894

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

Reverted: https://github.com/dart-lang/sdk/commit/5ebcd3cda0f34be580be1a8ed816849a82691427
2016-08-03 22:44:28 +02:00
Zachary Anderson ba550f1c43 Fixes NetworkInterface.list crash on Android
Previously, Socket::ListInterfaces failed to set the os_error out
parameter causing a crash in the caller. This change sets an error here.

I've also added NetworkInterface.listSupported, which returns false on
Android, and true everywhere else. ifaddrs.h continues not to exist in
the NDK, so in order to support NetworkInterface.list, we'd have to
reimplement it, or find a suitable reimplementation somewhere.

related #26329

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1916223003 .
2016-04-26 07:48:58 -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 45661a7091 Cleanup in //runtime/bin
R=iposva@google.com

Review URL: https://codereview.chromium.org/1800863002 .
2016-03-16 10:01:00 -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
sgjesse@google.com b40b0690c6 Fix Android build
R=whesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43728 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 15:13:35 +00:00
sgjesse@google.com 3fe2af43d1 Reafctor to use 'const RawAddr&' or 'RawAddr*' in the eventhandler code
Also pass the port as part of RawAddr instead of in a separate argument
when both addr and port are passed.

R=kustermann@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43722 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 11:39:20 +00:00
sgjesse@google.com 7b7ac3620a Add support to specify the source address for socket connect
BUG=http://dartbug.com/22253
R=kustermann@google.com, lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43638 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 11:56:51 +00:00
sgjesse@google.com 91e7a32eb5 Remove SetNonBlocking/SetBlocking methods from Socket and add missing close-on-exec
The methods SetNonBlocking/SetBlocking on Sockets where not implemented on Linux
and not used on Windwsm. Removed and call directly to FDUtils when needed.

In Socket::Accept setting close on exec was missing on OS X and Android.

R=kustermann@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43627 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 07:29:36 +00:00
ajohnsen@google.com 343ee141f2 Don't print errors to stderr in socket_*.
BUG=https://code.google.com/p/dart/issues/detail?id=20070
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38660 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 07:13:58 +00:00
ajohnsen@google.com d481c8b61c Start accepting incoming sockets earlier on Windows, to associate a at AcceptEx error to 'ServerSocket.bind'.
Note that I have not been able to reproduce the error, thus no test is added for this case.

BUG=http://code.google.com/p/dart/issues/detail?id=19815
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38606 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-28 11:36:35 +00:00
iposva@google.com 1d2085e773 - Fix truncation in Socket calls.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37037 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-05 17:33:52 +00:00
zra@google.com 47d03a04a0 Adds AI_ADDRCONFIG back to address lookup on Android.
R=ajohnsen@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35425 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 14:45:34 +00:00
zra@google.com 37baacb116 Small fixes for Android.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35342 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 23:20:24 +00:00
ajohnsen@google.com 0c157cd31e Move signal_blocker to platform and use it by default in TEMP_FAILURE_RETRY.
BUG=http://code.google.com/p/dart/issues/detail?id=16927
R=johnmccutchan@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33745 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 13:51:11 +00:00
sgjesse@google.com 1e3e88769f Socket I/O statistics for Observatory
This is the first part of adding I/O statistics to the observatory.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33366 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-06 11:12:08 +00:00
ajohnsen@google.com 4b35c1e387 Fix host lookup on linux, to skip IPv6 if there are no global IPv6 addresses.
BUG=https://code.google.com/p/dart/issues/detail?id=16742
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32716 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-17 10:08:34 +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
johnmccutchan@google.com 919dc2d6eb * Introduce ThreadInterrupter which calls a TLS set callback when thread is interrupted.
* Threads can only register and unregister themselves with ThreadInterrupter.
* Profiler is no longer involved in interrupting threads. It's just a callback and the buffer.
* Profiler operates lock free using an atomic operation to reserve sample in sample buffer.
* Linux, Mac, and Windows done.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31170 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-16 18:52:15 +00:00