Ryan Macnak
88d7f53359
[standalone] Truncate names passed to pthread_setname_np.
...
pthread_setname_np ignores names that are too long rather than truncating. This was causing most dart:io threads to remain unnamed.
Cf. eec49f34c4 .
TEST="thread info" in gdb
Change-Id: I12f47b06b81f1204f742d829e14784d792a4fb96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215800
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Alexander Aprelev <aam@google.com >
2021-10-06 17:46:29 +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
Ryan Macnak
c873220e43
[vm, arm64] Adjust CSP during the invocation stub instead of each function prologue.
...
Since 6e2c4636cd , we have more reliable information about the stack limit.
This saves 8 bytes from each function.
Flutter Gallery:
Instructions(CodeSize): 6491472 -> 6375472 (-1.79%)
Total(CodeSize): 10375882 -> 10258802 (-1.13%)
Bug: https://github.com/dart-lang/sdk/issues/26472
Bug: https://github.com/dart-lang/sdk/issues/39083
Change-Id: I1d8e4c4bfd858eca1d0e4e5640faae15f4dbbe8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122845
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2019-10-25 19:21:56 +00:00
Ryan Macnak
86af66a3ee
Revert "[vm, arm64] Adjust CSP during the invocation stub instead of each function prologue."
...
This reverts commit b5b322962a .
Reason for revert: low frequency of crashes in service tests
Original change's description:
> [vm, arm64] Adjust CSP during the invocation stub instead of each function prologue.
>
> Since 6e2c4636cd , we have more reliable information about the stack limit.
>
> This saves 8 bytes from each function.
>
> Flutter Gallery:
> Instructions(CodeSize): 6491472 -> 6375472 (-1.79%)
> Total(CodeSize): 10375882 -> 10258802 (-1.13%)
>
> Bug: http://dartbug.com/26472
> Change-Id: Ief1ddd25eecd32a8314c71fdb470dd73046e5dc0
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122408
> Commit-Queue: Ryan Macnak <rmacnak@google.com >
> Reviewed-by: Alexander Markov <alexmarkov@google.com >
TBR=rmacnak@google.com ,alexmarkov@google.com ,ajcbik@google.com
Change-Id: I0b45e1c81c1534e123dd85d27b7af27217e08795
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: http://dartbug.com/26472
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122725
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2019-10-24 04:12:16 +00:00
Ryan Macnak
b5b322962a
[vm, arm64] Adjust CSP during the invocation stub instead of each function prologue.
...
Since 6e2c4636cd , we have more reliable information about the stack limit.
This saves 8 bytes from each function.
Flutter Gallery:
Instructions(CodeSize): 6491472 -> 6375472 (-1.79%)
Total(CodeSize): 10375882 -> 10258802 (-1.13%)
Bug: http://dartbug.com/26472
Change-Id: Ief1ddd25eecd32a8314c71fdb470dd73046e5dc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122408
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2019-10-24 02:40:43 +00:00
Ryan Macnak
0f24b9e7ae
[standalone] Name dart:io threads, take 2.
...
Mac's pthread_setname_np assumes the current thread.
Bug: US-588
Change-Id: Ibbddd1f7bffeab10fd470a6176f68b1c0440aa99
Reviewed-on: https://dart-review.googlesource.com/c/93120
Reviewed-by: Zach Anderson <zra@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2019-02-13 20:29:46 +00:00
Ryan Macnak
d566a674d0
Revert "[standalone] Name dart:io threads."
...
This reverts commit cc3218b771 .
Reason for revert: Mac build
Original change's description:
> [standalone] Name dart:io threads.
>
> Change-Id: I5f5248366b39afab96a8b70b4f107ec5134b84f4
> Reviewed-on: https://dart-review.googlesource.com/c/92960
> Reviewed-by: Zach Anderson <zra@google.com >
> Commit-Queue: Ryan Macnak <rmacnak@google.com >
TBR=rmacnak@google.com ,zra@google.com ,asiva@google.com
Change-Id: I9071c955d4710f8146a661d15fa980f237b6eb81
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/93064
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2019-02-13 18:04:49 +00:00
Ryan Macnak
cc3218b771
[standalone] Name dart:io threads.
...
Change-Id: I5f5248366b39afab96a8b70b4f107ec5134b84f4
Reviewed-on: https://dart-review.googlesource.com/c/92960
Reviewed-by: Zach Anderson <zra@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2019-02-13 17:23:56 +00:00
Ryan Macnak
cb522bfcd2
[vm] Update Windows synchronization code to CONDITION_VARIABLEs and SRWLOCKs.
...
Use CRITICAL_SECTIONs for dart::bin::Monitor as the event handler requires a recursive monitor.
Requires Vista or later.
Bug: https://github.com/dart-lang/sdk/issues/35029
Bug: https://github.com/dart-lang/sdk/issues/35118
Change-Id: I1e96c5b428257649a45d26a979fba53a10f02151
Reviewed-on: https://dart-review.googlesource.com/c/20901
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Ben Konyi <bkonyi@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2018-11-09 18:44:49 +00: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
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
9b8ce83ef3
Fuchsia: Use new call to get thread CPU time
...
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2613283002 .
2017-01-07 14:45:34 -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
Zach Anderson
5f59a954f8
Uses an open thread handle as the ThreadJoinId on Windows.
...
Also:
- Reaps exited threads in the thread pool before putting
a thread on the idle list so that a new arriving task
isn't blocked on a supposedly idle thread in the middle
of a join.
- Stops trying to join eventhandler threads on
Windows. Now that we're using the correct exit() call,
we probably don't have to worry about exit code pollution,
so joining the threads is unnecessary.
related #26400
R=asiva@google.com , iposva@google.com
Review URL: https://codereview.chromium.org/1978153002 .
2016-05-17 13:18:13 -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
Florian Schneider
59fd6c8397
VM: Small clean up and const-ness fix for Thread/OSThread constants.
...
BUG=
R=srdjan@google.com
Review URL: https://codereview.chromium.org/1482243006 .
2015-12-02 12:30:12 +01:00
John McCutchan
aaf37ad035
Landing patch set 7 from https://codereview.chromium.org/1450113003/
...
Review URL: https://codereview.chromium.org/1466523002 .
2015-11-19 14:18:52 -08:00
John McCutchan
28e416b1f4
Revert "Avoid strerror_r portability issues"
...
This reverts commit ca81c1732b .
2015-11-17 16:34:25 -08:00
John McCutchan
ca81c1732b
Avoid strerror_r portability issues
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1450113003 .
2015-11-17 15:23:47 -08:00
iposva@google.com
e57e60c300
Fix Windows Dartium build:
...
- Cannot access dart::bin::* from Dartium build.
Review URL: https://codereview.chromium.org//473763002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39238 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 05:00:37 +00:00
iposva@google.com
5a383e7add
- Make sure that the threads for dart::bin are in the correct namespace.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//471743002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39233 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 00:06:04 +00:00
iposva@google.com
ea4e984b66
- Do not use platform/thread.h
...
Review URL: https://codereview.chromium.org//462353002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39177 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 23:43:45 +00:00
iposva@google.com
14ecdbd66a
- Separate the thread implementation used in bin/ and vm/
...
to allow us to make VM specific changes.
R=asiva@google.com
Review URL: https://codereview.chromium.org//463993002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39172 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 23:19:53 +00:00