Matthew Dempsky
8debb4e9db
[fuchsia] Add zx_vmo_replace_as_executable calls
...
In the future, newly created VMOs on Fuchsia will not be mappable as
executable by default. In preparation for that, start using
zx_vmo_replace_as_executable to mark Fuchsia's VMOs as executable as
needed.
SEC-42
TEST=CQ
Change-Id: I9df86bbb33b02042260727d64e74b7146eb1d1a6
Reviewed-on: https://dart-review.googlesource.com/76304
Reviewed-by: Zach Anderson <zra@google.com >
Commit-Queue: Zach Anderson <zra@google.com >
2018-09-25 04:55:02 +00:00
David Moore
aa0d868b81
[syscalls] Change vmar..._old() calls back and use new params
...
ZX-2264
Test:CQ
Change-Id: I9765bf5b2d8f143710af9c423bbd762a94ec2159
Reviewed-on: https://dart-review.googlesource.com/72142
Reviewed-by: Ryan Macnak <rmacnak@google.com >
2018-08-30 22:06:39 +00:00
David Moore
975686d5a9
[syscalls] Use vmar..._old apis.
...
Modify existing calls to vmar routines in preparation for changing
the parameter order.
ZX-2264
Test: CQ
Change-Id: Iaed6ca55b890e0d8ab557b5b96d6760020a645d9
Reviewed-on: https://dart-review.googlesource.com/61480
Reviewed-by: Adam Barth <abarth@google.com >
Reviewed-by: Zach Anderson <zra@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2018-06-21 23:48:23 +00:00
Ryan Macnak
9b5a931b06
[vm] Replace most runtime/vm uses of OS::Print with OS::PrintErr.
...
Leave --print-snapshot-sizes on stdout because it is parsed by Flutter benchmarks.
Replace all runtime/bin uses of OS::Print with Log::Print.
Bug: https://github.com/dart-lang/sdk/issues/32134
Change-Id: I74aacfb410cdfa9270d06e7f6ab0534520c7c7ba
Reviewed-on: https://dart-review.googlesource.com/60021
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Zach Anderson <zra@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2018-06-13 19:51:40 +00:00
Ryan Macnak
7855487b80
[fuchsia] Don't attempt to free an empty region.
...
Bug: https://github.com/dart-lang/sdk/issues/31841
Change-Id: I4344372316db09a891764423077e651259a49362
Reviewed-on: https://dart-review.googlesource.com/34020
Reviewed-by: Zach Anderson <zra@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2018-01-10 21:30:48 +00:00
Ryan Macnak
e14b3a86f0
Report errno on mprotect failure.
...
Bug: b/70275153
Change-Id: I81b868b25428b39835935846ba2c9f9f67b3e84d
Reviewed-on: https://dart-review.googlesource.com/33665
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2018-01-10 01:37:49 +00:00
Ryan Macnak
a144e263ce
Allocate from the root VMAR on Fuchsia.
...
Removes the need for the VmarList.
Overallocate VMOs instead of VMARs to get aligned memory.
Change-Id: I0c2c85e952b8c6958e28ac734b5ba54c7712a512
Reviewed-on: https://dart-review.googlesource.com/30383
Reviewed-by: Zach Anderson <zra@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2017-12-19 21:47:44 +00:00
Ryan Macnak
b247090c9e
[vm] Align old-space pages.
...
Allows quick access to the page header for any old-space object, which is a convenient place to keep forwarding information.
Also combine the reserve and commit operations of VirtualMemory.
Bug: https://github.com/dart-lang/sdk/issues/30978
Change-Id: Id3fe06932f7bef882bb1cc29d72441b0a3602eb6
Reviewed-on: https://dart-review.googlesource.com/17046
Reviewed-by: Erik Corry <erikcorry@google.com >
Reviewed-by: Zach Anderson <zra@google.com >
2017-10-30 22:02:20 +00:00
George Kulakowski
5923ff4900
Reorder Fuchsia file headers and gn format
...
These were left out of order by the mechanical changes that were part
of Fuchsia's Magenta->Zircon rename.
Change-Id: I41c81eb889c6076ffe82102018721e5abc74e7ac
Reviewed-on: https://dart-review.googlesource.com/6165
Reviewed-by: Zach Anderson <zra@google.com >
2017-09-15 20:28:49 +00:00
George Kulakowski
7800d2a995
Rename Magenta to Zircon, along with related abbreviations
...
Change-Id: Ic4215ceb00f5a60d21ec1398fd398a9f78a9eb94
Reviewed-on: https://dart-review.googlesource.com/6100
Reviewed-by: Zach Anderson <zra@google.com >
2017-09-15 14:54:18 +00:00
Zachary Anderson
15ba173993
[Fuchsia] Rename MG-nnn -> ZX-nnn
...
Change-Id: Ia84cd53ef3dcfd13a7feb22178583e00705a4e4b
Reviewed-on: https://dart-review.googlesource.com/5290
Reviewed-by: Zach Anderson <zra@google.com >
2017-09-12 20:28:12 +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
881bf01534
Allocate the profiler sample buffer and zone segments with virtual memory instead of malloc.
...
Allows naming their memory regions.
Add check for failed sample buffer allocation.
R=zra@google.com
Review-Url: https://codereview.chromium.org/2955493002 .
2017-06-23 14:06:44 -07:00
Zachary Anderson
1393e84863
[Fuchsia] Give VMOs names
...
This CL assigns names to vmos formatted as "isolate space type" where
isolate is the name of the isolate, space is "oldspace" or "newspace",
and type is "code" or "data".
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2929203002 .
2017-06-09 15:33:18 -07:00
Zachary Anderson
a834e6dcf3
Update Fuchsia-specific code to use the new MX_ error names
...
R=zra@google.com
Review-Url: https://codereview.chromium.org/2935483002 .
2017-06-09 13:19:54 -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
c6b5c19347
[Fuchsia] Use magenta/process.h for mx_job_default, mx_vmar_root_self
...
Those symbols will soon be removed from magenta/syscalls.h.
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2711273003 .
2017-02-24 08:00:49 -08:00
Ryan Macnak
8b217ec519
Rename references to "external pages" as "image pages" to avoid confusion with the kind of external memory associated with finalizers.
...
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2654183002 .
2017-01-26 09:53:06 -08:00
Zachary Anderson
672aab3cd3
Fuchsia: Implement memory region protections
...
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2652873002 .
2017-01-24 21:44:32 -08:00
Zachary Anderson
cf631890c6
Fuchsia: Memory reservation and partial unmapping
...
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2594733003 .
2016-12-21 07:46:41 -08:00
Zachary Anderson
b556a560dd
Fuchsia: Switch to new virtual memory syscalls
...
mx_process_map_vm and mx_process_unmap_vm are deprecated.
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2583543004 .
2016-12-15 19:27:10 -08:00
Zachary Anderson
a1bcf051d8
clang-format runtime/vm
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Adam Barth
913b592a4e
Move to the new mx_vmo_syscall argument order
...
BUG=
R=abarth@google.com , zra@google.com
Review URL: https://codereview.chromium.org/2471343002 .
2016-11-03 14:17:20 -07:00
Adam Barth
a850b4c977
Remove use of magenta/process.h.
...
BUG=
R=abarth@google.com
Review URL: https://codereview.chromium.org/2461393003 .
2016-10-31 18:03:18 -07:00
James Robinson
8a53ba91de
Stop using deprecated (names of) magenta syscalls.
...
R=jamesr@chromium.org
Review URL: https://codereview.chromium.org/2355953004 .
2016-09-20 15:55:51 -07:00
Adam Barth
22010919e9
Update to use mx_process_self()
...
The map and unmap calls now need mx_process_self() instead of zero as the
process handle.
2016-09-12 14:06:33 -07:00
Zachary Anderson
74bbc7f55f
Fuchsia: Make some more VM tests pass
...
R=asiva@google.com
Review URL: https://codereview.chromium.org/2189973003 .
2016-07-29 08:07:25 -07:00
Zachary Anderson
8ccb85e38e
[fuchsia] Update to new spelling of magenta syscalls
...
These now have an mx_ prefix instead of a _magenta prefix as of
https://fuchsia.googlesource.com/magenta/+/937bde71d2
R=zra@google.com
Review URL: https://codereview.chromium.org/2154443002 .
2016-07-14 14:31:07 -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
Zachary Anderson
a503570e3a
Fuchsia: Initial check-in.
...
Instructions to build and run are in README.fuchsia.
R=asiva@google.com
Review URL: https://codereview.chromium.org/2117593002 .
2016-07-01 12:42:05 -07:00