Commit Graph

45 Commits

Author SHA1 Message Date
iposva@google.com 4721095f6b Fix issue 8161:
- Ensure that old generation collections invoke the API callbacks.
Review URL: https://codereview.chromium.org//12091036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17741 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 01:41:57 +00:00
tball@google.com 9146f935d9 Added heap capacity and used space status methods, for use by status tools.
Review URL: https://codereview.chromium.org//11973035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17235 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-17 21:06:59 +00:00
asiva@google.com 92dee42dcc Do not emit pointer information for embedded singleton VM Isolate objects while generating code. These embedded objects do not need to be visited during GC.
Review URL: https://codereview.chromium.org//11722026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16645 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 18:38:00 +00:00
iposva@google.com 3e367a12d8 - Consolidate verbose-gc output to be a single line which can be imported easily into spreadsheets.
Review URL: https://codereview.chromium.org//11734028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16624 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 02:15:36 +00:00
cshapiro@google.com 49f6f9f36d Merge the Merlin heap tracing to top-of-trunk.
Review URL: https://codereview.chromium.org//11428067

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16199 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-15 19:58:45 +00:00
cshapiro@google.com a7675e8dd3 Provide a mechanism for dumping of heap profiles on predefined events.
Review URL: https://codereview.chromium.org//11478012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15940 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-11 00:50:31 +00:00
cshapiro@google.com f5c4d7a381 Unify specification of file open, close, and write callbacks.
Review URL: https://codereview.chromium.org//11442024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15807 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 21:56:31 +00:00
kmillikin@google.com 6c4d17d65e Increment CompilerStats::code_allocated when allocating in executable pages.
R=iposva@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15586 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 13:29:42 +00:00
cshapiro@google.com 661488717d Avoid integer overflow when computing the size of new space in bytes.
Review URL: https://codereview.chromium.org//11276022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14118 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-26 01:26:56 +00:00
iposva@google.com dc2c8b3707 - Consolidate code into the old generation.
- Record pointers between code objects.
- Collect unreferenced code objects.
Review URL: https://codereview.chromium.org//11265026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14113 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-25 23:46:01 +00:00
cshapiro@google.com 40604757dc Lazy peer API.
This change provides getters and setters for a lazily allocated field
associated with every heap allocated object.  It is a generalization
of the peer field of external string instances, external byte array
instances, and the smrck field of closure instances.

Review URL: https://chromiumcodereview.appspot.com//10905251

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12511 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 21:15:46 +00:00
cshapiro@google.com da14bf70a7 Add attributions so printf like functions can have their arguments checked.
This change also corrects some misuses of format strings and format
arguments that discovered by the compiler checks.

Review URL: https://chromiumcodereview.appspot.com//10869063

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11912 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 00:58:25 +00:00
cshapiro@google.com 0265cf8b9e Report the reason for a garbage collection when verbose GC is enabled.
Review URL: https://chromiumcodereview.appspot.com//10872074

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11485 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 00:49:14 +00:00
asiva@google.com d4d781d636 - Unify class ids and snapshot object ids list so that we don't have disparate
and sometimes confusing values.
- Remove instance_kind_ field from RawClass.
- Rename all class id names to have a Cid suffix.
- Remove code from object.h and object_store.h which dealt with object ids
  of predefined classes for snapshots.
Review URL: https://chromiumcodereview.appspot.com//10827209

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10418 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 19:46:23 +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
iposva@google.com b21d7c16f6 - Tighten assertions around store buffers.
- Use the correct object when filtering in store barriers.
Review URL: https://chromiumcodereview.appspot.com//10796075

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9797 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-21 01:08:14 +00:00
iposva@google.com 7f843b0fc9 - Start using the collected store buffer entries to find
old->new references during Scavenge.
Review URL: https://chromiumcodereview.appspot.com//10797021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9791 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 21:41:55 +00:00
cshapiro@google.com 0928c651e5 Implement a 2-pass heap verification algorithm.
The previous algorithm would visit each pointer in the heap and verify it
without regard for whether the pointer had already been visited.

The new algorithm computes the set of allocated objects and verifies each
object in the set.  In a second pass, each pointer is visited and tested
for membership in the set.

BUG=2606

Review URL: https://chromiumcodereview.appspot.com//10696029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9532 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-10 22:07:40 +00:00
iposva@google.com 541a166410 - Premark vm_isolate objects to avoid having to test for them
during marking.
Review URL: https://chromiumcodereview.appspot.com//10675010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9143 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 00:08:03 +00:00
cshapiro@google.com dcaf11db96 Implement a heap profiler for the Dart managed heap.
This profiler will write binary HPROF data to a user provided stream that
can later be viewed by tools such as the Eclipse Memory Analyzer.

While all user defined types are accurately described in the profile data,
internal types that are not self-describing appear as empty objects.  This
will be addressed by a future change.

Review URL: https://chromiumcodereview.appspot.com//10452006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8636 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 00:08:07 +00:00
cshapiro@google.com 76f0099233 Force growth when retrying an old-space allocation.
Review URL: https://chromiumcodereview.appspot.com//10458072

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8411 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 22:29:09 +00:00
vegorov@google.com dc45a91a4e Avoid reading RawObject::class_ directly in the runtime.
Instead rely on tags_ and perform lookups through isolate's class table where appropriately.

R=iposva@google.com

