Mercurial > hg > truffle
diff src/share/vm/memory/defNewGeneration.hpp @ 263:12eea04c8b06
6672698: mangle_unused_area() should not remangle the entire heap at each collection.
Summary: Maintain a high water mark for the allocations in a space and mangle only up to that high water mark.
Reviewed-by: ysr, apetrusenko
author | jmasa |
---|---|
date | Wed, 09 Jul 2008 15:08:55 -0700 |
parents | ba764ed4b6f2 |
children | 850fdf70db2b |
line wrap: on
line diff
--- a/src/share/vm/memory/defNewGeneration.hpp Fri Jun 27 19:12:11 2008 -0700 +++ b/src/share/vm/memory/defNewGeneration.hpp Wed Jul 09 15:08:55 2008 -0700 @@ -279,6 +279,9 @@ virtual void gc_prologue(bool full); virtual void gc_epilogue(bool full); + // Save the tops for eden, from, and to + virtual void record_spaces_top(); + // Doesn't require additional work during GC prologue and epilogue virtual bool performs_in_place_marking() const { return false; } @@ -299,9 +302,12 @@ // For non-youngest collection, the DefNewGeneration can contribute // "to-space". - void contribute_scratch(ScratchBlock*& list, Generation* requestor, + virtual void contribute_scratch(ScratchBlock*& list, Generation* requestor, size_t max_alloc_words); + // Reset for contribution of "to-space". + virtual void reset_scratch(); + // GC support virtual void compute_new_size(); virtual void collect(bool full, @@ -331,7 +337,12 @@ void verify(bool allow_dirty); protected: - void compute_space_boundaries(uintx minimum_eden_size); + // If clear_space is true, clear the survivor spaces. Eden is + // cleared if the minimum size of eden is 0. If mangle_space + // is true, also mangle the space in debug mode. + void compute_space_boundaries(uintx minimum_eden_size, + bool clear_space, + bool mangle_space); // Scavenge support void swap_spaces(); };