Merge
This commit is contained in:
commit
51a4936b92
@ -1063,7 +1063,7 @@ public class HotSpotVMConfig {
|
||||
@HotSpotVMField(name = "JavaThread::_osthread", type = "OSThread*", get = HotSpotVMField.Type.OFFSET) @Stable public int osThreadOffset;
|
||||
@HotSpotVMField(name = "JavaThread::_dirty_card_queue", type = "DirtyCardQueue", get = HotSpotVMField.Type.OFFSET) @Stable public int javaThreadDirtyCardQueueOffset;
|
||||
@HotSpotVMField(name = "JavaThread::_is_method_handle_return", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int threadIsMethodHandleReturnOffset;
|
||||
@HotSpotVMField(name = "JavaThread::_satb_mark_queue", type = "ObjPtrQueue", get = HotSpotVMField.Type.OFFSET) @Stable public int javaThreadSatbMarkQueueOffset;
|
||||
@HotSpotVMField(name = "JavaThread::_satb_mark_queue", type = "SATBMarkQueue", get = HotSpotVMField.Type.OFFSET) @Stable public int javaThreadSatbMarkQueueOffset;
|
||||
@HotSpotVMField(name = "JavaThread::_vm_result", type = "oop", get = HotSpotVMField.Type.OFFSET) @Stable public int threadObjectResultOffset;
|
||||
@HotSpotVMField(name = "JavaThread::_jvmci_counters", type = "jlong*", get = HotSpotVMField.Type.OFFSET) @Stable public int jvmciCountersThreadOffset;
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "gc/g1/g1CollectedHeap.inline.hpp"
|
||||
#include "gc/g1/g1SATBCardTableModRefBS.hpp"
|
||||
#include "gc/g1/heapRegion.hpp"
|
||||
#include "gc/g1/satbQueue.hpp"
|
||||
#include "gc/g1/satbMarkQueue.hpp"
|
||||
#include "gc/shared/memset_with_concurrent_readers.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/atomic.inline.hpp"
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "gc/g1/g1CollectedHeap.inline.hpp"
|
||||
#include "gc/g1/satbQueue.hpp"
|
||||
#include "gc/g1/satbMarkQueue.hpp"
|
||||
#include "gc/shared/collectedHeap.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
@ -33,7 +33,7 @@
|
||||
#include "runtime/thread.hpp"
|
||||
#include "runtime/vmThread.hpp"
|
||||
|
||||
ObjPtrQueue::ObjPtrQueue(SATBMarkQueueSet* qset, bool permanent) :
|
||||
SATBMarkQueue::SATBMarkQueue(SATBMarkQueueSet* qset, bool permanent) :
|
||||
// SATB queues are only active during marking cycles. We create
|
||||
// them with their active field set to false. If a thread is
|
||||
// created during a cycle and its SATB queue needs to be activated
|
||||
@ -42,7 +42,7 @@ ObjPtrQueue::ObjPtrQueue(SATBMarkQueueSet* qset, bool permanent) :
|
||||
PtrQueue(qset, permanent, false /* active */)
|
||||
{ }
|
||||
|
||||
void ObjPtrQueue::flush() {
|
||||
void SATBMarkQueue::flush() {
|
||||
// Filter now to possibly save work later. If filtering empties the
|
||||
// buffer then flush_impl can deallocate the buffer.
|
||||
filter();
|
||||
@ -105,7 +105,7 @@ inline bool requires_marking(const void* entry, G1CollectedHeap* heap) {
|
||||
// they require marking and are not already marked. Retained entries
|
||||
// are compacted toward the top of the buffer.
|
||||
|
||||
void ObjPtrQueue::filter() {
|
||||
void SATBMarkQueue::filter() {
|
||||
G1CollectedHeap* g1h = G1CollectedHeap::heap();
|
||||
void** buf = _buf;
|
||||
|
||||
@ -159,7 +159,7 @@ void ObjPtrQueue::filter() {
|
||||
// allow the mutator to carry on executing using the same buffer
|
||||
// instead of replacing it.
|
||||
|
||||
bool ObjPtrQueue::should_enqueue_buffer() {
|
||||
bool SATBMarkQueue::should_enqueue_buffer() {
|
||||
assert(_lock == NULL || _lock->owned_by_self(),
|
||||
"we should have taken the lock before calling this");
|
||||
|
||||
@ -177,7 +177,7 @@ bool ObjPtrQueue::should_enqueue_buffer() {
|
||||
return should_enqueue;
|
||||
}
|
||||
|
||||
void ObjPtrQueue::apply_closure_and_empty(SATBBufferClosure* cl) {
|
||||
void SATBMarkQueue::apply_closure_and_empty(SATBBufferClosure* cl) {
|
||||
assert(SafepointSynchronize::is_at_safepoint(),
|
||||
"SATB queues must only be processed at safepoints");
|
||||
if (_buf != NULL) {
|
||||
@ -193,12 +193,12 @@ void ObjPtrQueue::apply_closure_and_empty(SATBBufferClosure* cl) {
|
||||
#ifndef PRODUCT
|
||||
// Helpful for debugging
|
||||
|
||||
void ObjPtrQueue::print(const char* name) {
|
||||
void SATBMarkQueue::print(const char* name) {
|
||||
print(name, _buf, _index, _sz);
|
||||
}
|
||||
|
||||
void ObjPtrQueue::print(const char* name,
|
||||
void** buf, size_t index, size_t sz) {
|
||||
void SATBMarkQueue::print(const char* name,
|
||||
void** buf, size_t index, size_t sz) {
|
||||
gclog_or_tty->print_cr(" SATB BUFFER [%s] buf: " PTR_FORMAT " "
|
||||
"index: " SIZE_FORMAT " sz: " SIZE_FORMAT,
|
||||
name, p2i(buf), index, sz);
|
||||
@ -294,7 +294,7 @@ bool SATBMarkQueueSet::apply_closure_to_completed_buffer(SATBBufferClosure* cl)
|
||||
// Filtering can result in non-full completed buffers; see
|
||||
// should_enqueue_buffer.
|
||||
assert(_sz % sizeof(void*) == 0, "invariant");
|
||||
size_t limit = ObjPtrQueue::byte_index_to_index(_sz);
|
||||
size_t limit = SATBMarkQueue::byte_index_to_index(_sz);
|
||||
for (size_t i = 0; i < limit; ++i) {
|
||||
if (buf[i] != NULL) {
|
||||
// Found the end of the block of NULLs; process the remainder.
|
||||
@ -326,7 +326,7 @@ void SATBMarkQueueSet::print_all(const char* msg) {
|
||||
while (nd != NULL) {
|
||||
void** buf = BufferNode::make_buffer_from_node(nd);
|
||||
jio_snprintf(buffer, SATB_PRINTER_BUFFER_SIZE, "Enqueued: %d", i);
|
||||
ObjPtrQueue::print(buffer, buf, 0, _sz);
|
||||
SATBMarkQueue::print(buffer, buf, 0, _sz);
|
||||
nd = nd->next();
|
||||
i += 1;
|
||||
}
|
@ -22,8 +22,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SHARE_VM_GC_G1_SATBQUEUE_HPP
|
||||
#define SHARE_VM_GC_G1_SATBQUEUE_HPP
|
||||
#ifndef SHARE_VM_GC_G1_SATBMARKQUEUE_HPP
|
||||
#define SHARE_VM_GC_G1_SATBMARKQUEUE_HPP
|
||||
|
||||
#include "gc/g1/ptrQueue.hpp"
|
||||
#include "memory/allocation.hpp"
|
||||
@ -41,8 +41,8 @@ public:
|
||||
virtual void do_buffer(void** buffer, size_t size) = 0;
|
||||
};
|
||||
|
||||
// A ptrQueue whose elements are "oops", pointers to object heads.
|
||||
class ObjPtrQueue: public PtrQueue {
|
||||
// A PtrQueue whose elements are (possibly stale) pointers to object heads.
|
||||
class SATBMarkQueue: public PtrQueue {
|
||||
friend class SATBMarkQueueSet;
|
||||
|
||||
private:
|
||||
@ -50,7 +50,7 @@ private:
|
||||
void filter();
|
||||
|
||||
public:
|
||||
ObjPtrQueue(SATBMarkQueueSet* qset, bool permanent = false);
|
||||
SATBMarkQueue(SATBMarkQueueSet* qset, bool permanent = false);
|
||||
|
||||
// Process queue entries and free resources.
|
||||
void flush();
|
||||
@ -71,7 +71,7 @@ public:
|
||||
};
|
||||
|
||||
class SATBMarkQueueSet: public PtrQueueSet {
|
||||
ObjPtrQueue _shared_satb_queue;
|
||||
SATBMarkQueue _shared_satb_queue;
|
||||
|
||||
#ifdef ASSERT
|
||||
void dump_active_states(bool expected_active);
|
||||
@ -108,10 +108,10 @@ public:
|
||||
void print_all(const char* msg);
|
||||
#endif // PRODUCT
|
||||
|
||||
ObjPtrQueue* shared_satb_queue() { return &_shared_satb_queue; }
|
||||
SATBMarkQueue* shared_satb_queue() { return &_shared_satb_queue; }
|
||||
|
||||
// If a marking is being abandoned, reset any unprocessed log buffers.
|
||||
void abandon_partial_marking();
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_GC_G1_SATBQUEUE_HPP
|
||||
#endif // SHARE_VM_GC_G1_SATBMARKQUEUE_HPP
|
@ -304,7 +304,7 @@
|
||||
# include "gc/g1/g1OopClosures.hpp"
|
||||
# include "gc/g1/g1_globals.hpp"
|
||||
# include "gc/g1/ptrQueue.hpp"
|
||||
# include "gc/g1/satbQueue.hpp"
|
||||
# include "gc/g1/satbMarkQueue.hpp"
|
||||
# include "gc/parallel/gcAdaptivePolicyCounters.hpp"
|
||||
# include "gc/parallel/objectStartArray.hpp"
|
||||
# include "gc/parallel/parMarkBitMap.hpp"
|
||||
|
@ -1938,7 +1938,7 @@ void JavaThread::initialize_queues() {
|
||||
assert(!SafepointSynchronize::is_at_safepoint(),
|
||||
"we should not be at a safepoint");
|
||||
|
||||
ObjPtrQueue& satb_queue = satb_mark_queue();
|
||||
SATBMarkQueue& satb_queue = satb_mark_queue();
|
||||
SATBMarkQueueSet& satb_queue_set = satb_mark_queue_set();
|
||||
// The SATB queue should have been constructed with its active
|
||||
// field set to false.
|
||||
|
@ -49,7 +49,7 @@
|
||||
#include "utilities/top.hpp"
|
||||
#if INCLUDE_ALL_GCS
|
||||
#include "gc/g1/dirtyCardQueue.hpp"
|
||||
#include "gc/g1/satbQueue.hpp"
|
||||
#include "gc/g1/satbMarkQueue.hpp"
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "stack_zero.hpp"
|
||||
@ -992,7 +992,7 @@ class JavaThread: public Thread {
|
||||
#if INCLUDE_ALL_GCS
|
||||
// Support for G1 barriers
|
||||
|
||||
ObjPtrQueue _satb_mark_queue; // Thread-local log for SATB barrier.
|
||||
SATBMarkQueue _satb_mark_queue; // Thread-local log for SATB barrier.
|
||||
// Set of all such queues.
|
||||
static SATBMarkQueueSet _satb_mark_queue_set;
|
||||
|
||||
@ -1727,7 +1727,7 @@ class JavaThread: public Thread {
|
||||
|
||||
#if INCLUDE_ALL_GCS
|
||||
// SATB marking queue support
|
||||
ObjPtrQueue& satb_mark_queue() { return _satb_mark_queue; }
|
||||
SATBMarkQueue& satb_mark_queue() { return _satb_mark_queue; }
|
||||
static SATBMarkQueueSet& satb_mark_queue_set() {
|
||||
return _satb_mark_queue_set;
|
||||
}
|
||||
|
@ -1030,7 +1030,7 @@ typedef CompactHashtable<Symbol*, char> SymbolCompactHashTable;
|
||||
nonstatic_field(JavaThread, _stack_size, size_t) \
|
||||
nonstatic_field(JavaThread, _vframe_array_head, vframeArray*) \
|
||||
nonstatic_field(JavaThread, _vframe_array_last, vframeArray*) \
|
||||
nonstatic_field(JavaThread, _satb_mark_queue, ObjPtrQueue) \
|
||||
nonstatic_field(JavaThread, _satb_mark_queue, SATBMarkQueue) \
|
||||
nonstatic_field(JavaThread, _dirty_card_queue, DirtyCardQueue) \
|
||||
nonstatic_field(Thread, _resource_area, ResourceArea*) \
|
||||
nonstatic_field(CompilerThread, _env, ciEnv*) \
|
||||
@ -1622,7 +1622,7 @@ typedef CompactHashtable<Symbol*, char> SymbolCompactHashTable;
|
||||
declare_toplevel_type(MemRegion) \
|
||||
declare_toplevel_type(ThreadLocalAllocBuffer) \
|
||||
declare_toplevel_type(VirtualSpace) \
|
||||
declare_toplevel_type(ObjPtrQueue) \
|
||||
declare_toplevel_type(SATBMarkQueue) \
|
||||
declare_toplevel_type(DirtyCardQueue) \
|
||||
\
|
||||
/* Pointers to Garbage Collection types */ \
|
||||
|
Loading…
x
Reference in New Issue
Block a user