Review URL: https://chromiumcodereview.appspot.com//10444091

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8244 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-04 10:29:00 +00:00
cshapiro@google.com b43a525cdb Implement growth policy for old space using time and space signals.
Review URL: https://chromiumcodereview.appspot.com//10442073

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8136 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 02:49:56 +00:00
iposva@google.com 004aecbed5 - Enable throwing of OOM on allocation failure.
Review URL: https://chromiumcodereview.appspot.com//10417046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7892 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 04:30:38 +00:00
iposva@google.com 5c7499c4fe - Add more information to --verbose-gc.
Review URL: https://chromiumcodereview.appspot.com//10414069

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7890 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 03:29:00 +00:00
asiva@google.com d373e34a00 Trace heap size during initialization after reading the snapshot.
Review URL: https://chromiumcodereview.appspot.com//10414048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7887 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 00:17:07 +00:00
asiva@google.com c483079e45 Remove the special stub code region as we don't need it anymore. With the new frame layout convention we can find the first dart frame quickly.
Review URL: https://chromiumcodereview.appspot.com//10409038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7778 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 23:28:34 +00:00
ricow@google.com 01fc874f57 Add requested allocation size information to fatal error when heap is exhausted.
Review URL: https://chromiumcodereview.appspot.com//10375046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7403 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-08 07:16:48 +00:00
iposva@google.com 4d3c2b94a2 - Add extra checking when validating objects.
- Properly set the class tags when converting growable arrays
  to fixed length arrays.
- Set the class tag when allocating instantiated type arguments. 
Review URL: https://chromiumcodereview.appspot.com//10271032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7190 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-01 15:16:02 +00:00
asiva@google.com 09adb99a85 Add a stub_code_space in the heap alongside code_space so that stub code generation happens here and it is easy to determine if a PC is a stub code or not.
This gets rid of the temporary change made in code_generator.cc for fast access to the top dart frame. In addition it will not pollute the pc ==> code cache that I plan to add next as we don't have to store stub pcs in that table.
Review URL: https://chromiumcodereview.appspot.com//10223015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7033 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-26 18:00:53 +00:00
regis@google.com 3f6efe251b Relax assert so that the ia32 disassembler does not choke on C-heap allocated
constant strings.
Review URL: https://chromiumcodereview.appspot.com//10114002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6654 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 19:56:29 +00:00
asiva@google.com 8f19524eb6 Report FATAL OOM error when the old heap space is exhausted.
Review URL: https://chromiumcodereview.appspot.com//10010049

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6493 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 01:07:38 +00:00
asiva@google.com 2d3775a1b1 Resubmit change 6302 after fixing the compiler warning on older GCC compiler versions:
Change 6302 description:
- Wire the stack frame iterator to use stack maps for traversing objects if
there are stack maps in the code object. If there are no stack maps it still
does the old style stack frame traversal between fp and sp looking for tagged
pointers.
- Added a mechanism to be able to iterate over the code space and look for a
particular object.
Review URL: https://chromiumcodereview.appspot.com//10030001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6331 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-09 18:20:23 +00:00
asiva@google.com c79da818cc Revert change 6302 until the compiler warning is addressed.
Review URL: https://chromiumcodereview.appspot.com//10025003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6304 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-07 02:04:28 +00:00
asiva@google.com c27cec5b6e - Wire the stack frame iterator to use stack maps for traversing objects if there are stack maps in the code object. If there are no stack maps it still does the old style stack frame traversal between fp and sp looking for tagged pointers.
- Added a mechanism to be able to iterate over the code space and look for a particular object.

- Remove registration of code objects into the code index table.
Review URL: https://chromiumcodereview.appspot.com//9791048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6302 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-07 01:44:48 +00:00
cshapiro@google.com f4c5dd4db3 Implement prologue weak persistent handles.
Prologue weak persistent handles are similar to weak persistent
handles but exhibit different behavior during garbage collections that
invoke the prologue and epilogue callbacks.  While weak persistent
handles always weakly reference their referents, prologue weak
persistent handles weakly reference their referents only during a
garbage collection occurs that invokes the prologue and epilogue
callbacks.  During all other garbage collections, prologue weak
persistent handles strongly reference their referents.

Review URL: https://chromiumcodereview.appspot.com//9655011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5445 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 23:41:59 +00:00
srdjan@google.com 92d6a081d0 Fix for issue r1469: DartVM appears to not GC closure reachable memory properly
(The issue was diagnosed and solved by Siva)

The problem appears when allocating large arrays that are stored in a context.
We allocate large arrays directly in the old space. The context in which these arrays are stored is in the new space. When we do an old gen GC we were not first scavenging the new space. As a result the large arrays still remained when we did the old-gen GC, resulting in OOM.

The fix is to do both a new gen scavenge and an old gen mark-sweep when we run out of space in the old gen.
Review URL: https://chromiumcodereview.appspot.com//9317054

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3856 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-02 18:22:25 +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
iposva@google.com 0d25bce528 - Trigger old-gen GCs when needed.
- Sweep large pages.
- Handle free list elements when calculating sizes.
Review URL: http://codereview.chromium.org//8996011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2593 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-19 19:29:10 +00:00
iposva@google.com 5e1e9534db - Implement the old sweeper.
Review URL: http://codereview.chromium.org//8898034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2485 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-15 22:37:35 +00:00
iposva@google.com 3117f4cbfc - Implement a simple old-generation marker.
Review URL: http://codereview.chromium.org//8761006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1962 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 02:11:40 +00:00
asiva@google.com 5cf3ad018a Changes to pass the current isolate to all runtime and native calls.
Review URL: http://codereview.chromium.org//8528010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1499 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-12 05:55:22 +00:00
asiva@google.com 5db460f310 Add command line options to specify the various heap size parameters.
Review URL: http://codereview.chromium.org//8423023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1059 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-02 00:48:33 +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