Commit Graph

37 Commits

Author SHA1 Message Date
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
iposva@google.com 391cefa02e - Consider the growth policy even when allocating large pages.
Review URL: https://codereview.chromium.org//11434056

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16267 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 17:45:55 +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
vegorov@google.com a3cf827526 Never try to add 0 bytes to free list.
R=iposva@google.com
BUG=dart:7288

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16114 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 14:48:30 +00:00
cshapiro@google.com 716c14a2a2 Improve the reporting of scavenger and free list reports.
The scavenger now reports survival and promotion statistics.

The statistics for the large free list are now reported.  Previously,
only information about the small free list was printed.  Each report
indicates whether the data is from before or after a garbage collection,
each row of a report is preceded by the free list type (small or large),
and cumulative bytes are reported for the free list type.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16074 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 22:58:24 +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
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
iposva@google.com 5e9f303d5d - Do not bump allocate in old-space pages. Always use
the freelist in preparation for chunked allocation.
Review URL: https://codereview.chromium.org//11186013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13792 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-18 17:40:12 +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
cshapiro@google.com c61c303275 Fix a build break caused by a type mismatch on 64-bit build targets.
Review URL: https://chromiumcodereview.appspot.com//10871096

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11430 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 02:44:28 +00:00
cshapiro@google.com 16b554d4d0 Increase the page space growth rate when there is insufficient free space.
Review URL: https://chromiumcodereview.appspot.com//10876095

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11429 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 02:32:55 +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
cshapiro@google.com 8aebf0a46f Revert "Revert "Favor free list allocation to bump pointer allocation.""
This reverts commit c3636953f7d7ab118b2c420b81058a0681fd237f.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9796 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-21 00:55:47 +00:00
cshapiro@google.com 5596b96762 Revert "Favor free list allocation to bump pointer allocation."
This reverts commit afe0eb0d9277cb7574a9595b793f8e001bc14a57.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9774 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 03:44:48 +00:00
cshapiro@google.com bc6dd1df70 Favor free list allocation to bump pointer allocation.
This change improves the utilization of the smallest size classes on
benchmarks performing old space allocations including Splay, Box2D,
and Dart2JSCompileAll.

Initial measurements showed that free list allocation was slightly
slower than bump pointer allocation.  Profiling identified that free
list allocation spent most of its time searching for a matching size
class.  To eliminate this overhead, a bitmap index has been added
resulting in no appreciable difference in running time between either
method.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9773 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 03:11:59 +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
cshapiro@google.com 18381ac8d5 Log growth policy decisions when verbose gc is enabled.
This change also rationalizes some use of signed and unsigned types and
corrects the use of time values recorded for analysis.

BUG=3535

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9045 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 21:17:38 +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
cshapiro@google.com 2a3cb499af Ignore the growth policy when fragmentation prevents allocation.
Review URL: https://chromiumcodereview.appspot.com//10458054

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8138 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 04:20:16 +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
vegorov@google.com aad59d6edb Reland r6578 without changing the order of pages in the PageSpace::pages_ list.
Linking newly allocated pages into the list's head causes popular pages to move further to the end of the list.  This causes slowdown on the debug VM because method PageSpace::Contains has to do more probes for popular objects.

R=iposva@google.com
BUG=2660

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6940 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 13:37:51 +00:00
kasperl@google.com 62d7b405c0 Revert "- Free completely empty pages as part of sweep."
This reverts r6578.

TBR'ed (discussed over chat).

R=iposva@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6792 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-20 12:14:31 +00:00
iposva@google.com 926d554112 - Free completely empty pages as part of sweep.
Review URL: https://chromiumcodereview.appspot.com//10093010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6578 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 14:25:00 +00:00
iposva@google.com 85b2b6f32a - Use the free top of old-space pages when allocating.
Review URL: https://chromiumcodereview.appspot.com//10057001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6405 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 11:54:01 +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
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 7d5e5ec8a2 - Promote objects from new gen to old space if they survived a scavenge.
- Properly initialize the tags in intrinsified allocation.
- Check for valid tag bits.
Review URL: http://codereview.chromium.org//9027017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2796 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-23 00:14:05 +00:00
iposva@google.com 169dcfb5ff - Honor max_capacity even for large page allocation.
Review URL: http://codereview.chromium.org//8962006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2555 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-16 23:40:41 +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
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