< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahUtils.cpp

Print this page
rev 59233 : 8244732: Shenandoah: move heuristics code to gc/shenandoah/heuristics
Reviewed-by: XXX


  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  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 
  27 #include "jfr/jfrEvents.hpp"
  28 #include "gc/shared/gcCause.hpp"
  29 #include "gc/shared/gcTrace.hpp"
  30 #include "gc/shared/gcWhen.hpp"
  31 #include "gc/shenandoah/shenandoahCollectorPolicy.hpp"
  32 #include "gc/shenandoah/shenandoahMarkCompact.hpp"
  33 #include "gc/shenandoah/shenandoahHeap.inline.hpp"
  34 #include "gc/shenandoah/shenandoahHeuristics.hpp"
  35 #include "gc/shenandoah/shenandoahUtils.hpp"

  36 #include "utilities/debug.hpp"
  37 
  38 ShenandoahPhaseTimings::Phase ShenandoahTimingsTracker::_current_phase = ShenandoahPhaseTimings::_invalid_phase;
  39 
  40 ShenandoahGCSession::ShenandoahGCSession(GCCause::Cause cause) :
  41   _heap(ShenandoahHeap::heap()),
  42   _timer(_heap->gc_timer()),
  43   _tracer(_heap->tracer()) {
  44   assert(!ShenandoahGCPhase::is_current_phase_valid(), "No current GC phase");
  45 
  46   _heap->set_gc_cause(cause);
  47   _timer->register_gc_start();
  48   _tracer->report_gc_start(cause, _timer->gc_start());
  49   _heap->trace_heap_before_gc(_tracer);
  50 
  51   _heap->shenandoah_policy()->record_cycle_start();
  52   _heap->heuristics()->record_cycle_start();
  53   _trace_cycle.initialize(_heap->cycle_memory_manager(), cause,
  54           /* allMemoryPoolsAffected */    true,
  55           /* recordGCBeginTime = */       true,




  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  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 
  27 #include "jfr/jfrEvents.hpp"
  28 #include "gc/shared/gcCause.hpp"
  29 #include "gc/shared/gcTrace.hpp"
  30 #include "gc/shared/gcWhen.hpp"
  31 #include "gc/shenandoah/shenandoahCollectorPolicy.hpp"
  32 #include "gc/shenandoah/shenandoahMarkCompact.hpp"
  33 #include "gc/shenandoah/shenandoahHeap.inline.hpp"

  34 #include "gc/shenandoah/shenandoahUtils.hpp"
  35 #include "gc/shenandoah/heuristics/shenandoahHeuristics.hpp"
  36 #include "utilities/debug.hpp"
  37 
  38 ShenandoahPhaseTimings::Phase ShenandoahTimingsTracker::_current_phase = ShenandoahPhaseTimings::_invalid_phase;
  39 
  40 ShenandoahGCSession::ShenandoahGCSession(GCCause::Cause cause) :
  41   _heap(ShenandoahHeap::heap()),
  42   _timer(_heap->gc_timer()),
  43   _tracer(_heap->tracer()) {
  44   assert(!ShenandoahGCPhase::is_current_phase_valid(), "No current GC phase");
  45 
  46   _heap->set_gc_cause(cause);
  47   _timer->register_gc_start();
  48   _tracer->report_gc_start(cause, _timer->gc_start());
  49   _heap->trace_heap_before_gc(_tracer);
  50 
  51   _heap->shenandoah_policy()->record_cycle_start();
  52   _heap->heuristics()->record_cycle_start();
  53   _trace_cycle.initialize(_heap->cycle_memory_manager(), cause,
  54           /* allMemoryPoolsAffected */    true,
  55           /* recordGCBeginTime = */       true,


< prev index next >