< prev index next >

src/hotspot/share/gc/g1/g1CollectedHeap.hpp

Print this page
rev 57753 : imported patch auto_upgrade
   1 /*
   2  * Copyright (c) 2001, 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  *


 740   void reset_taskqueue_stats();
 741   #endif // TASKQUEUE_STATS
 742 
 743   // Schedule the VM operation that will do an evacuation pause to
 744   // satisfy an allocation request of word_size. *succeeded will
 745   // return whether the VM operation was successful (it did do an
 746   // evacuation pause) or not (another thread beat us to it or the GC
 747   // locker was active). Given that we should not be holding the
 748   // Heap_lock when we enter this method, we will pass the
 749   // gc_count_before (i.e., total_collections()) as a parameter since
 750   // it has to be read while holding the Heap_lock. Currently, both
 751   // methods that call do_collection_pause() release the Heap_lock
 752   // before the call, so it's easy to read gc_count_before just before.
 753   HeapWord* do_collection_pause(size_t         word_size,
 754                                 uint           gc_count_before,
 755                                 bool*          succeeded,
 756                                 GCCause::Cause gc_cause);
 757 
 758   void wait_for_root_region_scanning();
 759 
 760   // The guts of the incremental collection pause, executed by the vm
 761   // thread. It returns false if it is unable to do the collection due
 762   // to the GC locker being active, true otherwise



 763   bool do_collection_pause_at_safepoint(double target_pause_time_ms);




 764 
 765   G1HeapVerifier::G1VerifyType young_collection_verify_type() const;
 766   void verify_before_young_collection(G1HeapVerifier::G1VerifyType type);
 767   void verify_after_young_collection(G1HeapVerifier::G1VerifyType type);
 768 
 769   void calculate_collection_set(G1EvacuationInfo& evacuation_info, double target_pause_time_ms);
 770 
 771   // Actually do the work of evacuating the parts of the collection set.
 772   void evacuate_initial_collection_set(G1ParScanThreadStateSet* per_thread_states);
 773   void evacuate_optional_collection_set(G1ParScanThreadStateSet* per_thread_states);
 774 private:
 775   // Evacuate the next set of optional regions.
 776   void evacuate_next_optional_regions(G1ParScanThreadStateSet* per_thread_states);
 777 
 778 public:
 779   void pre_evacuate_collection_set(G1EvacuationInfo& evacuation_info, G1ParScanThreadStateSet* pss);
 780   void post_evacuate_collection_set(G1EvacuationInfo& evacuation_info,
 781                                     G1RedirtyCardsQueueSet* rdcqs,
 782                                     G1ParScanThreadStateSet* pss);
 783 


   1 /*
   2  * Copyright (c) 2001, 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  *


 740   void reset_taskqueue_stats();
 741   #endif // TASKQUEUE_STATS
 742 
 743   // Schedule the VM operation that will do an evacuation pause to
 744   // satisfy an allocation request of word_size. *succeeded will
 745   // return whether the VM operation was successful (it did do an
 746   // evacuation pause) or not (another thread beat us to it or the GC
 747   // locker was active). Given that we should not be holding the
 748   // Heap_lock when we enter this method, we will pass the
 749   // gc_count_before (i.e., total_collections()) as a parameter since
 750   // it has to be read while holding the Heap_lock. Currently, both
 751   // methods that call do_collection_pause() release the Heap_lock
 752   // before the call, so it's easy to read gc_count_before just before.
 753   HeapWord* do_collection_pause(size_t         word_size,
 754                                 uint           gc_count_before,
 755                                 bool*          succeeded,
 756                                 GCCause::Cause gc_cause);
 757 
 758   void wait_for_root_region_scanning();
 759 
 760   // Perform an incremental collection at a safepoint, possibly
 761   // followed by a by-policy upgrade to a full collection.  Returns
 762   // false if unable to do the collection due to the GC locker being
 763   // active, true otherwise.
 764   // precondition: at safepoint on VM thread
 765   // precondition: !is_gc_active()
 766   bool do_collection_pause_at_safepoint(double target_pause_time_ms);
 767 
 768   // Helper for do_collection_pause_at_safepoint, containing the guts
 769   // of the incremental collection pause, executed by the vm thread.
 770   void do_collection_pause_at_safepoint_helper(double target_pause_time_ms);
 771 
 772   G1HeapVerifier::G1VerifyType young_collection_verify_type() const;
 773   void verify_before_young_collection(G1HeapVerifier::G1VerifyType type);
 774   void verify_after_young_collection(G1HeapVerifier::G1VerifyType type);
 775 
 776   void calculate_collection_set(G1EvacuationInfo& evacuation_info, double target_pause_time_ms);
 777 
 778   // Actually do the work of evacuating the parts of the collection set.
 779   void evacuate_initial_collection_set(G1ParScanThreadStateSet* per_thread_states);
 780   void evacuate_optional_collection_set(G1ParScanThreadStateSet* per_thread_states);
 781 private:
 782   // Evacuate the next set of optional regions.
 783   void evacuate_next_optional_regions(G1ParScanThreadStateSet* per_thread_states);
 784 
 785 public:
 786   void pre_evacuate_collection_set(G1EvacuationInfo& evacuation_info, G1ParScanThreadStateSet* pss);
 787   void post_evacuate_collection_set(G1EvacuationInfo& evacuation_info,
 788                                     G1RedirtyCardsQueueSet* rdcqs,
 789                                     G1ParScanThreadStateSet* pss);
 790 


< prev index next >