--- a/src/hotspot/share/gc/epsilon/epsilonHeap.cpp Mon Mar 26 16:18:35 2018 +0200
+++ b/src/hotspot/share/gc/epsilon/epsilonHeap.cpp Mon Mar 26 16:29:48 2018 +0200
@@ -41,8 +41,7 @@
_space = new ContiguousSpace();
_space->initialize(committed_region, true, true);
- EpsilonBarrierSet* bs = new EpsilonBarrierSet();
- set_barrier_set(bs);
+ set_barrier_set(new EpsilonBarrierSet());
_max_tlab_size = MIN2(CollectedHeap::max_tlab_size(), EpsilonMaxTLABSize / HeapWordSize);
@@ -91,7 +90,7 @@
return memory_pools;
}
-size_t EpsilonHeap::unsafe_max_tlab_alloc(Thread *thr) const {
+size_t EpsilonHeap::unsafe_max_tlab_alloc(Thread* thr) const {
// This is the only way we can control TLAB sizes without having safepoints.
// Implement exponential expansion within [MinTLABSize; _max_tlab_size], based
// on previously "used" TLAB size.
--- a/src/hotspot/share/gc/epsilon/epsilonHeap.hpp Mon Mar 26 16:18:35 2018 +0200
+++ b/src/hotspot/share/gc/epsilon/epsilonHeap.hpp Mon Mar 26 16:29:48 2018 +0200
@@ -55,8 +55,8 @@
return CollectedHeap::EpsilonHeap;
}
- virtual const char *name() const {
- return "Epsilon GC";
+ virtual const char* name() const {
+ return "Epsilon";
}
virtual jint initialize();
@@ -79,33 +79,33 @@
return used() == capacity();
}
- virtual bool is_in(const void *p) const { return _space->is_in(p); }
+ virtual bool is_in(const void* p) const { return _space->is_in(p); }
virtual bool is_scavengable(oop obj) {
- // Epsilon does not move objects, no objects are scavengable.
+ // No GC is going to happen, therefore no objects ever move.
return false;
}
HeapWord* allocate_work(size_t size);
- virtual HeapWord* mem_allocate(size_t size, bool *gc_overhead_limit_was_exceeded);
+ virtual HeapWord* mem_allocate(size_t size, bool* gc_overhead_limit_was_exceeded);
virtual HeapWord* allocate_new_tlab(size_t size);
// TLAB allocations
virtual bool supports_tlab_allocation() const { return UseTLAB; }
- virtual size_t tlab_capacity(Thread *thr) const { return capacity(); }
- virtual size_t tlab_used(Thread *thr) const { return used(); }
+ virtual size_t tlab_capacity(Thread* thr) const { return capacity(); }
+ virtual size_t tlab_used(Thread* thr) const { return used(); }
virtual size_t max_tlab_size() const { return _max_tlab_size; }
- virtual size_t unsafe_max_tlab_alloc(Thread *thr) const;
+ virtual size_t unsafe_max_tlab_alloc(Thread* thr) const;
virtual void collect(GCCause::Cause cause);
virtual void do_full_collection(bool clear_all_soft_refs);
- virtual AdaptiveSizePolicy *size_policy() {
+ virtual AdaptiveSizePolicy* size_policy() {
// No such thing for Epsilon
return NULL;
}
- virtual CollectorPolicy *collector_policy() const {
+ virtual CollectorPolicy* collector_policy() const {
return _policy;
}
@@ -113,24 +113,24 @@
return &_soft_ref_policy;
}
- virtual void object_iterate(ObjectClosure *cl) {
+ virtual void object_iterate(ObjectClosure* cl) {
safe_object_iterate(cl);
}
- virtual void safe_object_iterate(ObjectClosure *cl);
+ virtual void safe_object_iterate(ObjectClosure* cl);
- virtual HeapWord* block_start(const void *addr) const {
- // Epsilon does not support block parsing.
+ virtual HeapWord* block_start(const void* addr) const {
+ // No support for block parsing.
return NULL;
}
- virtual size_t block_size(const HeapWord *addr) const {
- // Epsilon does not support block parsing.
+ virtual size_t block_size(const HeapWord* addr) const {
+ // No support for block parsing.
return 0;
}
- virtual bool block_is_obj(const HeapWord *addr) const {
- // Epsilon does not support block parsing.
+ virtual bool block_is_obj(const HeapWord* addr) const {
+ // No support for block parsing.
return false;
}
@@ -139,23 +139,23 @@
return os::elapsed_counter() / NANOSECS_PER_MILLISEC;
}
+ virtual void print_gc_threads_on(outputStream* st) const {
+ // No GC threads.
+ }
+
+ virtual void gc_threads_do(ThreadClosure* tc) const {
+ // No GC threads.
+ }
+
+ virtual void print_on(outputStream* st) const;
+ virtual void print_tracing_info() const;
+
virtual void prepare_for_verify() {
// No heap verification.
}
- virtual void print_gc_threads_on(outputStream *st) const {
- // No GC threads.
- }
-
- virtual void gc_threads_do(ThreadClosure *tc) const {
- // No GC threads.
- }
-
- virtual void print_on(outputStream *st) const;
- virtual void print_tracing_info() const;
-
virtual void verify(VerifyOption option) {
- // No heap verification for Epsilon.
+ // No heap verification.
}
};
--- a/src/hotspot/share/gc/epsilon/epsilonMemoryPool.hpp Mon Mar 26 16:18:35 2018 +0200
+++ b/src/hotspot/share/gc/epsilon/epsilonMemoryPool.hpp Mon Mar 26 16:29:48 2018 +0200
@@ -41,7 +41,6 @@
class EpsilonMemoryPool : public CollectedMemoryPool {
private:
- const static size_t _undefined_max = (size_t) -1;
EpsilonHeap* _heap;
public:
--- a/src/hotspot/share/gc/epsilon/epsilonMonitoringSupport.cpp Mon Mar 26 16:18:35 2018 +0200
+++ b/src/hotspot/share/gc/epsilon/epsilonMonitoringSupport.cpp Mon Mar 26 16:29:48 2018 +0200
@@ -36,7 +36,6 @@
char* _name_space;
public:
-
EpsilonSpaceCounters(const char* name,
int ordinal,
size_t max_size,
@@ -81,7 +80,6 @@
}
};
-
class EpsilonGenerationCounters : public GenerationCounters {
private:
EpsilonHeap* _heap;
--- a/src/hotspot/share/gc/epsilon/epsilonMonitoringSupport.hpp Mon Mar 26 16:18:35 2018 +0200
+++ b/src/hotspot/share/gc/epsilon/epsilonMonitoringSupport.hpp Mon Mar 26 16:29:48 2018 +0200
@@ -32,7 +32,7 @@
class EpsilonMonitoringSupport : public CHeapObj<mtGC> {
private:
- GenerationCounters* _heap_counters;
+ GenerationCounters* _heap_counters;
EpsilonSpaceCounters* _space_counters;
public:
--- a/src/hotspot/share/gc/epsilon/epsilon_globals.hpp Mon Mar 26 16:18:35 2018 +0200
+++ b/src/hotspot/share/gc/epsilon/epsilon_globals.hpp Mon Mar 26 16:29:48 2018 +0200
@@ -46,19 +46,19 @@
\
experimental(size_t, EpsilonPrintHeapStep, 100, \
"Print heap occupancy stats with this number of steps. " \
- "0 turns the printing off. ") \
+ "0 turns the printing off.") \
range(0, max_intx) \
\
experimental(size_t, EpsilonUpdateCountersStep, 1 * M, \
"Update heap heap occupancy counters after allocating this much " \
"memory. Higher values would make allocations faster at " \
- "the expense of lower resolution in heap counters. ") \
+ "the expense of lower resolution in heap counters.") \
range(1, max_intx) \
\
experimental(size_t, EpsilonMaxTLABSize, 4 * M, \
"Max TLAB size to use with Epsilon GC. Larger value improves " \
"performance at the expense of per-thread memory waste. This " \
- "asks TLAB machinery to cap TLAB sizes at this value") \
+ "asks TLAB machinery to cap TLAB sizes at this value.") \
range(1, max_intx) \
\
experimental(size_t, EpsilonMinHeapExpand, 128 * M, \