Commit Graph

20 Commits

Author SHA1 Message Date
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
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 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
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
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 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 a1bcf051d8 clang-format runtime/vm
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Siva Annamalai b78aeee6f2 Fix race condition with HasMutatorThread that was being used without a lock.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2191723002 .
2016-07-28 18:32:52 -07:00
Srdjan Mitrovic 4465fc3492 Address Siva's comments from https://codereview.chromium.org/1877973002/
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1880233002 .
2016-04-12 15:44:50 -07:00
Srdjan Mitrovic f5392ea09a Fix background compilation: allocate stubs at safepoint
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1710443003 .
2016-02-17 13:17:26 -08:00
Zachary Anderson 1fb050baa0 Fixes shutdown crashes.
- Restores fix to debug message queue.
- Fixes for precompilation.

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

Review URL: https://codereview.chromium.org/1406013004 .
2015-10-26 15:43:27 -07:00
John McCutchan 6fc0af49dd Build fixes for fnl/musl
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1406253005 .
2015-10-21 09:17:55 -07:00
koda@google.com 2965f45064 Simplify VirtualMemory by removing unused ReserveAligned method.
Also add the ability to truncate without actually unmapping.
Note: We never create holes in the underlying reservation.

This CL is in preparation for using a thin wrapper around VirtualMemory to verify our upcoming concurrent write barrier.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41017 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-09 15:59:28 +00:00
fschneider@google.com 78fbacbd87 Fix flag to switch write protection of code pages on/off.
TBR=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32549 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-11 10:17:03 +00:00
fschneider@google.com d6178535b2 Landing: Write protect executable pages in the VM.
Change executable pages to be read/execute but not writable by default.

All pages are made temporarily writable just before a full GC, because both
the mark and sweep phases write to the pages. When allocating in a page and
when patching code, the pages are made temporarily writable.

The order of allocation of Code and Instructions objects is changed so that
a GC will not occur after Instructions is allocated. (A full GC would
render the Instructions unwritable.) A scoped object is used to make memory
protection simpler.

Original CL: https://codereview.chromium.org/106593002/

I added a cc test that is expected to crash.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32493 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-10 12:18:06 +00:00
iposva@google.com 9046a44a37 Prepare for removal of source_filter.gypi:
- Guard OS-dependent source files with #if TARGET_OS_* in a similar
  fashion to the architecture dependent sources.
Review URL: https://codereview.chromium.org//12282051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18786 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-20 21:17:38 +00:00
iposva@google.com d68bf3be66 - Add the ability to protect VirtualMemory.
- Write protect the VM isolate once it has been constructed.
Review URL: https://chromiumcodereview.appspot.com//10830045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9984 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-27 18:07:59 +00:00
sgjesse@google.com 65896148c9 Move utils.h and utils.cc from runtime/vm to runtime/platform
Moved additional parts of globals.h from vm/ to platform/ to support
types and constants used by utils.*.

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

BUG=
TEST=

Review URL: http://codereview.chromium.org//9209001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3337 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-16 13:23:40 +00:00
sgjesse@google.com bf67f24098 Move assert.h/assert.cc from runtime/vm to runtime/platform
The purpose of this change is twofold:

1. Source in the bin directory can now use the same assertions as
   source in the vm directory. The ASSERT macro used by the code
   in runtime/bin was just defined to use assert from the standard
   C library.
2. Moving other implementation parts from runtime/vm to
   runtime/platform (e.g. classes Monitor and Mutex) for sharing
   between runtime/bin and runtime/vm will be easier as these
   implementations rely on these assertion macros.

Created two gypi files for the platform directory. One for the
headers and one for the source. The source one is only included
when building the VM library and will be present in libdart.a
when the dart executable is linked.

All the code for asserts is still in the dart namespace.

Also re-arranged the order of includes to be alphabetically in
the files touched.

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

BUG=
TEST=

Review URL: http://codereview.chromium.org//9189003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3335 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-16 12:28:10 +00:00
dgrove@google.com 4c0f559d23 Initial checkin.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00