< prev index next >
src/share/vm/gc_implementation/shenandoah/shenandoahCollectorPolicy.hpp
Print this page
rev 10690 : [backport] Cleanup header files and forward declarations
rev 10715 : [backport] Cleanup up superfluous newlines
rev 10748 : [backport] Handle metadata induced GC
rev 10756 : [backport] Factor out implicit/explicit GC requests
rev 10772 : [backport] Update copyrights
rev 10792 : [backport] Move ShenandoahGCTracer to gc/shenandoah
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2013, 2015, Red Hat, Inc. and/or its affiliates.
+ * Copyright (c) 2013, 2018, Red Hat, Inc. All rights reserved.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
@@ -22,24 +22,17 @@
*/
#ifndef SHARE_VM_GC_SHENANDOAH_SHENANDOAHCOLLECTORPOLICY_HPP
#define SHARE_VM_GC_SHENANDOAH_SHENANDOAHCOLLECTORPOLICY_HPP
-#include "gc_implementation/shenandoah/shenandoahPhaseTimings.hpp"
-#include "gc_implementation/shenandoah/shenandoahHeap.hpp"
#include "memory/collectorPolicy.hpp"
-#include "runtime/arguments.hpp"
-#include "utilities/numberSeq.hpp"
-
-class ShenandoahCollectionSet;
-class ShenandoahFreeSet;
-class ShenandoahHeap;
-class ShenandoahHeuristics;
+#include "gc_implementation/shenandoah/shenandoahHeap.hpp"
+#include "gc_implementation/shenandoah/shenandoahTracer.hpp"
+#include "utilities/ostream.hpp"
class STWGCTimer;
class ConcurrentGCTimer;
-class outputStream;
class ShenandoahCollectorPolicy: public CollectorPolicy {
private:
size_t _success_concurrent_gcs;
size_t _success_degenerated_gcs;
@@ -47,19 +40,20 @@
size_t _alloc_failure_degenerated;
size_t _alloc_failure_degenerated_upgrade_to_full;
size_t _alloc_failure_full;
size_t _explicit_concurrent;
size_t _explicit_full;
+ size_t _implicit_concurrent;
+ size_t _implicit_full;
size_t _degen_points[ShenandoahHeap::_DEGENERATED_LIMIT];
ShenandoahSharedFlag _in_shutdown;
ShenandoahTracer* _tracer;
size_t _cycle_counter;
-
public:
ShenandoahCollectorPolicy();
void post_heap_initialize() {};
@@ -69,10 +63,14 @@
bool is_tlab,
bool* gc_overhead_limit_was_exceeded);
HeapWord* satisfy_failed_allocation(size_t size, bool is_tlab);
+ MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data,
+ size_t size,
+ Metaspace::MetadataType mdtype);
+
void initialize_alignments();
// TODO: This is different from gc_end: that one encompasses one VM operation.
// These two encompass the entire cycle.
void record_cycle_start();
@@ -83,10 +81,12 @@
void record_alloc_failure_to_degenerated(ShenandoahHeap::ShenandoahDegenPoint point);
void record_alloc_failure_to_full();
void record_degenerated_upgrade_to_full();
void record_explicit_to_concurrent();
void record_explicit_to_full();
+ void record_implicit_to_concurrent();
+ void record_implicit_to_full();
void record_shutdown();
bool is_at_shutdown();
ShenandoahTracer* tracer() {return _tracer;}
@@ -94,7 +94,6 @@
size_t cycle_counter() const;
void print_gc_stats(outputStream* out) const;
};
-
#endif // SHARE_VM_GC_SHENANDOAH_SHENANDOAHCOLLECTORPOLICY_HPP
< prev index next >