< prev index next > src/hotspot/share/gc/shared/collectedHeap.hpp
RFE_8195103_reduce_initial_card_marks
/*
- * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* 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.
static int _fire_out_of_memory_count;
#endif
GCHeapLog* _gc_heap_log;
- // Used in support of ReduceInitialCardMarks; only consulted if COMPILER2
- // or INCLUDE_JVMCI is being used
- bool _defer_initial_card_mark;
-
MemRegion _reserved;
protected:
BarrierSet* _barrier_set;
bool _is_gc_active;
PerfStringVariable* _perf_gc_lastcause;
// Constructor
CollectedHeap();
- // Do common initializations that must follow instance construction,
- // for example, those needing virtual calls.
- // This code could perhaps be moved into initialize() but would
- // be slightly more awkward because we want the latter to be a
- // pure virtual.
- void pre_initialize();
-
// Create a new tlab. All TLAB allocations must go through this.
virtual HeapWord* allocate_new_tlab(size_t size);
// Accumulate statistics on all tlabs.
virtual void accumulate_statistics_all_tlabs();
virtual size_t unsafe_max_tlab_alloc(Thread *thr) const {
guarantee(false, "thread-local allocation buffers not supported");
return 0;
}
- // Can a compiler initialize a new object without store barriers?
- // This permission only extends from the creation of a new object
- // via a TLAB up to the first subsequent safepoint. If such permission
- // is granted for this heap type, the compiler promises to call
- // defer_store_barrier() below on any slow path allocation of
- // a new object for which such initializing store barriers will
- // have been elided.
- virtual bool can_elide_tlab_store_barriers() const = 0;
-
- // If a compiler is eliding store barriers for TLAB-allocated objects,
- // there is probably a corresponding slow path which can produce
- // an object allocated anywhere. The compiler's runtime support
- // promises to call this function on such a slow-path-allocated
- // object before performing initializations that have elided
- // store barriers. Returns new_obj, or maybe a safer copy thereof.
- virtual oop new_store_pre_barrier(JavaThread* thread, oop new_obj);
-
- // Answers whether an initializing store to a new object currently
- // allocated at the given address doesn't need a store
- // barrier. Returns "true" if it doesn't need an initializing
- // store barrier; answers "false" if it does.
- virtual bool can_elide_initializing_store_barrier(oop new_obj) = 0;
-
- // If a compiler is eliding store barriers for TLAB-allocated objects,
- // we will be informed of a slow-path allocation by a call
- // to new_store_pre_barrier() above. Such a call precedes the
- // initialization of the object itself, and no post-store-barriers will
- // be issued. Some heap types require that the barrier strictly follows
- // the initializing stores. (This is currently implemented by deferring the
- // barrier until the next slow-path allocation or gc-related safepoint.)
- // This interface answers whether a particular heap type needs the card
- // mark to be thus strictly sequenced after the stores.
- virtual bool card_mark_must_follow_store() const = 0;
-
- // If the CollectedHeap was asked to defer a store barrier above,
- // this informs it to flush such a deferred store barrier to the
- // remembered set.
- virtual void flush_deferred_store_barrier(JavaThread* thread);
-
// Perform a collection of the heap; intended for use in implementing
// "System.gc". This probably implies as full a collection as the
// "CollectedHeap" supports.
virtual void collect(GCCause::Cause cause) = 0;
< prev index next >