Mercurial > hg > truffle
diff src/share/vm/memory/genRemSet.hpp @ 6725:da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author | coleenp |
---|---|
date | Sat, 01 Sep 2012 13:25:18 -0400 |
parents | d2a62e0f25eb |
children | 330dfb0476f4 |
line wrap: on
line diff
--- a/src/share/vm/memory/genRemSet.hpp Fri Aug 31 16:39:35 2012 -0700 +++ b/src/share/vm/memory/genRemSet.hpp Sat Sep 01 13:25:18 2012 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,10 +35,22 @@ class OopsInGenClosure; class CardTableRS; +// Helper to remember modified oops in all klasses. +class KlassRemSet { + bool _accumulate_modified_oops; + public: + KlassRemSet() : _accumulate_modified_oops(false) {} + void set_accumulate_modified_oops(bool value) { _accumulate_modified_oops = value; } + bool accumulate_modified_oops() { return _accumulate_modified_oops; } + bool mod_union_is_clear(); + void clear_mod_union(); +}; + class GenRemSet: public CHeapObj<mtGC> { friend class Generation; BarrierSet* _bs; + KlassRemSet _klass_rem_set; public: enum Name { @@ -62,6 +74,8 @@ // Set the barrier set. void set_bs(BarrierSet* bs) { _bs = bs; } + KlassRemSet* klass_rem_set() { return &_klass_rem_set; } + // Do any (sequential) processing necessary to prepare for (possibly // "parallel", if that arg is true) calls to younger_refs_iterate. virtual void prepare_for_younger_refs_iterate(bool parallel) = 0; @@ -121,7 +135,7 @@ // younger than gen from generations gen and older. // The parameter clear_perm indicates if the perm_gen's // remembered set should also be processed/cleared. - virtual void clear_into_younger(Generation* gen, bool clear_perm) = 0; + virtual void clear_into_younger(Generation* gen) = 0; // Informs the RS that refs in the given "mr" may have changed // arbitrarily, and therefore may contain old-to-young pointers. @@ -136,7 +150,7 @@ // younger indicates if the same should be done for younger generations // as well. The parameter perm indicates if the same should be done for // perm gen as well. - virtual void invalidate_or_clear(Generation* gen, bool younger, bool perm) = 0; + virtual void invalidate_or_clear(Generation* gen, bool younger) = 0; }; #endif // SHARE_VM_MEMORY_GENREMSET_HPP