< prev index next >

src/hotspot/share/gc/parallel/psParallelCompact.hpp

Print this page
rev 57486 : imported patch 8235860-remove-serial-old-gc
rev 57487 : [mq]: 8235860-kbarrett-review
   1 /*
   2  * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 864   return _words_remaining;
 865 }
 866 
 867 inline bool ParMarkBitMapClosure::is_full() const {
 868   return words_remaining() == 0;
 869 }
 870 
 871 inline HeapWord* ParMarkBitMapClosure::source() const {
 872   return _source;
 873 }
 874 
 875 inline void ParMarkBitMapClosure::set_source(HeapWord* addr) {
 876   _source = addr;
 877 }
 878 
 879 inline void ParMarkBitMapClosure::decrement_words_remaining(size_t words) {
 880   assert(_words_remaining >= words, "processed too many words");
 881   _words_remaining -= words;
 882 }
 883 
 884 // The UseParallelOldGC collector is a stop-the-world garbage collector that
 885 // does parts of the collection using parallel threads.  The collection includes
 886 // the tenured generation and the young generation.  The permanent generation is
 887 // collected at the same time as the other two generations but the permanent
 888 // generation is collect by a single GC thread.  The permanent generation is
 889 // collected serially because of the requirement that during the processing of a
 890 // klass AAA, any objects reference by AAA must already have been processed.
 891 // This requirement is enforced by a left (lower address) to right (higher
 892 // address) sliding compaction.
 893 //
 894 // There are four phases of the collection.
 895 //
 896 //      - marking phase
 897 //      - summary phase
 898 //      - compacting phase
 899 //      - clean up phase
 900 //
 901 // Roughly speaking these phases correspond, respectively, to
 902 //      - mark all the live objects
 903 //      - calculate the destination of each object at the end of the collection
 904 //      - move the objects to their destination
 905 //      - update some references and reinitialize some variables
 906 //
 907 // These three phases are invoked in PSParallelCompact::invoke_no_policy().  The
 908 // marking phase is implemented in PSParallelCompact::marking_phase() and does a
 909 // complete marking of the heap.  The summary phase is implemented in
 910 // PSParallelCompact::summary_phase().  The move and update phase is implemented
 911 // in PSParallelCompact::compact().
 912 //


   1 /*
   2  * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 864   return _words_remaining;
 865 }
 866 
 867 inline bool ParMarkBitMapClosure::is_full() const {
 868   return words_remaining() == 0;
 869 }
 870 
 871 inline HeapWord* ParMarkBitMapClosure::source() const {
 872   return _source;
 873 }
 874 
 875 inline void ParMarkBitMapClosure::set_source(HeapWord* addr) {
 876   _source = addr;
 877 }
 878 
 879 inline void ParMarkBitMapClosure::decrement_words_remaining(size_t words) {
 880   assert(_words_remaining >= words, "processed too many words");
 881   _words_remaining -= words;
 882 }
 883 
 884 // The Parallel collector is a stop-the-world garbage collector that
 885 // does parts of the collection using parallel threads.  The collection includes
 886 // the tenured generation and the young generation.






 887 //
 888 // There are four phases of the collection.
 889 //
 890 //      - marking phase
 891 //      - summary phase
 892 //      - compacting phase
 893 //      - clean up phase
 894 //
 895 // Roughly speaking these phases correspond, respectively, to
 896 //      - mark all the live objects
 897 //      - calculate the destination of each object at the end of the collection
 898 //      - move the objects to their destination
 899 //      - update some references and reinitialize some variables
 900 //
 901 // These three phases are invoked in PSParallelCompact::invoke_no_policy().  The
 902 // marking phase is implemented in PSParallelCompact::marking_phase() and does a
 903 // complete marking of the heap.  The summary phase is implemented in
 904 // PSParallelCompact::summary_phase().  The move and update phase is implemented
 905 // in PSParallelCompact::compact().
 906 //


< prev index next >