Merge
This commit is contained in:
commit
0a2347e0ba
@ -30,7 +30,7 @@ INCLUDE_VM_STRUCTS ?= false
|
|||||||
INCLUDE_JNI_CHECK ?= false
|
INCLUDE_JNI_CHECK ?= false
|
||||||
INCLUDE_SERVICES ?= false
|
INCLUDE_SERVICES ?= false
|
||||||
INCLUDE_MANAGEMENT ?= false
|
INCLUDE_MANAGEMENT ?= false
|
||||||
INCLUDE_ALTERNATE_GCS ?= false
|
INCLUDE_ALL_GCS ?= false
|
||||||
INCLUDE_NMT ?= false
|
INCLUDE_NMT ?= false
|
||||||
INCLUDE_CDS ?= false
|
INCLUDE_CDS ?= false
|
||||||
|
|
||||||
|
@ -72,12 +72,10 @@ ifeq ($(INCLUDE_CDS), false)
|
|||||||
Src_Files_EXCLUDE += metaspaceShared.cpp
|
Src_Files_EXCLUDE += metaspaceShared.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(INCLUDE_ALTERNATE_GCS), false)
|
ifeq ($(INCLUDE_ALL_GCS), false)
|
||||||
CXXFLAGS += -DINCLUDE_ALTERNATE_GCS=0
|
CXXFLAGS += -DINCLUDE_ALL_GCS=0
|
||||||
CFLAGS += -DINCLUDE_ALTERNATE_GCS=0
|
CFLAGS += -DINCLUDE_ALL_GCS=0
|
||||||
|
|
||||||
CXXFLAGS += -DSERIALGC
|
|
||||||
CFLAGS += -DSERIALGC
|
|
||||||
Src_Files_EXCLUDE += \
|
Src_Files_EXCLUDE += \
|
||||||
cmsAdaptiveSizePolicy.cpp cmsCollectorPolicy.cpp \
|
cmsAdaptiveSizePolicy.cpp cmsCollectorPolicy.cpp \
|
||||||
cmsGCAdaptivePolicyCounters.cpp cmsLockVerifier.cpp cmsPermGen.cpp compactibleFreeListSpace.cpp \
|
cmsGCAdaptivePolicyCounters.cpp cmsLockVerifier.cpp cmsPermGen.cpp compactibleFreeListSpace.cpp \
|
||||||
|
@ -30,7 +30,7 @@ INCLUDE_VM_STRUCTS ?= false
|
|||||||
INCLUDE_JNI_CHECK ?= false
|
INCLUDE_JNI_CHECK ?= false
|
||||||
INCLUDE_SERVICES ?= false
|
INCLUDE_SERVICES ?= false
|
||||||
INCLUDE_MANAGEMENT ?= false
|
INCLUDE_MANAGEMENT ?= false
|
||||||
INCLUDE_ALTERNATE_GCS ?= false
|
INCLUDE_ALL_GCS ?= false
|
||||||
INCLUDE_NMT ?= false
|
INCLUDE_NMT ?= false
|
||||||
INCLUDE_CDS ?= false
|
INCLUDE_CDS ?= false
|
||||||
|
|
||||||
|
@ -30,10 +30,11 @@
|
|||||||
#include "c1/c1_Runtime1.hpp"
|
#include "c1/c1_Runtime1.hpp"
|
||||||
#include "nativeInst_sparc.hpp"
|
#include "nativeInst_sparc.hpp"
|
||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#include "vmreg_sparc.inline.hpp"
|
#include "vmreg_sparc.inline.hpp"
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#define __ ce->masm()->
|
#define __ ce->masm()->
|
||||||
|
|
||||||
@ -420,7 +421,7 @@ void ArrayCopyStub::emit_code(LIR_Assembler* ce) {
|
|||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
|
|
||||||
void G1PreBarrierStub::emit_code(LIR_Assembler* ce) {
|
void G1PreBarrierStub::emit_code(LIR_Assembler* ce) {
|
||||||
// At this point we know that marking is in progress.
|
// At this point we know that marking is in progress.
|
||||||
@ -483,7 +484,7 @@ void G1PostBarrierStub::emit_code(LIR_Assembler* ce) {
|
|||||||
__ delayed()->nop();
|
__ delayed()->nop();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#undef __
|
#undef __
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "runtime/signature.hpp"
|
#include "runtime/signature.hpp"
|
||||||
#include "runtime/vframeArray.hpp"
|
#include "runtime/vframeArray.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#include "vmreg_sparc.inline.hpp"
|
#include "vmreg_sparc.inline.hpp"
|
||||||
|
|
||||||
// Implementation of StubAssembler
|
// Implementation of StubAssembler
|
||||||
@ -822,7 +823,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
case g1_pre_barrier_slow_id:
|
case g1_pre_barrier_slow_id:
|
||||||
{ // G4: previous value of memory
|
{ // G4: previous value of memory
|
||||||
BarrierSet* bs = Universe::heap()->barrier_set();
|
BarrierSet* bs = Universe::heap()->barrier_set();
|
||||||
@ -984,7 +985,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
|||||||
__ delayed()->restore();
|
__ delayed()->restore();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{ __ set_info("unimplemented entry", dont_gc_arguments);
|
{ __ set_info("unimplemented entry", dont_gc_arguments);
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#include "runtime/timer.hpp"
|
#include "runtime/timer.hpp"
|
||||||
#include "runtime/vframeArray.hpp"
|
#include "runtime/vframeArray.hpp"
|
||||||
#include "utilities/debug.hpp"
|
#include "utilities/debug.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#ifdef SHARK
|
#ifdef SHARK
|
||||||
#include "shark/shark_globals.hpp"
|
#include "shark/shark_globals.hpp"
|
||||||
#endif
|
#endif
|
||||||
@ -551,7 +552,7 @@ address InterpreterGenerator::generate_accessor_entry(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
if (UseG1GC) {
|
if (UseG1GC) {
|
||||||
// We need to generate have a routine that generates code to:
|
// We need to generate have a routine that generates code to:
|
||||||
// * load the value in the referent field
|
// * load the value in the referent field
|
||||||
@ -563,7 +564,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
|||||||
// field as live.
|
// field as live.
|
||||||
Unimplemented();
|
Unimplemented();
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// If G1 is not enabled then attempt to go through the accessor entry point
|
// If G1 is not enabled then attempt to go through the accessor entry point
|
||||||
// Reference.get is an accessor
|
// Reference.get is an accessor
|
||||||
|
@ -36,11 +36,12 @@
|
|||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "runtime/stubRoutines.hpp"
|
#include "runtime/stubRoutines.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||||
#include "gc_implementation/g1/heapRegion.hpp"
|
#include "gc_implementation/g1/heapRegion.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#ifdef PRODUCT
|
#ifdef PRODUCT
|
||||||
#define BLOCK_COMMENT(str) /* nothing */
|
#define BLOCK_COMMENT(str) /* nothing */
|
||||||
@ -3867,7 +3868,7 @@ void MacroAssembler::bang_stack_size(Register Rsize, Register Rtsp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
|
|
||||||
static address satb_log_enqueue_with_frame = NULL;
|
static address satb_log_enqueue_with_frame = NULL;
|
||||||
static u_char* satb_log_enqueue_with_frame_end = NULL;
|
static u_char* satb_log_enqueue_with_frame_end = NULL;
|
||||||
@ -4231,7 +4232,7 @@ void MacroAssembler::g1_write_barrier_post(Register store_addr, Register new_val
|
|||||||
bind(filtered);
|
bind(filtered);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void MacroAssembler::card_write_barrier_post(Register store_addr, Register new_val, Register tmp) {
|
void MacroAssembler::card_write_barrier_post(Register store_addr, Register new_val, Register tmp) {
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#define CPU_SPARC_VM_MACROASSEMBLER_SPARC_HPP
|
#define CPU_SPARC_VM_MACROASSEMBLER_SPARC_HPP
|
||||||
|
|
||||||
#include "asm/assembler.hpp"
|
#include "asm/assembler.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
// <sys/trap.h> promises that the system will not use traps 16-31
|
// <sys/trap.h> promises that the system will not use traps 16-31
|
||||||
#define ST_RESERVED_FOR_USER_0 0x10
|
#define ST_RESERVED_FOR_USER_0 0x10
|
||||||
@ -1181,13 +1182,13 @@ public:
|
|||||||
|
|
||||||
void card_write_barrier_post(Register store_addr, Register new_val, Register tmp);
|
void card_write_barrier_post(Register store_addr, Register new_val, Register tmp);
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// General G1 pre-barrier generator.
|
// General G1 pre-barrier generator.
|
||||||
void g1_write_barrier_pre(Register obj, Register index, int offset, Register pre_val, Register tmp, bool preserve_o_regs);
|
void g1_write_barrier_pre(Register obj, Register index, int offset, Register pre_val, Register tmp, bool preserve_o_regs);
|
||||||
|
|
||||||
// General G1 post-barrier generator
|
// General G1 post-barrier generator
|
||||||
void g1_write_barrier_post(Register store_addr, Register new_val, Register tmp);
|
void g1_write_barrier_post(Register store_addr, Register new_val, Register tmp);
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// pushes double TOS element of FPU stack on CPU stack; pops from FPU stack
|
// pushes double TOS element of FPU stack on CPU stack; pops from FPU stack
|
||||||
void push_fTOS();
|
void push_fTOS();
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
#include "runtime/timer.hpp"
|
#include "runtime/timer.hpp"
|
||||||
#include "runtime/vframeArray.hpp"
|
#include "runtime/vframeArray.hpp"
|
||||||
#include "utilities/debug.hpp"
|
#include "utilities/debug.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
#ifndef CC_INTERP
|
#ifndef CC_INTERP
|
||||||
#ifndef FAST_DISPATCH
|
#ifndef FAST_DISPATCH
|
||||||
@ -734,7 +735,7 @@ address InterpreterGenerator::generate_accessor_entry(void) {
|
|||||||
|
|
||||||
// Method entry for java.lang.ref.Reference.get.
|
// Method entry for java.lang.ref.Reference.get.
|
||||||
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// Code: _aload_0, _getfield, _areturn
|
// Code: _aload_0, _getfield, _areturn
|
||||||
// parameter size = 1
|
// parameter size = 1
|
||||||
//
|
//
|
||||||
@ -805,7 +806,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
|||||||
(void) generate_normal_entry(false);
|
(void) generate_normal_entry(false);
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// If G1 is not enabled then attempt to go through the accessor entry point
|
// If G1 is not enabled then attempt to go through the accessor entry point
|
||||||
// Reference.get is an accessor
|
// Reference.get is an accessor
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "runtime/stubRoutines.hpp"
|
#include "runtime/stubRoutines.hpp"
|
||||||
#include "runtime/synchronizer.hpp"
|
#include "runtime/synchronizer.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
#ifndef CC_INTERP
|
#ifndef CC_INTERP
|
||||||
#define __ _masm->
|
#define __ _masm->
|
||||||
@ -53,7 +54,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm,
|
|||||||
assert(tmp != val && tmp != base && tmp != index, "register collision");
|
assert(tmp != val && tmp != base && tmp != index, "register collision");
|
||||||
assert(index == noreg || offset == 0, "only one offset");
|
assert(index == noreg || offset == 0, "only one offset");
|
||||||
switch (barrier) {
|
switch (barrier) {
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
case BarrierSet::G1SATBCT:
|
case BarrierSet::G1SATBCT:
|
||||||
case BarrierSet::G1SATBCTLogging:
|
case BarrierSet::G1SATBCTLogging:
|
||||||
{
|
{
|
||||||
@ -82,7 +83,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
case BarrierSet::CardTableModRef:
|
case BarrierSet::CardTableModRef:
|
||||||
case BarrierSet::CardTableExtension:
|
case BarrierSet::CardTableExtension:
|
||||||
{
|
{
|
||||||
|
@ -36,11 +36,12 @@
|
|||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "runtime/stubRoutines.hpp"
|
#include "runtime/stubRoutines.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||||
#include "gc_implementation/g1/heapRegion.hpp"
|
#include "gc_implementation/g1/heapRegion.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#ifdef PRODUCT
|
#ifdef PRODUCT
|
||||||
#define BLOCK_COMMENT(str) /* nothing */
|
#define BLOCK_COMMENT(str) /* nothing */
|
||||||
|
@ -30,10 +30,11 @@
|
|||||||
#include "c1/c1_Runtime1.hpp"
|
#include "c1/c1_Runtime1.hpp"
|
||||||
#include "nativeInst_x86.hpp"
|
#include "nativeInst_x86.hpp"
|
||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#include "vmreg_x86.inline.hpp"
|
#include "vmreg_x86.inline.hpp"
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
|
|
||||||
#define __ ce->masm()->
|
#define __ ce->masm()->
|
||||||
@ -482,7 +483,7 @@ void ArrayCopyStub::emit_code(LIR_Assembler* ce) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
|
|
||||||
void G1PreBarrierStub::emit_code(LIR_Assembler* ce) {
|
void G1PreBarrierStub::emit_code(LIR_Assembler* ce) {
|
||||||
// At this point we know that marking is in progress.
|
// At this point we know that marking is in progress.
|
||||||
@ -528,7 +529,7 @@ void G1PostBarrierStub::emit_code(LIR_Assembler* ce) {
|
|||||||
__ jmp(_continuation);
|
__ jmp(_continuation);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#undef __
|
#undef __
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "runtime/signature.hpp"
|
#include "runtime/signature.hpp"
|
||||||
#include "runtime/vframeArray.hpp"
|
#include "runtime/vframeArray.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#include "vmreg_x86.inline.hpp"
|
#include "vmreg_x86.inline.hpp"
|
||||||
|
|
||||||
|
|
||||||
@ -1607,7 +1608,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
case g1_pre_barrier_slow_id:
|
case g1_pre_barrier_slow_id:
|
||||||
{
|
{
|
||||||
StubFrame f(sasm, "g1_pre_barrier", dont_gc_arguments);
|
StubFrame f(sasm, "g1_pre_barrier", dont_gc_arguments);
|
||||||
@ -1804,7 +1805,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{ StubFrame f(sasm, "unimplemented entry", dont_gc_arguments);
|
{ StubFrame f(sasm, "unimplemented entry", dont_gc_arguments);
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#include "runtime/timer.hpp"
|
#include "runtime/timer.hpp"
|
||||||
#include "runtime/vframeArray.hpp"
|
#include "runtime/vframeArray.hpp"
|
||||||
#include "utilities/debug.hpp"
|
#include "utilities/debug.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#ifdef SHARK
|
#ifdef SHARK
|
||||||
#include "shark/shark_globals.hpp"
|
#include "shark/shark_globals.hpp"
|
||||||
#endif
|
#endif
|
||||||
@ -938,7 +939,7 @@ address InterpreterGenerator::generate_accessor_entry(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
if (UseG1GC) {
|
if (UseG1GC) {
|
||||||
// We need to generate have a routine that generates code to:
|
// We need to generate have a routine that generates code to:
|
||||||
// * load the value in the referent field
|
// * load the value in the referent field
|
||||||
@ -950,7 +951,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
|||||||
// field as live.
|
// field as live.
|
||||||
Unimplemented();
|
Unimplemented();
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// If G1 is not enabled then attempt to go through the accessor entry point
|
// If G1 is not enabled then attempt to go through the accessor entry point
|
||||||
// Reference.get is an accessor
|
// Reference.get is an accessor
|
||||||
|
@ -37,11 +37,12 @@
|
|||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "runtime/stubRoutines.hpp"
|
#include "runtime/stubRoutines.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||||
#include "gc_implementation/g1/heapRegion.hpp"
|
#include "gc_implementation/g1/heapRegion.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#ifdef PRODUCT
|
#ifdef PRODUCT
|
||||||
#define BLOCK_COMMENT(str) /* nothing */
|
#define BLOCK_COMMENT(str) /* nothing */
|
||||||
@ -3207,7 +3208,7 @@ void MacroAssembler::vxorps(XMMRegister dst, XMMRegister nds, AddressLiteral src
|
|||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
|
|
||||||
void MacroAssembler::g1_write_barrier_pre(Register obj,
|
void MacroAssembler::g1_write_barrier_pre(Register obj,
|
||||||
Register pre_val,
|
Register pre_val,
|
||||||
@ -3417,7 +3418,7 @@ void MacroAssembler::g1_write_barrier_post(Register store_addr,
|
|||||||
bind(done);
|
bind(done);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
//////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#define CPU_X86_VM_MACROASSEMBLER_X86_HPP
|
#define CPU_X86_VM_MACROASSEMBLER_X86_HPP
|
||||||
|
|
||||||
#include "asm/assembler.hpp"
|
#include "asm/assembler.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
|
|
||||||
// MacroAssembler extends Assembler by frequently used macros.
|
// MacroAssembler extends Assembler by frequently used macros.
|
||||||
@ -294,7 +295,7 @@ class MacroAssembler: public Assembler {
|
|||||||
void store_check(Register obj); // store check for obj - register is destroyed afterwards
|
void store_check(Register obj); // store check for obj - register is destroyed afterwards
|
||||||
void store_check(Register obj, Address dst); // same as above, dst is exact store location (reg. is destroyed)
|
void store_check(Register obj, Address dst); // same as above, dst is exact store location (reg. is destroyed)
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
|
|
||||||
void g1_write_barrier_pre(Register obj,
|
void g1_write_barrier_pre(Register obj,
|
||||||
Register pre_val,
|
Register pre_val,
|
||||||
@ -309,7 +310,7 @@ class MacroAssembler: public Assembler {
|
|||||||
Register tmp,
|
Register tmp,
|
||||||
Register tmp2);
|
Register tmp2);
|
||||||
|
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// split store_check(Register obj) to enhance instruction interleaving
|
// split store_check(Register obj) to enhance instruction interleaving
|
||||||
void store_check_part_1(Register obj);
|
void store_check_part_1(Register obj);
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
#include "runtime/timer.hpp"
|
#include "runtime/timer.hpp"
|
||||||
#include "runtime/vframeArray.hpp"
|
#include "runtime/vframeArray.hpp"
|
||||||
#include "utilities/debug.hpp"
|
#include "utilities/debug.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
#define __ _masm->
|
#define __ _masm->
|
||||||
|
|
||||||
@ -761,7 +762,7 @@ address InterpreterGenerator::generate_accessor_entry(void) {
|
|||||||
|
|
||||||
// Method entry for java.lang.ref.Reference.get.
|
// Method entry for java.lang.ref.Reference.get.
|
||||||
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// Code: _aload_0, _getfield, _areturn
|
// Code: _aload_0, _getfield, _areturn
|
||||||
// parameter size = 1
|
// parameter size = 1
|
||||||
//
|
//
|
||||||
@ -844,7 +845,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
|||||||
|
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// If G1 is not enabled then attempt to go through the accessor entry point
|
// If G1 is not enabled then attempt to go through the accessor entry point
|
||||||
// Reference.get is an accessor
|
// Reference.get is an accessor
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
#include "runtime/timer.hpp"
|
#include "runtime/timer.hpp"
|
||||||
#include "runtime/vframeArray.hpp"
|
#include "runtime/vframeArray.hpp"
|
||||||
#include "utilities/debug.hpp"
|
#include "utilities/debug.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
#define __ _masm->
|
#define __ _masm->
|
||||||
|
|
||||||
@ -742,7 +743,7 @@ address InterpreterGenerator::generate_accessor_entry(void) {
|
|||||||
|
|
||||||
// Method entry for java.lang.ref.Reference.get.
|
// Method entry for java.lang.ref.Reference.get.
|
||||||
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// Code: _aload_0, _getfield, _areturn
|
// Code: _aload_0, _getfield, _areturn
|
||||||
// parameter size = 1
|
// parameter size = 1
|
||||||
//
|
//
|
||||||
@ -821,7 +822,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
|||||||
|
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// If G1 is not enabled then attempt to go through the accessor entry point
|
// If G1 is not enabled then attempt to go through the accessor entry point
|
||||||
// Reference.get is an accessor
|
// Reference.get is an accessor
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "runtime/stubRoutines.hpp"
|
#include "runtime/stubRoutines.hpp"
|
||||||
#include "runtime/synchronizer.hpp"
|
#include "runtime/synchronizer.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
#ifndef CC_INTERP
|
#ifndef CC_INTERP
|
||||||
#define __ _masm->
|
#define __ _masm->
|
||||||
@ -125,7 +126,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm,
|
|||||||
bool precise) {
|
bool precise) {
|
||||||
assert(val == noreg || val == rax, "parameter is just for looks");
|
assert(val == noreg || val == rax, "parameter is just for looks");
|
||||||
switch (barrier) {
|
switch (barrier) {
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
case BarrierSet::G1SATBCT:
|
case BarrierSet::G1SATBCT:
|
||||||
case BarrierSet::G1SATBCTLogging:
|
case BarrierSet::G1SATBCTLogging:
|
||||||
{
|
{
|
||||||
@ -164,7 +165,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm,
|
|||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
case BarrierSet::CardTableModRef:
|
case BarrierSet::CardTableModRef:
|
||||||
case BarrierSet::CardTableExtension:
|
case BarrierSet::CardTableExtension:
|
||||||
{
|
{
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "runtime/stubRoutines.hpp"
|
#include "runtime/stubRoutines.hpp"
|
||||||
#include "runtime/synchronizer.hpp"
|
#include "runtime/synchronizer.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
#ifndef CC_INTERP
|
#ifndef CC_INTERP
|
||||||
|
|
||||||
@ -136,7 +137,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm,
|
|||||||
bool precise) {
|
bool precise) {
|
||||||
assert(val == noreg || val == rax, "parameter is just for looks");
|
assert(val == noreg || val == rax, "parameter is just for looks");
|
||||||
switch (barrier) {
|
switch (barrier) {
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
case BarrierSet::G1SATBCT:
|
case BarrierSet::G1SATBCT:
|
||||||
case BarrierSet::G1SATBCTLogging:
|
case BarrierSet::G1SATBCTLogging:
|
||||||
{
|
{
|
||||||
@ -167,7 +168,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm,
|
|||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
case BarrierSet::CardTableModRef:
|
case BarrierSet::CardTableModRef:
|
||||||
case BarrierSet::CardTableExtension:
|
case BarrierSet::CardTableExtension:
|
||||||
{
|
{
|
||||||
|
@ -36,11 +36,12 @@
|
|||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "runtime/stubRoutines.hpp"
|
#include "runtime/stubRoutines.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||||
#include "gc_implementation/g1/heapRegion.hpp"
|
#include "gc_implementation/g1/heapRegion.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
int AbstractAssembler::code_fill_byte() {
|
int AbstractAssembler::code_fill_byte() {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
#include "runtime/vframeArray.hpp"
|
#include "runtime/vframeArray.hpp"
|
||||||
#include "stack_zero.inline.hpp"
|
#include "stack_zero.inline.hpp"
|
||||||
#include "utilities/debug.hpp"
|
#include "utilities/debug.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#ifdef SHARK
|
#ifdef SHARK
|
||||||
#include "shark/shark_globals.hpp"
|
#include "shark/shark_globals.hpp"
|
||||||
#endif
|
#endif
|
||||||
@ -791,7 +792,7 @@ address InterpreterGenerator::generate_accessor_entry() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
if (UseG1GC) {
|
if (UseG1GC) {
|
||||||
// We need to generate have a routine that generates code to:
|
// We need to generate have a routine that generates code to:
|
||||||
// * load the value in the referent field
|
// * load the value in the referent field
|
||||||
@ -803,7 +804,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
|||||||
// field as live.
|
// field as live.
|
||||||
Unimplemented();
|
Unimplemented();
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// If G1 is not enabled then attempt to go through the accessor entry point
|
// If G1 is not enabled then attempt to go through the accessor entry point
|
||||||
// Reference.get is an accessor
|
// Reference.get is an accessor
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include "c1/c1_LIR.hpp"
|
#include "c1/c1_LIR.hpp"
|
||||||
#include "c1/c1_Runtime1.hpp"
|
#include "c1/c1_Runtime1.hpp"
|
||||||
#include "utilities/array.hpp"
|
#include "utilities/array.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
class CodeEmitInfo;
|
class CodeEmitInfo;
|
||||||
class LIR_Assembler;
|
class LIR_Assembler;
|
||||||
@ -515,7 +516,7 @@ class ArrayCopyStub: public CodeStub {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// Code stubs for Garbage-First barriers.
|
// Code stubs for Garbage-First barriers.
|
||||||
class G1PreBarrierStub: public CodeStub {
|
class G1PreBarrierStub: public CodeStub {
|
||||||
@ -608,7 +609,7 @@ class G1PostBarrierStub: public CodeStub {
|
|||||||
#endif // PRODUCT
|
#endif // PRODUCT
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#endif // SHARE_VM_C1_C1_CODESTUBS_HPP
|
#endif // SHARE_VM_C1_C1_CODESTUBS_HPP
|
||||||
|
@ -35,9 +35,10 @@
|
|||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "runtime/stubRoutines.hpp"
|
#include "runtime/stubRoutines.hpp"
|
||||||
#include "utilities/bitMap.inline.hpp"
|
#include "utilities/bitMap.inline.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/g1/heapRegion.hpp"
|
#include "gc_implementation/g1/heapRegion.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
#define __ gen()->lir(__FILE__, __LINE__)->
|
#define __ gen()->lir(__FILE__, __LINE__)->
|
||||||
@ -1417,12 +1418,12 @@ void LIRGenerator::pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val,
|
|||||||
bool do_load, bool patch, CodeEmitInfo* info) {
|
bool do_load, bool patch, CodeEmitInfo* info) {
|
||||||
// Do the pre-write barrier, if any.
|
// Do the pre-write barrier, if any.
|
||||||
switch (_bs->kind()) {
|
switch (_bs->kind()) {
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
case BarrierSet::G1SATBCT:
|
case BarrierSet::G1SATBCT:
|
||||||
case BarrierSet::G1SATBCTLogging:
|
case BarrierSet::G1SATBCTLogging:
|
||||||
G1SATBCardTableModRef_pre_barrier(addr_opr, pre_val, do_load, patch, info);
|
G1SATBCardTableModRef_pre_barrier(addr_opr, pre_val, do_load, patch, info);
|
||||||
break;
|
break;
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
case BarrierSet::CardTableModRef:
|
case BarrierSet::CardTableModRef:
|
||||||
case BarrierSet::CardTableExtension:
|
case BarrierSet::CardTableExtension:
|
||||||
// No pre barriers
|
// No pre barriers
|
||||||
@ -1439,12 +1440,12 @@ void LIRGenerator::pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val,
|
|||||||
|
|
||||||
void LIRGenerator::post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val) {
|
void LIRGenerator::post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val) {
|
||||||
switch (_bs->kind()) {
|
switch (_bs->kind()) {
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
case BarrierSet::G1SATBCT:
|
case BarrierSet::G1SATBCT:
|
||||||
case BarrierSet::G1SATBCTLogging:
|
case BarrierSet::G1SATBCTLogging:
|
||||||
G1SATBCardTableModRef_post_barrier(addr, new_val);
|
G1SATBCardTableModRef_post_barrier(addr, new_val);
|
||||||
break;
|
break;
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
case BarrierSet::CardTableModRef:
|
case BarrierSet::CardTableModRef:
|
||||||
case BarrierSet::CardTableExtension:
|
case BarrierSet::CardTableExtension:
|
||||||
CardTableModRef_post_barrier(addr, new_val);
|
CardTableModRef_post_barrier(addr, new_val);
|
||||||
@ -1459,7 +1460,7 @@ void LIRGenerator::post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
|
|
||||||
void LIRGenerator::G1SATBCardTableModRef_pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val,
|
void LIRGenerator::G1SATBCardTableModRef_pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val,
|
||||||
bool do_load, bool patch, CodeEmitInfo* info) {
|
bool do_load, bool patch, CodeEmitInfo* info) {
|
||||||
@ -1575,7 +1576,7 @@ void LIRGenerator::G1SATBCardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_Opr
|
|||||||
__ branch_destination(slow->continuation());
|
__ branch_destination(slow->continuation());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void LIRGenerator::CardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val) {
|
void LIRGenerator::CardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val) {
|
||||||
@ -2181,7 +2182,7 @@ void LIRGenerator::do_UnsafeGetObject(UnsafeGetObject* x) {
|
|||||||
|
|
||||||
get_Object_unsafe(value, src.result(), off.result(), type, x->is_volatile());
|
get_Object_unsafe(value, src.result(), off.result(), type, x->is_volatile());
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// We might be reading the value of the referent field of a
|
// We might be reading the value of the referent field of a
|
||||||
// Reference object in order to attach it back to the live
|
// Reference object in order to attach it back to the live
|
||||||
// object graph. If G1 is enabled then we need to record
|
// object graph. If G1 is enabled then we need to record
|
||||||
@ -2311,7 +2312,7 @@ void LIRGenerator::do_UnsafeGetObject(UnsafeGetObject* x) {
|
|||||||
__ branch_destination(Lcont->label());
|
__ branch_destination(Lcont->label());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
if (x->is_volatile() && os::is_MP()) __ membar_acquire();
|
if (x->is_volatile() && os::is_MP()) __ membar_acquire();
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
#include "runtime/reflection.hpp"
|
#include "runtime/reflection.hpp"
|
||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "utilities/dtrace.hpp"
|
#include "utilities/dtrace.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#ifdef COMPILER1
|
#ifdef COMPILER1
|
||||||
#include "c1/c1_Runtime1.hpp"
|
#include "c1/c1_Runtime1.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "memory/oopFactory.hpp"
|
#include "memory/oopFactory.hpp"
|
||||||
#include "memory/resourceArea.hpp"
|
#include "memory/resourceArea.hpp"
|
||||||
#include "utilities/copy.hpp"
|
#include "utilities/copy.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
|
|
||||||
|
@ -28,8 +28,9 @@
|
|||||||
#include "memory/cardTableModRefBS.hpp"
|
#include "memory/cardTableModRefBS.hpp"
|
||||||
#include "memory/memRegion.hpp"
|
#include "memory/memRegion.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
|
|
||||||
class DirtyCardQueueSet;
|
class DirtyCardQueueSet;
|
||||||
|
|
||||||
@ -120,6 +121,6 @@ class G1SATBCardTableLoggingModRefBS: public G1SATBCardTableModRefBS {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1SATBCARDTABLEMODREFBS_HPP
|
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1SATBCARDTABLEMODREFBS_HPP
|
||||||
|
@ -32,8 +32,9 @@
|
|||||||
#include "gc_implementation/shared/spaceDecorator.hpp"
|
#include "gc_implementation/shared/spaceDecorator.hpp"
|
||||||
#include "memory/space.inline.hpp"
|
#include "memory/space.inline.hpp"
|
||||||
#include "memory/watermark.hpp"
|
#include "memory/watermark.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// A HeapRegion is the smallest piece of a G1CollectedHeap that
|
// A HeapRegion is the smallest piece of a G1CollectedHeap that
|
||||||
// can be collected independently.
|
// can be collected independently.
|
||||||
@ -837,6 +838,6 @@ class HeapRegionClosure : public StackObj {
|
|||||||
bool complete() { return _complete; }
|
bool complete() { return _complete; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGION_HPP
|
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGION_HPP
|
||||||
|
@ -23,10 +23,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/shared/allocationStats.hpp"
|
#include "gc_implementation/shared/allocationStats.hpp"
|
||||||
#include "utilities/ostream.hpp"
|
#include "utilities/ostream.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// Technically this should be derived from machine speed, and
|
// Technically this should be derived from machine speed, and
|
||||||
// ideally it would be dynamically adjusted.
|
// ideally it would be dynamically adjusted.
|
||||||
|
@ -25,11 +25,12 @@
|
|||||||
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_ALLOCATIONSTATS_HPP
|
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_ALLOCATIONSTATS_HPP
|
||||||
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_ALLOCATIONSTATS_HPP
|
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_ALLOCATIONSTATS_HPP
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/shared/gcUtil.hpp"
|
#include "gc_implementation/shared/gcUtil.hpp"
|
||||||
#include "memory/allocation.hpp"
|
#include "memory/allocation.hpp"
|
||||||
#include "utilities/globalDefinitions.hpp"
|
#include "utilities/globalDefinitions.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
class AllocationStats VALUE_OBJ_CLASS_SPEC {
|
class AllocationStats VALUE_OBJ_CLASS_SPEC {
|
||||||
// A duration threshold (in ms) used to filter
|
// A duration threshold (in ms) used to filter
|
||||||
|
@ -25,9 +25,10 @@
|
|||||||
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_CONCURRENTGCTHREAD_HPP
|
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_CONCURRENTGCTHREAD_HPP
|
||||||
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_CONCURRENTGCTHREAD_HPP
|
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_CONCURRENTGCTHREAD_HPP
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "runtime/thread.hpp"
|
#include "runtime/thread.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
class VoidClosure;
|
class VoidClosure;
|
||||||
|
|
||||||
|
@ -23,11 +23,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/shared/gSpaceCounters.hpp"
|
#include "gc_implementation/shared/gSpaceCounters.hpp"
|
||||||
#include "memory/generation.hpp"
|
#include "memory/generation.hpp"
|
||||||
#include "memory/resourceArea.hpp"
|
#include "memory/resourceArea.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
GSpaceCounters::GSpaceCounters(const char* name, int ordinal, size_t max_size,
|
GSpaceCounters::GSpaceCounters(const char* name, int ordinal, size_t max_size,
|
||||||
Generation* g, GenerationCounters* gc,
|
Generation* g, GenerationCounters* gc,
|
||||||
|
@ -25,11 +25,12 @@
|
|||||||
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_GSPACECOUNTERS_HPP
|
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_GSPACECOUNTERS_HPP
|
||||||
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_GSPACECOUNTERS_HPP
|
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_GSPACECOUNTERS_HPP
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/shared/generationCounters.hpp"
|
#include "gc_implementation/shared/generationCounters.hpp"
|
||||||
#include "memory/generation.hpp"
|
#include "memory/generation.hpp"
|
||||||
#include "runtime/perfData.hpp"
|
#include "runtime/perfData.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// A GSpaceCounter is a holder class for performance counters
|
// A GSpaceCounter is a holder class for performance counters
|
||||||
// that track a space;
|
// that track a space;
|
||||||
|
@ -25,10 +25,11 @@
|
|||||||
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_GCADAPTIVEPOLICYCOUNTERS_HPP
|
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_GCADAPTIVEPOLICYCOUNTERS_HPP
|
||||||
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_GCADAPTIVEPOLICYCOUNTERS_HPP
|
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_GCADAPTIVEPOLICYCOUNTERS_HPP
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/shared/adaptiveSizePolicy.hpp"
|
#include "gc_implementation/shared/adaptiveSizePolicy.hpp"
|
||||||
#include "gc_implementation/shared/gcPolicyCounters.hpp"
|
#include "gc_implementation/shared/gcPolicyCounters.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// This class keeps statistical information and computes the
|
// This class keeps statistical information and computes the
|
||||||
// size of the heap.
|
// size of the heap.
|
||||||
|
@ -25,11 +25,12 @@
|
|||||||
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_HSPACECOUNTERS_HPP
|
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_HSPACECOUNTERS_HPP
|
||||||
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_HSPACECOUNTERS_HPP
|
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_HSPACECOUNTERS_HPP
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/shared/generationCounters.hpp"
|
#include "gc_implementation/shared/generationCounters.hpp"
|
||||||
#include "memory/generation.hpp"
|
#include "memory/generation.hpp"
|
||||||
#include "runtime/perfData.hpp"
|
#include "runtime/perfData.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// A HSpaceCounter is a holder class for performance counters
|
// A HSpaceCounter is a holder class for performance counters
|
||||||
// that track a collections (logical spaces) in a heap;
|
// that track a collections (logical spaces) in a heap;
|
||||||
|
@ -23,11 +23,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/shared/immutableSpace.hpp"
|
#include "gc_implementation/shared/immutableSpace.hpp"
|
||||||
#include "memory/universe.hpp"
|
#include "memory/universe.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
void ImmutableSpace::initialize(MemRegion mr) {
|
void ImmutableSpace::initialize(MemRegion mr) {
|
||||||
HeapWord* bottom = mr.start();
|
HeapWord* bottom = mr.start();
|
||||||
|
@ -25,9 +25,10 @@
|
|||||||
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_ISGCACTIVEMARK_HPP
|
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_ISGCACTIVEMARK_HPP
|
||||||
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_ISGCACTIVEMARK_HPP
|
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_ISGCACTIVEMARK_HPP
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
|
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// This class provides a method for block structured setting of the
|
// This class provides a method for block structured setting of the
|
||||||
// _is_gc_active state without requiring accessors in CollectedHeap
|
// _is_gc_active state without requiring accessors in CollectedHeap
|
||||||
|
@ -28,9 +28,10 @@
|
|||||||
#include "gc_implementation/shared/markSweep.hpp"
|
#include "gc_implementation/shared/markSweep.hpp"
|
||||||
#include "gc_interface/collectedHeap.hpp"
|
#include "gc_interface/collectedHeap.hpp"
|
||||||
#include "utilities/stack.inline.hpp"
|
#include "utilities/stack.inline.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
|
#include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
inline void MarkSweep::mark_object(oop obj) {
|
inline void MarkSweep::mark_object(oop obj) {
|
||||||
// some marks may contain information we need to preserve so we store them away
|
// some marks may contain information we need to preserve so we store them away
|
||||||
|
@ -25,10 +25,11 @@
|
|||||||
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_MUTABLENUMASPACE_HPP
|
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_MUTABLENUMASPACE_HPP
|
||||||
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_MUTABLENUMASPACE_HPP
|
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_MUTABLENUMASPACE_HPP
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/shared/gcUtil.hpp"
|
#include "gc_implementation/shared/gcUtil.hpp"
|
||||||
#include "gc_implementation/shared/mutableSpace.hpp"
|
#include "gc_implementation/shared/mutableSpace.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The NUMA-aware allocator (MutableNUMASpace) is basically a modification
|
* The NUMA-aware allocator (MutableNUMASpace) is basically a modification
|
||||||
|
@ -23,13 +23,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/shared/mutableSpace.hpp"
|
#include "gc_implementation/shared/mutableSpace.hpp"
|
||||||
#include "gc_implementation/shared/spaceDecorator.hpp"
|
#include "gc_implementation/shared/spaceDecorator.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "runtime/safepoint.hpp"
|
#include "runtime/safepoint.hpp"
|
||||||
#include "runtime/thread.hpp"
|
#include "runtime/thread.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
MutableSpace::MutableSpace(size_t alignment): ImmutableSpace(), _top(NULL), _alignment(alignment) {
|
MutableSpace::MutableSpace(size_t alignment): ImmutableSpace(), _top(NULL), _alignment(alignment) {
|
||||||
assert(MutableSpace::alignment() >= 0 &&
|
assert(MutableSpace::alignment() >= 0 &&
|
||||||
|
@ -23,10 +23,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/shared/spaceCounters.hpp"
|
#include "gc_implementation/shared/spaceCounters.hpp"
|
||||||
#include "memory/resourceArea.hpp"
|
#include "memory/resourceArea.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
SpaceCounters::SpaceCounters(const char* name, int ordinal, size_t max_size,
|
SpaceCounters::SpaceCounters(const char* name, int ordinal, size_t max_size,
|
||||||
MutableSpace* m, GenerationCounters* gc) :
|
MutableSpace* m, GenerationCounters* gc) :
|
||||||
|
@ -25,12 +25,13 @@
|
|||||||
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_SPACECOUNTERS_HPP
|
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_SPACECOUNTERS_HPP
|
||||||
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_SPACECOUNTERS_HPP
|
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_SPACECOUNTERS_HPP
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/shared/generationCounters.hpp"
|
#include "gc_implementation/shared/generationCounters.hpp"
|
||||||
#include "gc_implementation/shared/immutableSpace.hpp"
|
#include "gc_implementation/shared/immutableSpace.hpp"
|
||||||
#include "gc_implementation/shared/mutableSpace.hpp"
|
#include "gc_implementation/shared/mutableSpace.hpp"
|
||||||
#include "runtime/perfData.hpp"
|
#include "runtime/perfData.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// A SpaceCounter is a holder class for performance counters
|
// A SpaceCounter is a holder class for performance counters
|
||||||
// that track a space;
|
// that track a space;
|
||||||
|
@ -36,9 +36,10 @@
|
|||||||
#include "runtime/interfaceSupport.hpp"
|
#include "runtime/interfaceSupport.hpp"
|
||||||
#include "utilities/dtrace.hpp"
|
#include "utilities/dtrace.hpp"
|
||||||
#include "utilities/preserveException.hpp"
|
#include "utilities/preserveException.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#ifndef USDT2
|
#ifndef USDT2
|
||||||
HS_DTRACE_PROBE_DECL1(hotspot, gc__begin, bool);
|
HS_DTRACE_PROBE_DECL1(hotspot, gc__begin, bool);
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#include "gc_implementation/shared/allocationStats.hpp"
|
#include "gc_implementation/shared/allocationStats.hpp"
|
||||||
#include "memory/binaryTreeDictionary.hpp"
|
#include "memory/binaryTreeDictionary.hpp"
|
||||||
#include "memory/freeList.hpp"
|
#include "memory/freeList.hpp"
|
||||||
@ -31,12 +32,13 @@
|
|||||||
#include "memory/metachunk.hpp"
|
#include "memory/metachunk.hpp"
|
||||||
#include "runtime/globals.hpp"
|
#include "runtime/globals.hpp"
|
||||||
#include "utilities/ostream.hpp"
|
#include "utilities/ostream.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/concurrentMarkSweep/adaptiveFreeList.hpp"
|
#include "gc_implementation/concurrentMarkSweep/adaptiveFreeList.hpp"
|
||||||
#include "gc_implementation/concurrentMarkSweep/freeChunk.hpp"
|
#include "gc_implementation/concurrentMarkSweep/freeChunk.hpp"
|
||||||
#include "gc_implementation/shared/spaceDecorator.hpp"
|
#include "gc_implementation/shared/spaceDecorator.hpp"
|
||||||
#include "gc_implementation/concurrentMarkSweep/freeChunk.hpp"
|
#include "gc_implementation/concurrentMarkSweep/freeChunk.hpp"
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// A binary tree based search structure for free blocks.
|
// A binary tree based search structure for free blocks.
|
||||||
@ -118,7 +120,7 @@ TreeList<Chunk_t, FreeList_t>::as_TreeList(HeapWord* addr, size_t size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// Specialize for AdaptiveFreeList which tries to avoid
|
// Specialize for AdaptiveFreeList which tries to avoid
|
||||||
// splitting a chunk of a size that is under populated in favor of
|
// splitting a chunk of a size that is under populated in favor of
|
||||||
// an over populated size. The general get_better_list() just returns
|
// an over populated size. The general get_better_list() just returns
|
||||||
@ -160,7 +162,7 @@ TreeList<FreeChunk, AdaptiveFreeList>::get_better_list(
|
|||||||
}
|
}
|
||||||
return curTL;
|
return curTL;
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
template <class Chunk_t, template <class> class FreeList_t>
|
template <class Chunk_t, template <class> class FreeList_t>
|
||||||
TreeList<Chunk_t, FreeList_t>*
|
TreeList<Chunk_t, FreeList_t>*
|
||||||
@ -871,7 +873,7 @@ size_t BinaryTreeDictionary<Chunk_t, FreeList_t>::total_nodes_in_tree(TreeList<C
|
|||||||
template <class Chunk_t, template <class> class FreeList_t>
|
template <class Chunk_t, template <class> class FreeList_t>
|
||||||
void BinaryTreeDictionary<Chunk_t, FreeList_t>::dict_census_update(size_t size, bool split, bool birth){}
|
void BinaryTreeDictionary<Chunk_t, FreeList_t>::dict_census_update(size_t size, bool split, bool birth){}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
template <>
|
template <>
|
||||||
void BinaryTreeDictionary<FreeChunk, AdaptiveFreeList>::dict_census_update(size_t size, bool split, bool birth){
|
void BinaryTreeDictionary<FreeChunk, AdaptiveFreeList>::dict_census_update(size_t size, bool split, bool birth){
|
||||||
TreeList<FreeChunk, AdaptiveFreeList>* nd = find_list(size);
|
TreeList<FreeChunk, AdaptiveFreeList>* nd = find_list(size);
|
||||||
@ -900,7 +902,7 @@ void BinaryTreeDictionary<FreeChunk, AdaptiveFreeList>::dict_census_update(size_
|
|||||||
// This is a birth associated with a LinAB. The chunk
|
// This is a birth associated with a LinAB. The chunk
|
||||||
// for the LinAB is not in the dictionary.
|
// for the LinAB is not in the dictionary.
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
template <class Chunk_t, template <class> class FreeList_t>
|
template <class Chunk_t, template <class> class FreeList_t>
|
||||||
bool BinaryTreeDictionary<Chunk_t, FreeList_t>::coal_dict_over_populated(size_t size) {
|
bool BinaryTreeDictionary<Chunk_t, FreeList_t>::coal_dict_over_populated(size_t size) {
|
||||||
@ -909,7 +911,7 @@ bool BinaryTreeDictionary<Chunk_t, FreeList_t>::coal_dict_over_populated(size_t
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
template <>
|
template <>
|
||||||
bool BinaryTreeDictionary<FreeChunk, AdaptiveFreeList>::coal_dict_over_populated(size_t size) {
|
bool BinaryTreeDictionary<FreeChunk, AdaptiveFreeList>::coal_dict_over_populated(size_t size) {
|
||||||
if (FLSAlwaysCoalesceLarge) return true;
|
if (FLSAlwaysCoalesceLarge) return true;
|
||||||
@ -919,7 +921,7 @@ bool BinaryTreeDictionary<FreeChunk, AdaptiveFreeList>::coal_dict_over_populated
|
|||||||
return list_of_size == NULL || list_of_size->coal_desired() <= 0 ||
|
return list_of_size == NULL || list_of_size->coal_desired() <= 0 ||
|
||||||
list_of_size->count() > list_of_size->coal_desired();
|
list_of_size->count() > list_of_size->coal_desired();
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// Closures for walking the binary tree.
|
// Closures for walking the binary tree.
|
||||||
// do_list() walks the free list in a node applying the closure
|
// do_list() walks the free list in a node applying the closure
|
||||||
@ -979,7 +981,7 @@ class BeginSweepClosure : public AscendTreeCensusClosure<Chunk_t, FreeList_t> {
|
|||||||
|
|
||||||
void do_list(FreeList<Chunk_t>* fl) {}
|
void do_list(FreeList<Chunk_t>* fl) {}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
void do_list(AdaptiveFreeList<Chunk_t>* fl) {
|
void do_list(AdaptiveFreeList<Chunk_t>* fl) {
|
||||||
double coalSurplusPercent = _percentage;
|
double coalSurplusPercent = _percentage;
|
||||||
fl->compute_desired(_inter_sweep_current, _inter_sweep_estimate, _intra_sweep_estimate);
|
fl->compute_desired(_inter_sweep_current, _inter_sweep_estimate, _intra_sweep_estimate);
|
||||||
@ -987,7 +989,7 @@ class BeginSweepClosure : public AscendTreeCensusClosure<Chunk_t, FreeList_t> {
|
|||||||
fl->set_before_sweep(fl->count());
|
fl->set_before_sweep(fl->count());
|
||||||
fl->set_bfr_surp(fl->surplus());
|
fl->set_bfr_surp(fl->surplus());
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
};
|
};
|
||||||
|
|
||||||
// Used to search the tree until a condition is met.
|
// Used to search the tree until a condition is met.
|
||||||
@ -1134,13 +1136,13 @@ class setTreeSurplusClosure : public AscendTreeCensusClosure<Chunk_t, FreeList_t
|
|||||||
setTreeSurplusClosure(double v) { percentage = v; }
|
setTreeSurplusClosure(double v) { percentage = v; }
|
||||||
void do_list(FreeList<Chunk_t>* fl) {}
|
void do_list(FreeList<Chunk_t>* fl) {}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
void do_list(AdaptiveFreeList<Chunk_t>* fl) {
|
void do_list(AdaptiveFreeList<Chunk_t>* fl) {
|
||||||
double splitSurplusPercent = percentage;
|
double splitSurplusPercent = percentage;
|
||||||
fl->set_surplus(fl->count() -
|
fl->set_surplus(fl->count() -
|
||||||
(ssize_t)((double)fl->desired() * splitSurplusPercent));
|
(ssize_t)((double)fl->desired() * splitSurplusPercent));
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class Chunk_t, template <class> class FreeList_t>
|
template <class Chunk_t, template <class> class FreeList_t>
|
||||||
@ -1157,7 +1159,7 @@ class setTreeHintsClosure : public DescendTreeCensusClosure<Chunk_t, FreeList_t>
|
|||||||
setTreeHintsClosure(size_t v) { hint = v; }
|
setTreeHintsClosure(size_t v) { hint = v; }
|
||||||
void do_list(FreeList<Chunk_t>* fl) {}
|
void do_list(FreeList<Chunk_t>* fl) {}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
void do_list(AdaptiveFreeList<Chunk_t>* fl) {
|
void do_list(AdaptiveFreeList<Chunk_t>* fl) {
|
||||||
fl->set_hint(hint);
|
fl->set_hint(hint);
|
||||||
assert(fl->hint() == 0 || fl->hint() > fl->size(),
|
assert(fl->hint() == 0 || fl->hint() > fl->size(),
|
||||||
@ -1166,7 +1168,7 @@ class setTreeHintsClosure : public DescendTreeCensusClosure<Chunk_t, FreeList_t>
|
|||||||
hint = fl->size();
|
hint = fl->size();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class Chunk_t, template <class> class FreeList_t>
|
template <class Chunk_t, template <class> class FreeList_t>
|
||||||
@ -1180,7 +1182,7 @@ template <class Chunk_t, template <class> class FreeList_t>
|
|||||||
class clearTreeCensusClosure : public AscendTreeCensusClosure<Chunk_t, FreeList_t> {
|
class clearTreeCensusClosure : public AscendTreeCensusClosure<Chunk_t, FreeList_t> {
|
||||||
void do_list(FreeList<Chunk_t>* fl) {}
|
void do_list(FreeList<Chunk_t>* fl) {}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
void do_list(AdaptiveFreeList<Chunk_t>* fl) {
|
void do_list(AdaptiveFreeList<Chunk_t>* fl) {
|
||||||
fl->set_prev_sweep(fl->count());
|
fl->set_prev_sweep(fl->count());
|
||||||
fl->set_coal_births(0);
|
fl->set_coal_births(0);
|
||||||
@ -1188,7 +1190,7 @@ class clearTreeCensusClosure : public AscendTreeCensusClosure<Chunk_t, FreeList_
|
|||||||
fl->set_split_births(0);
|
fl->set_split_births(0);
|
||||||
fl->set_split_deaths(0);
|
fl->set_split_deaths(0);
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class Chunk_t, template <class> class FreeList_t>
|
template <class Chunk_t, template <class> class FreeList_t>
|
||||||
@ -1252,7 +1254,7 @@ class PrintTreeCensusClosure : public AscendTreeCensusClosure<Chunk_t, FreeList_
|
|||||||
total()->set_count( total()->count() + fl->count() );
|
total()->set_count( total()->count() + fl->count() );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
void do_list(AdaptiveFreeList<Chunk_t>* fl) {
|
void do_list(AdaptiveFreeList<Chunk_t>* fl) {
|
||||||
if (++_print_line >= 40) {
|
if (++_print_line >= 40) {
|
||||||
FreeList_t<Chunk_t>::print_labels_on(gclog_or_tty, "size");
|
FreeList_t<Chunk_t>::print_labels_on(gclog_or_tty, "size");
|
||||||
@ -1271,7 +1273,7 @@ class PrintTreeCensusClosure : public AscendTreeCensusClosure<Chunk_t, FreeList_
|
|||||||
total()->set_split_births(total()->split_births() + fl->split_births());
|
total()->set_split_births(total()->split_births() + fl->split_births());
|
||||||
total()->set_split_deaths(total()->split_deaths() + fl->split_deaths());
|
total()->set_split_deaths(total()->split_deaths() + fl->split_deaths());
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class Chunk_t, template <class> class FreeList_t>
|
template <class Chunk_t, template <class> class FreeList_t>
|
||||||
@ -1286,7 +1288,7 @@ void BinaryTreeDictionary<Chunk_t, FreeList_t>::print_dict_census(void) const {
|
|||||||
FreeList_t<Chunk_t>::print_labels_on(gclog_or_tty, " ");
|
FreeList_t<Chunk_t>::print_labels_on(gclog_or_tty, " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
template <>
|
template <>
|
||||||
void BinaryTreeDictionary<FreeChunk, AdaptiveFreeList>::print_dict_census(void) const {
|
void BinaryTreeDictionary<FreeChunk, AdaptiveFreeList>::print_dict_census(void) const {
|
||||||
|
|
||||||
@ -1308,7 +1310,7 @@ void BinaryTreeDictionary<FreeChunk, AdaptiveFreeList>::print_dict_census(void)
|
|||||||
(double)(total->desired() - total->count())
|
(double)(total->desired() - total->count())
|
||||||
/(total->desired() != 0 ? (double)total->desired() : 1.0));
|
/(total->desired() != 0 ? (double)total->desired() : 1.0));
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
template <class Chunk_t, template <class> class FreeList_t>
|
template <class Chunk_t, template <class> class FreeList_t>
|
||||||
class PrintFreeListsClosure : public AscendTreeCensusClosure<Chunk_t, FreeList_t> {
|
class PrintFreeListsClosure : public AscendTreeCensusClosure<Chunk_t, FreeList_t> {
|
||||||
@ -1414,10 +1416,10 @@ template class BinaryTreeDictionary<Metachunk, FreeList>;
|
|||||||
template class TreeChunk<Metachunk, FreeList>;
|
template class TreeChunk<Metachunk, FreeList>;
|
||||||
|
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// Explicitly instantiate these types for FreeChunk.
|
// Explicitly instantiate these types for FreeChunk.
|
||||||
template class TreeList<FreeChunk, AdaptiveFreeList>;
|
template class TreeList<FreeChunk, AdaptiveFreeList>;
|
||||||
template class BinaryTreeDictionary<FreeChunk, AdaptiveFreeList>;
|
template class BinaryTreeDictionary<FreeChunk, AdaptiveFreeList>;
|
||||||
template class TreeChunk<FreeChunk, AdaptiveFreeList>;
|
template class TreeChunk<FreeChunk, AdaptiveFreeList>;
|
||||||
|
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "runtime/mutexLocker.hpp"
|
#include "runtime/mutexLocker.hpp"
|
||||||
#include "runtime/virtualspace.hpp"
|
#include "runtime/virtualspace.hpp"
|
||||||
#include "services/memTracker.hpp"
|
#include "services/memTracker.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#ifdef COMPILER1
|
#ifdef COMPILER1
|
||||||
#include "c1/c1_LIR.hpp"
|
#include "c1/c1_LIR.hpp"
|
||||||
#include "c1/c1_LIRGenerator.hpp"
|
#include "c1/c1_LIRGenerator.hpp"
|
||||||
@ -499,13 +500,13 @@ void CardTableModRefBS::non_clean_card_iterate_possibly_parallel(Space* sp,
|
|||||||
int n_threads = SharedHeap::heap()->n_par_threads();
|
int n_threads = SharedHeap::heap()->n_par_threads();
|
||||||
bool is_par = n_threads > 0;
|
bool is_par = n_threads > 0;
|
||||||
if (is_par) {
|
if (is_par) {
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
assert(SharedHeap::heap()->n_par_threads() ==
|
assert(SharedHeap::heap()->n_par_threads() ==
|
||||||
SharedHeap::heap()->workers()->active_workers(), "Mismatch");
|
SharedHeap::heap()->workers()->active_workers(), "Mismatch");
|
||||||
non_clean_card_iterate_parallel_work(sp, mr, cl, ct, n_threads);
|
non_clean_card_iterate_parallel_work(sp, mr, cl, ct, n_threads);
|
||||||
#else // SERIALGC
|
#else // INCLUDE_ALL_GCS
|
||||||
fatal("Parallel gc not supported here.");
|
fatal("Parallel gc not supported here.");
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
} else {
|
} else {
|
||||||
// We do not call the non_clean_card_iterate_serial() version below because
|
// We do not call the non_clean_card_iterate_serial() version below because
|
||||||
// we want to clear the cards (which non_clean_card_iterate_serial() does not
|
// we want to clear the cards (which non_clean_card_iterate_serial() does not
|
||||||
|
@ -31,10 +31,11 @@
|
|||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "runtime/java.hpp"
|
#include "runtime/java.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/g1/concurrentMark.hpp"
|
#include "gc_implementation/g1/concurrentMark.hpp"
|
||||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
CardTableRS::CardTableRS(MemRegion whole_heap,
|
CardTableRS::CardTableRS(MemRegion whole_heap,
|
||||||
int max_covered_regions) :
|
int max_covered_regions) :
|
||||||
@ -42,7 +43,7 @@ CardTableRS::CardTableRS(MemRegion whole_heap,
|
|||||||
_cur_youngergen_card_val(youngergenP1_card),
|
_cur_youngergen_card_val(youngergenP1_card),
|
||||||
_regions_to_iterate(max_covered_regions - 1)
|
_regions_to_iterate(max_covered_regions - 1)
|
||||||
{
|
{
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
if (UseG1GC) {
|
if (UseG1GC) {
|
||||||
_ct_bs = new G1SATBCardTableLoggingModRefBS(whole_heap,
|
_ct_bs = new G1SATBCardTableLoggingModRefBS(whole_heap,
|
||||||
max_covered_regions);
|
max_covered_regions);
|
||||||
|
@ -39,10 +39,11 @@
|
|||||||
#include "runtime/java.hpp"
|
#include "runtime/java.hpp"
|
||||||
#include "runtime/thread.inline.hpp"
|
#include "runtime/thread.inline.hpp"
|
||||||
#include "runtime/vmThread.hpp"
|
#include "runtime/vmThread.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.hpp"
|
#include "gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.hpp"
|
||||||
#include "gc_implementation/concurrentMarkSweep/cmsGCAdaptivePolicyCounters.hpp"
|
#include "gc_implementation/concurrentMarkSweep/cmsGCAdaptivePolicyCounters.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// CollectorPolicy methods.
|
// CollectorPolicy methods.
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include "memory/barrierSet.hpp"
|
#include "memory/barrierSet.hpp"
|
||||||
#include "memory/generationSpec.hpp"
|
#include "memory/generationSpec.hpp"
|
||||||
#include "memory/genRemSet.hpp"
|
#include "memory/genRemSet.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
// This class (or more correctly, subtypes of this class)
|
// This class (or more correctly, subtypes of this class)
|
||||||
// are used to define global garbage collector attributes.
|
// are used to define global garbage collector attributes.
|
||||||
@ -48,10 +49,10 @@
|
|||||||
class GenCollectorPolicy;
|
class GenCollectorPolicy;
|
||||||
class TwoGenerationCollectorPolicy;
|
class TwoGenerationCollectorPolicy;
|
||||||
class AdaptiveSizePolicy;
|
class AdaptiveSizePolicy;
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
class ConcurrentMarkSweepPolicy;
|
class ConcurrentMarkSweepPolicy;
|
||||||
class G1CollectorPolicy;
|
class G1CollectorPolicy;
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
class GCPolicyCounters;
|
class GCPolicyCounters;
|
||||||
class MarkSweepPolicy;
|
class MarkSweepPolicy;
|
||||||
@ -134,21 +135,21 @@ class CollectorPolicy : public CHeapObj<mtGC> {
|
|||||||
virtual GenCollectorPolicy* as_generation_policy() { return NULL; }
|
virtual GenCollectorPolicy* as_generation_policy() { return NULL; }
|
||||||
virtual TwoGenerationCollectorPolicy* as_two_generation_policy() { return NULL; }
|
virtual TwoGenerationCollectorPolicy* as_two_generation_policy() { return NULL; }
|
||||||
virtual MarkSweepPolicy* as_mark_sweep_policy() { return NULL; }
|
virtual MarkSweepPolicy* as_mark_sweep_policy() { return NULL; }
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
virtual ConcurrentMarkSweepPolicy* as_concurrent_mark_sweep_policy() { return NULL; }
|
virtual ConcurrentMarkSweepPolicy* as_concurrent_mark_sweep_policy() { return NULL; }
|
||||||
virtual G1CollectorPolicy* as_g1_policy() { return NULL; }
|
virtual G1CollectorPolicy* as_g1_policy() { return NULL; }
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
// Note that these are not virtual.
|
// Note that these are not virtual.
|
||||||
bool is_generation_policy() { return as_generation_policy() != NULL; }
|
bool is_generation_policy() { return as_generation_policy() != NULL; }
|
||||||
bool is_two_generation_policy() { return as_two_generation_policy() != NULL; }
|
bool is_two_generation_policy() { return as_two_generation_policy() != NULL; }
|
||||||
bool is_mark_sweep_policy() { return as_mark_sweep_policy() != NULL; }
|
bool is_mark_sweep_policy() { return as_mark_sweep_policy() != NULL; }
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
bool is_concurrent_mark_sweep_policy() { return as_concurrent_mark_sweep_policy() != NULL; }
|
bool is_concurrent_mark_sweep_policy() { return as_concurrent_mark_sweep_policy() != NULL; }
|
||||||
bool is_g1_policy() { return as_g1_policy() != NULL; }
|
bool is_g1_policy() { return as_g1_policy() != NULL; }
|
||||||
#else // SERIALGC
|
#else // INCLUDE_ALL_GCS
|
||||||
bool is_concurrent_mark_sweep_policy() { return false; }
|
bool is_concurrent_mark_sweep_policy() { return false; }
|
||||||
bool is_g1_policy() { return false; }
|
bool is_g1_policy() { return false; }
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
|
|
||||||
virtual BarrierSet::Name barrier_set_name() = 0;
|
virtual BarrierSet::Name barrier_set_name() = 0;
|
||||||
|
@ -23,13 +23,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/concurrentMarkSweep/freeChunk.hpp"
|
#include "gc_implementation/concurrentMarkSweep/freeChunk.hpp"
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
#include "memory/freeBlockDictionary.hpp"
|
#include "memory/freeBlockDictionary.hpp"
|
||||||
#include "memory/metablock.hpp"
|
#include "memory/metablock.hpp"
|
||||||
#include "memory/metachunk.hpp"
|
#include "memory/metachunk.hpp"
|
||||||
#include "runtime/thread.inline.hpp"
|
#include "runtime/thread.inline.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
template <class Chunk> Mutex* FreeBlockDictionary<Chunk>::par_lock() const {
|
template <class Chunk> Mutex* FreeBlockDictionary<Chunk>::par_lock() const {
|
||||||
@ -56,7 +58,7 @@ template <class Chunk> void FreeBlockDictionary<Chunk>::verify_par_locked() cons
|
|||||||
template class FreeBlockDictionary<Metablock>;
|
template class FreeBlockDictionary<Metablock>;
|
||||||
template class FreeBlockDictionary<Metachunk>;
|
template class FreeBlockDictionary<Metachunk>;
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// Explicitly instantiate for FreeChunk
|
// Explicitly instantiate for FreeChunk
|
||||||
template class FreeBlockDictionary<FreeChunk>;
|
template class FreeBlockDictionary<FreeChunk>;
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
@ -31,10 +31,11 @@
|
|||||||
#include "runtime/globals.hpp"
|
#include "runtime/globals.hpp"
|
||||||
#include "runtime/mutex.hpp"
|
#include "runtime/mutex.hpp"
|
||||||
#include "runtime/vmThread.hpp"
|
#include "runtime/vmThread.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/concurrentMarkSweep/freeChunk.hpp"
|
#include "gc_implementation/concurrentMarkSweep/freeChunk.hpp"
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// Free list. A FreeList is used to access a linked list of chunks
|
// Free list. A FreeList is used to access a linked list of chunks
|
||||||
// of space in the heap. The head and tail are maintained so that
|
// of space in the heap. The head and tail are maintained so that
|
||||||
@ -341,6 +342,6 @@ void FreeList<Chunk_t>::print_on(outputStream* st, const char* c) const {
|
|||||||
|
|
||||||
template class FreeList<Metablock>;
|
template class FreeList<Metablock>;
|
||||||
template class FreeList<Metachunk>;
|
template class FreeList<Metachunk>;
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
template class FreeList<FreeChunk>;
|
template class FreeList<FreeChunk>;
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
@ -51,10 +51,11 @@
|
|||||||
#include "services/memoryService.hpp"
|
#include "services/memoryService.hpp"
|
||||||
#include "utilities/vmError.hpp"
|
#include "utilities/vmError.hpp"
|
||||||
#include "utilities/workgroup.hpp"
|
#include "utilities/workgroup.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
|
#include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
|
||||||
#include "gc_implementation/concurrentMarkSweep/vmCMSOperations.hpp"
|
#include "gc_implementation/concurrentMarkSweep/vmCMSOperations.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
GenCollectedHeap* GenCollectedHeap::_gch;
|
GenCollectedHeap* GenCollectedHeap::_gch;
|
||||||
NOT_PRODUCT(size_t GenCollectedHeap::_skip_header_HeapWords = 0;)
|
NOT_PRODUCT(size_t GenCollectedHeap::_skip_header_HeapWords = 0;)
|
||||||
@ -141,14 +142,14 @@ jint GenCollectedHeap::initialize() {
|
|||||||
}
|
}
|
||||||
clear_incremental_collection_failed();
|
clear_incremental_collection_failed();
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// If we are running CMS, create the collector responsible
|
// If we are running CMS, create the collector responsible
|
||||||
// for collecting the CMS generations.
|
// for collecting the CMS generations.
|
||||||
if (collector_policy()->is_concurrent_mark_sweep_policy()) {
|
if (collector_policy()->is_concurrent_mark_sweep_policy()) {
|
||||||
bool success = create_cms_collector();
|
bool success = create_cms_collector();
|
||||||
if (!success) return JNI_ENOMEM;
|
if (!success) return JNI_ENOMEM;
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
return JNI_OK;
|
return JNI_OK;
|
||||||
}
|
}
|
||||||
@ -686,12 +687,12 @@ size_t GenCollectedHeap::unsafe_max_alloc() {
|
|||||||
|
|
||||||
void GenCollectedHeap::collect(GCCause::Cause cause) {
|
void GenCollectedHeap::collect(GCCause::Cause cause) {
|
||||||
if (should_do_concurrent_full_gc(cause)) {
|
if (should_do_concurrent_full_gc(cause)) {
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// mostly concurrent full collection
|
// mostly concurrent full collection
|
||||||
collect_mostly_concurrent(cause);
|
collect_mostly_concurrent(cause);
|
||||||
#else // SERIALGC
|
#else // INCLUDE_ALL_GCS
|
||||||
ShouldNotReachHere();
|
ShouldNotReachHere();
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
} else {
|
} else {
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
if (cause == GCCause::_scavenge_alot) {
|
if (cause == GCCause::_scavenge_alot) {
|
||||||
@ -736,7 +737,7 @@ void GenCollectedHeap::collect_locked(GCCause::Cause cause, int max_level) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
bool GenCollectedHeap::create_cms_collector() {
|
bool GenCollectedHeap::create_cms_collector() {
|
||||||
|
|
||||||
assert(((_gens[1]->kind() == Generation::ConcurrentMarkSweep) ||
|
assert(((_gens[1]->kind() == Generation::ConcurrentMarkSweep) ||
|
||||||
@ -772,7 +773,7 @@ void GenCollectedHeap::collect_mostly_concurrent(GCCause::Cause cause) {
|
|||||||
VMThread::execute(&op);
|
VMThread::execute(&op);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
void GenCollectedHeap::do_full_collection(bool clear_all_soft_refs) {
|
void GenCollectedHeap::do_full_collection(bool clear_all_soft_refs) {
|
||||||
do_full_collection(clear_all_soft_refs, _n_gens - 1);
|
do_full_collection(clear_all_soft_refs, _n_gens - 1);
|
||||||
@ -1116,22 +1117,22 @@ void GenCollectedHeap::gc_threads_do(ThreadClosure* tc) const {
|
|||||||
if (workers() != NULL) {
|
if (workers() != NULL) {
|
||||||
workers()->threads_do(tc);
|
workers()->threads_do(tc);
|
||||||
}
|
}
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
if (UseConcMarkSweepGC) {
|
if (UseConcMarkSweepGC) {
|
||||||
ConcurrentMarkSweepThread::threads_do(tc);
|
ConcurrentMarkSweepThread::threads_do(tc);
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenCollectedHeap::print_gc_threads_on(outputStream* st) const {
|
void GenCollectedHeap::print_gc_threads_on(outputStream* st) const {
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
if (UseParNewGC) {
|
if (UseParNewGC) {
|
||||||
workers()->print_worker_threads_on(st);
|
workers()->print_worker_threads_on(st);
|
||||||
}
|
}
|
||||||
if (UseConcMarkSweepGC) {
|
if (UseConcMarkSweepGC) {
|
||||||
ConcurrentMarkSweepThread::print_all_on(st);
|
ConcurrentMarkSweepThread::print_all_on(st);
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenCollectedHeap::print_tracing_info() const {
|
void GenCollectedHeap::print_tracing_info() const {
|
||||||
|
@ -30,11 +30,12 @@
|
|||||||
#include "memory/generationSpec.hpp"
|
#include "memory/generationSpec.hpp"
|
||||||
#include "memory/tenuredGeneration.hpp"
|
#include "memory/tenuredGeneration.hpp"
|
||||||
#include "runtime/java.hpp"
|
#include "runtime/java.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/parNew/asParNewGeneration.hpp"
|
#include "gc_implementation/parNew/asParNewGeneration.hpp"
|
||||||
#include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp"
|
#include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp"
|
||||||
#include "gc_implementation/parNew/parNewGeneration.hpp"
|
#include "gc_implementation/parNew/parNewGeneration.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
Generation* GenerationSpec::init(ReservedSpace rs, int level,
|
Generation* GenerationSpec::init(ReservedSpace rs, int level,
|
||||||
GenRemSet* remset) {
|
GenRemSet* remset) {
|
||||||
@ -45,7 +46,7 @@ Generation* GenerationSpec::init(ReservedSpace rs, int level,
|
|||||||
case Generation::MarkSweepCompact:
|
case Generation::MarkSweepCompact:
|
||||||
return new TenuredGeneration(rs, init_size(), level, remset);
|
return new TenuredGeneration(rs, init_size(), level, remset);
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
case Generation::ParNew:
|
case Generation::ParNew:
|
||||||
return new ParNewGeneration(rs, init_size(), level);
|
return new ParNewGeneration(rs, init_size(), level);
|
||||||
|
|
||||||
@ -94,7 +95,7 @@ Generation* GenerationSpec::init(ReservedSpace rs, int level,
|
|||||||
|
|
||||||
return g;
|
return g;
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
default:
|
default:
|
||||||
guarantee(false, "unrecognized GenerationName");
|
guarantee(false, "unrecognized GenerationName");
|
||||||
|
@ -29,9 +29,10 @@
|
|||||||
#include "memory/resourceArea.hpp"
|
#include "memory/resourceArea.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "utilities/globalDefinitions.hpp"
|
#include "utilities/globalDefinitions.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
|
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// HeapInspection
|
// HeapInspection
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include "memory/allocation.inline.hpp"
|
#include "memory/allocation.inline.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
#if INCLUDE_SERVICES
|
#if INCLUDE_SERVICES
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include "runtime/safepoint.hpp"
|
#include "runtime/safepoint.hpp"
|
||||||
#include "utilities/copy.hpp"
|
#include "utilities/copy.hpp"
|
||||||
#include "utilities/globalDefinitions.hpp"
|
#include "utilities/globalDefinitions.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
void SpaceMemRegionOopsIterClosure::do_oop(oop* p) { SpaceMemRegionOopsIterClosure::do_oop_work(p); }
|
void SpaceMemRegionOopsIterClosure::do_oop(oop* p) { SpaceMemRegionOopsIterClosure::do_oop_work(p); }
|
||||||
void SpaceMemRegionOopsIterClosure::do_oop(narrowOop* p) { SpaceMemRegionOopsIterClosure::do_oop_work(p); }
|
void SpaceMemRegionOopsIterClosure::do_oop(narrowOop* p) { SpaceMemRegionOopsIterClosure::do_oop_work(p); }
|
||||||
@ -658,7 +659,7 @@ void ContiguousSpace::object_iterate_mem(MemRegion mr, UpwardsObjectClosure* cl)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#define ContigSpace_PAR_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \
|
#define ContigSpace_PAR_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \
|
||||||
\
|
\
|
||||||
void ContiguousSpace::par_oop_iterate(MemRegion mr, OopClosureType* blk) {\
|
void ContiguousSpace::par_oop_iterate(MemRegion mr, OopClosureType* blk) {\
|
||||||
@ -673,7 +674,7 @@ void ContiguousSpace::object_iterate_mem(MemRegion mr, UpwardsObjectClosure* cl)
|
|||||||
ALL_PAR_OOP_ITERATE_CLOSURES(ContigSpace_PAR_OOP_ITERATE_DEFN)
|
ALL_PAR_OOP_ITERATE_CLOSURES(ContigSpace_PAR_OOP_ITERATE_DEFN)
|
||||||
|
|
||||||
#undef ContigSpace_PAR_OOP_ITERATE_DEFN
|
#undef ContigSpace_PAR_OOP_ITERATE_DEFN
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
void ContiguousSpace::oop_iterate(ExtendedOopClosure* blk) {
|
void ContiguousSpace::oop_iterate(ExtendedOopClosure* blk) {
|
||||||
if (is_empty()) return;
|
if (is_empty()) return;
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "oops/markOop.hpp"
|
#include "oops/markOop.hpp"
|
||||||
#include "runtime/mutexLocker.hpp"
|
#include "runtime/mutexLocker.hpp"
|
||||||
#include "runtime/prefetch.hpp"
|
#include "runtime/prefetch.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#include "utilities/workgroup.hpp"
|
#include "utilities/workgroup.hpp"
|
||||||
#ifdef TARGET_OS_FAMILY_linux
|
#ifdef TARGET_OS_FAMILY_linux
|
||||||
# include "os_linux.inline.hpp"
|
# include "os_linux.inline.hpp"
|
||||||
@ -884,14 +885,14 @@ class ContiguousSpace: public CompactibleSpace {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// In support of parallel oop_iterate.
|
// In support of parallel oop_iterate.
|
||||||
#define ContigSpace_PAR_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \
|
#define ContigSpace_PAR_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \
|
||||||
void par_oop_iterate(MemRegion mr, OopClosureType* blk);
|
void par_oop_iterate(MemRegion mr, OopClosureType* blk);
|
||||||
|
|
||||||
ALL_PAR_OOP_ITERATE_CLOSURES(ContigSpace_PAR_OOP_ITERATE_DECL)
|
ALL_PAR_OOP_ITERATE_CLOSURES(ContigSpace_PAR_OOP_ITERATE_DECL)
|
||||||
#undef ContigSpace_PAR_OOP_ITERATE_DECL
|
#undef ContigSpace_PAR_OOP_ITERATE_DECL
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// Compaction support
|
// Compaction support
|
||||||
virtual void reset_after_compaction() {
|
virtual void reset_after_compaction() {
|
||||||
|
@ -26,9 +26,10 @@
|
|||||||
#define SHARE_VM_MEMORY_SPECIALIZED_OOP_CLOSURES_HPP
|
#define SHARE_VM_MEMORY_SPECIALIZED_OOP_CLOSURES_HPP
|
||||||
|
|
||||||
#include "runtime/atomic.hpp"
|
#include "runtime/atomic.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/g1/g1_specialized_oop_closures.hpp"
|
#include "gc_implementation/g1/g1_specialized_oop_closures.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// The following OopClosure types get specialized versions of
|
// The following OopClosure types get specialized versions of
|
||||||
// "oop_oop_iterate" that invoke the closures' do_oop methods
|
// "oop_oop_iterate" that invoke the closures' do_oop methods
|
||||||
@ -80,20 +81,20 @@ class NoHeaderExtendedOopClosure;
|
|||||||
f(FastScanClosure,_nv) \
|
f(FastScanClosure,_nv) \
|
||||||
f(FilteringClosure,_nv)
|
f(FilteringClosure,_nv)
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f) \
|
#define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f) \
|
||||||
f(ParScanWithBarrierClosure,_nv) \
|
f(ParScanWithBarrierClosure,_nv) \
|
||||||
f(ParScanWithoutBarrierClosure,_nv)
|
f(ParScanWithoutBarrierClosure,_nv)
|
||||||
#else // SERIALGC
|
#else // INCLUDE_ALL_GCS
|
||||||
#define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f)
|
#define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f)
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_1(f) \
|
#define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_1(f) \
|
||||||
f(NoHeaderExtendedOopClosure,_nv) \
|
f(NoHeaderExtendedOopClosure,_nv) \
|
||||||
SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_S(f) \
|
SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_S(f) \
|
||||||
SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f)
|
SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f)
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f) \
|
#define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f) \
|
||||||
f(MarkRefsIntoAndScanClosure,_nv) \
|
f(MarkRefsIntoAndScanClosure,_nv) \
|
||||||
f(Par_MarkRefsIntoAndScanClosure,_nv) \
|
f(Par_MarkRefsIntoAndScanClosure,_nv) \
|
||||||
@ -104,9 +105,9 @@ class NoHeaderExtendedOopClosure;
|
|||||||
f(CMSKeepAliveClosure,_nv) \
|
f(CMSKeepAliveClosure,_nv) \
|
||||||
f(CMSInnerParMarkAndPushClosure,_nv) \
|
f(CMSInnerParMarkAndPushClosure,_nv) \
|
||||||
FURTHER_SPECIALIZED_OOP_OOP_ITERATE_CLOSURES(f)
|
FURTHER_SPECIALIZED_OOP_OOP_ITERATE_CLOSURES(f)
|
||||||
#else // SERIALGC
|
#else // INCLUDE_ALL_GCS
|
||||||
#define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f)
|
#define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f)
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
|
|
||||||
// We separate these out, because sometime the general one has
|
// We separate these out, because sometime the general one has
|
||||||
@ -120,7 +121,7 @@ class NoHeaderExtendedOopClosure;
|
|||||||
#define ALL_OOP_OOP_ITERATE_CLOSURES_2(f) \
|
#define ALL_OOP_OOP_ITERATE_CLOSURES_2(f) \
|
||||||
SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f)
|
SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f)
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// This macro applies an argument macro to all OopClosures for which we
|
// This macro applies an argument macro to all OopClosures for which we
|
||||||
// want specialized bodies of a family of methods related to
|
// want specialized bodies of a family of methods related to
|
||||||
// "par_oop_iterate". The arguments to f are the same as above.
|
// "par_oop_iterate". The arguments to f are the same as above.
|
||||||
@ -136,7 +137,7 @@ class NoHeaderExtendedOopClosure;
|
|||||||
#define ALL_PAR_OOP_ITERATE_CLOSURES(f) \
|
#define ALL_PAR_OOP_ITERATE_CLOSURES(f) \
|
||||||
f(ExtendedOopClosure,_v) \
|
f(ExtendedOopClosure,_v) \
|
||||||
SPECIALIZED_PAR_OOP_ITERATE_CLOSURES(f)
|
SPECIALIZED_PAR_OOP_ITERATE_CLOSURES(f)
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// This macro applies an argument macro to all OopClosures for which we
|
// This macro applies an argument macro to all OopClosures for which we
|
||||||
// want specialized bodies of a family of methods related to
|
// want specialized bodies of a family of methods related to
|
||||||
@ -155,14 +156,14 @@ class NoHeaderExtendedOopClosure;
|
|||||||
f(ScanClosure,_nv) \
|
f(ScanClosure,_nv) \
|
||||||
f(FastScanClosure,_nv)
|
f(FastScanClosure,_nv)
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#define SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_P(f) \
|
#define SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_P(f) \
|
||||||
f(ParScanWithBarrierClosure,_nv) \
|
f(ParScanWithBarrierClosure,_nv) \
|
||||||
f(ParScanWithoutBarrierClosure,_nv) \
|
f(ParScanWithoutBarrierClosure,_nv) \
|
||||||
FURTHER_SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES(f)
|
FURTHER_SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES(f)
|
||||||
#else // SERIALGC
|
#else // INCLUDE_ALL_GCS
|
||||||
#define SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_P(f)
|
#define SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_P(f)
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#define SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG(f) \
|
#define SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG(f) \
|
||||||
SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_S(f) \
|
SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_S(f) \
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "memory/tenuredGeneration.hpp"
|
#include "memory/tenuredGeneration.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "runtime/java.hpp"
|
#include "runtime/java.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
TenuredGeneration::TenuredGeneration(ReservedSpace rs,
|
TenuredGeneration::TenuredGeneration(ReservedSpace rs,
|
||||||
size_t initial_byte_size, int level,
|
size_t initial_byte_size, int level,
|
||||||
@ -61,7 +62,7 @@ TenuredGeneration::TenuredGeneration(ReservedSpace rs,
|
|||||||
_space_counters = new CSpaceCounters(gen_name, 0,
|
_space_counters = new CSpaceCounters(gen_name, 0,
|
||||||
_virtual_space.reserved_size(),
|
_virtual_space.reserved_size(),
|
||||||
_the_space, _gen_counters);
|
_the_space, _gen_counters);
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
if (UseParNewGC) {
|
if (UseParNewGC) {
|
||||||
typedef ParGCAllocBufferWithBOT* ParGCAllocBufferWithBOTPtr;
|
typedef ParGCAllocBufferWithBOT* ParGCAllocBufferWithBOTPtr;
|
||||||
_alloc_buffers = NEW_C_HEAP_ARRAY(ParGCAllocBufferWithBOTPtr,
|
_alloc_buffers = NEW_C_HEAP_ARRAY(ParGCAllocBufferWithBOTPtr,
|
||||||
@ -77,7 +78,7 @@ TenuredGeneration::TenuredGeneration(ReservedSpace rs,
|
|||||||
} else {
|
} else {
|
||||||
_alloc_buffers = NULL;
|
_alloc_buffers = NULL;
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -339,7 +340,7 @@ void TenuredGeneration::update_counters() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
oop TenuredGeneration::par_promote(int thread_num,
|
oop TenuredGeneration::par_promote(int thread_num,
|
||||||
oop old, markOop m, size_t word_sz) {
|
oop old, markOop m, size_t word_sz) {
|
||||||
|
|
||||||
@ -423,10 +424,10 @@ void TenuredGeneration::verify_alloc_buffers_clean() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // SERIALGC
|
#else // INCLUDE_ALL_GCS
|
||||||
void TenuredGeneration::retire_alloc_buffers_before_full_gc() {}
|
void TenuredGeneration::retire_alloc_buffers_before_full_gc() {}
|
||||||
void TenuredGeneration::verify_alloc_buffers_clean() {}
|
void TenuredGeneration::verify_alloc_buffers_clean() {}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
bool TenuredGeneration::promotion_attempt_is_safe(size_t max_promotion_in_bytes) const {
|
bool TenuredGeneration::promotion_attempt_is_safe(size_t max_promotion_in_bytes) const {
|
||||||
size_t available = max_contiguous_available();
|
size_t available = max_contiguous_available();
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include "gc_implementation/shared/gcStats.hpp"
|
#include "gc_implementation/shared/gcStats.hpp"
|
||||||
#include "gc_implementation/shared/generationCounters.hpp"
|
#include "gc_implementation/shared/generationCounters.hpp"
|
||||||
#include "memory/generation.hpp"
|
#include "memory/generation.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
// TenuredGeneration models the heap containing old (promoted/tenured) objects.
|
// TenuredGeneration models the heap containing old (promoted/tenured) objects.
|
||||||
|
|
||||||
@ -45,11 +46,11 @@ class TenuredGeneration: public OneContigSpaceCardGeneration {
|
|||||||
size_t _capacity_at_prologue;
|
size_t _capacity_at_prologue;
|
||||||
size_t _used_at_prologue;
|
size_t _used_at_prologue;
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// To support parallel promotion: an array of parallel allocation
|
// To support parallel promotion: an array of parallel allocation
|
||||||
// buffers, one per thread, initially NULL.
|
// buffers, one per thread, initially NULL.
|
||||||
ParGCAllocBufferWithBOT** _alloc_buffers;
|
ParGCAllocBufferWithBOT** _alloc_buffers;
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// Retire all alloc buffers before a full GC, so that they will be
|
// Retire all alloc buffers before a full GC, so that they will be
|
||||||
// re-allocated at the start of the next young GC.
|
// re-allocated at the start of the next young GC.
|
||||||
@ -93,14 +94,14 @@ class TenuredGeneration: public OneContigSpaceCardGeneration {
|
|||||||
size_t size,
|
size_t size,
|
||||||
bool is_tlab);
|
bool is_tlab);
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// Overrides.
|
// Overrides.
|
||||||
virtual oop par_promote(int thread_num,
|
virtual oop par_promote(int thread_num,
|
||||||
oop obj, markOop m, size_t word_sz);
|
oop obj, markOop m, size_t word_sz);
|
||||||
virtual void par_promote_alloc_undo(int thread_num,
|
virtual void par_promote_alloc_undo(int thread_num,
|
||||||
HeapWord* obj, size_t word_sz);
|
HeapWord* obj, size_t word_sz);
|
||||||
virtual void par_promote_alloc_done(int thread_num);
|
virtual void par_promote_alloc_done(int thread_num);
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// Performance Counter support
|
// Performance Counter support
|
||||||
void update_counters();
|
void update_counters();
|
||||||
|
@ -70,13 +70,14 @@
|
|||||||
#include "utilities/events.hpp"
|
#include "utilities/events.hpp"
|
||||||
#include "utilities/hashtable.inline.hpp"
|
#include "utilities/hashtable.inline.hpp"
|
||||||
#include "utilities/preserveException.hpp"
|
#include "utilities/preserveException.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.hpp"
|
#include "gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.hpp"
|
||||||
#include "gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.hpp"
|
#include "gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.hpp"
|
||||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||||
#include "gc_implementation/g1/g1CollectorPolicy.hpp"
|
#include "gc_implementation/g1/g1CollectorPolicy.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
|
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// Known objects
|
// Known objects
|
||||||
Klass* Universe::_boolArrayKlassObj = NULL;
|
Klass* Universe::_boolArrayKlassObj = NULL;
|
||||||
@ -740,20 +741,20 @@ char* Universe::preferred_heap_base(size_t heap_size, NARROW_OOP_MODE mode) {
|
|||||||
jint Universe::initialize_heap() {
|
jint Universe::initialize_heap() {
|
||||||
|
|
||||||
if (UseParallelGC) {
|
if (UseParallelGC) {
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
Universe::_collectedHeap = new ParallelScavengeHeap();
|
Universe::_collectedHeap = new ParallelScavengeHeap();
|
||||||
#else // SERIALGC
|
#else // INCLUDE_ALL_GCS
|
||||||
fatal("UseParallelGC not supported in this VM.");
|
fatal("UseParallelGC not supported in this VM.");
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
} else if (UseG1GC) {
|
} else if (UseG1GC) {
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
G1CollectorPolicy* g1p = new G1CollectorPolicy();
|
G1CollectorPolicy* g1p = new G1CollectorPolicy();
|
||||||
G1CollectedHeap* g1h = new G1CollectedHeap(g1p);
|
G1CollectedHeap* g1h = new G1CollectedHeap(g1p);
|
||||||
Universe::_collectedHeap = g1h;
|
Universe::_collectedHeap = g1h;
|
||||||
#else // SERIALGC
|
#else // INCLUDE_ALL_GCS
|
||||||
fatal("UseG1GC not supported in java kernel vm.");
|
fatal("UseG1GC not supported in java kernel vm.");
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
GenCollectorPolicy *gc_policy;
|
GenCollectorPolicy *gc_policy;
|
||||||
@ -761,15 +762,15 @@ jint Universe::initialize_heap() {
|
|||||||
if (UseSerialGC) {
|
if (UseSerialGC) {
|
||||||
gc_policy = new MarkSweepPolicy();
|
gc_policy = new MarkSweepPolicy();
|
||||||
} else if (UseConcMarkSweepGC) {
|
} else if (UseConcMarkSweepGC) {
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
if (UseAdaptiveSizePolicy) {
|
if (UseAdaptiveSizePolicy) {
|
||||||
gc_policy = new ASConcurrentMarkSweepPolicy();
|
gc_policy = new ASConcurrentMarkSweepPolicy();
|
||||||
} else {
|
} else {
|
||||||
gc_policy = new ConcurrentMarkSweepPolicy();
|
gc_policy = new ConcurrentMarkSweepPolicy();
|
||||||
}
|
}
|
||||||
#else // SERIALGC
|
#else // INCLUDE_ALL_GCS
|
||||||
fatal("UseConcMarkSweepGC not supported in this VM.");
|
fatal("UseConcMarkSweepGC not supported in this VM.");
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
} else { // default old generation
|
} else { // default old generation
|
||||||
gc_policy = new MarkSweepPolicy();
|
gc_policy = new MarkSweepPolicy();
|
||||||
}
|
}
|
||||||
|
@ -33,9 +33,10 @@
|
|||||||
#include "prims/jvmtiRedefineClassesTrace.hpp"
|
#include "prims/jvmtiRedefineClassesTrace.hpp"
|
||||||
#include "prims/methodHandles.hpp"
|
#include "prims/methodHandles.hpp"
|
||||||
#include "runtime/handles.inline.hpp"
|
#include "runtime/handles.inline.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
# include "gc_implementation/parallelScavenge/psPromotionManager.hpp"
|
# include "gc_implementation/parallelScavenge/psPromotionManager.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
|
|
||||||
// Implememtation of ConstantPoolCacheEntry
|
// Implememtation of ConstantPoolCacheEntry
|
||||||
|
@ -36,12 +36,13 @@
|
|||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "oops/symbol.hpp"
|
#include "oops/symbol.hpp"
|
||||||
#include "runtime/handles.inline.hpp"
|
#include "runtime/handles.inline.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/parNew/parOopClosures.inline.hpp"
|
#include "gc_implementation/parNew/parOopClosures.inline.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
|
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
||||||
#include "oops/oop.pcgc.inline.hpp"
|
#include "oops/oop.pcgc.inline.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#define if_do_metadata_checked(closure, nv_suffix) \
|
#define if_do_metadata_checked(closure, nv_suffix) \
|
||||||
/* Make sure the non-virtual and the virtual versions match. */ \
|
/* Make sure the non-virtual and the virtual versions match. */ \
|
||||||
@ -73,7 +74,7 @@ oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) {
|
|||||||
return size; \
|
return size; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \
|
#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \
|
||||||
\
|
\
|
||||||
int InstanceClassLoaderKlass:: \
|
int InstanceClassLoaderKlass:: \
|
||||||
@ -83,7 +84,7 @@ oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) {
|
|||||||
int size = InstanceKlass::oop_oop_iterate_backwards##nv_suffix(obj, closure); \
|
int size = InstanceKlass::oop_oop_iterate_backwards##nv_suffix(obj, closure); \
|
||||||
return size; \
|
return size; \
|
||||||
}
|
}
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
|
|
||||||
#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix) \
|
#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix) \
|
||||||
@ -111,10 +112,10 @@ oop_oop_iterate##nv_suffix##_m(oop obj,
|
|||||||
|
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN)
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN)
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN_m)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN_m)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN_m)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN_m)
|
||||||
|
|
||||||
@ -129,7 +130,7 @@ void InstanceClassLoaderKlass::oop_follow_contents(oop obj) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
void InstanceClassLoaderKlass::oop_follow_contents(ParCompactionManager* cm,
|
void InstanceClassLoaderKlass::oop_follow_contents(ParCompactionManager* cm,
|
||||||
oop obj) {
|
oop obj) {
|
||||||
InstanceKlass::oop_follow_contents(cm, obj);
|
InstanceKlass::oop_follow_contents(cm, obj);
|
||||||
@ -155,5 +156,5 @@ int InstanceClassLoaderKlass::oop_update_pointers(ParCompactionManager* cm, oop
|
|||||||
}
|
}
|
||||||
return size_helper();
|
return size_helper();
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#define SHARE_VM_OOPS_INSTANCECLASSLOADERKLASS_HPP
|
#define SHARE_VM_OOPS_INSTANCECLASSLOADERKLASS_HPP
|
||||||
|
|
||||||
#include "oops/instanceKlass.hpp"
|
#include "oops/instanceKlass.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
// An InstanceClassLoaderKlass is a specialization of the InstanceKlass. It does
|
// An InstanceClassLoaderKlass is a specialization of the InstanceKlass. It does
|
||||||
// not add any field. It is added to walk the dependencies for the class loader
|
// not add any field. It is added to walk the dependencies for the class loader
|
||||||
@ -61,13 +62,13 @@ public:
|
|||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL)
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
|
#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
|
||||||
int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);
|
int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);
|
||||||
|
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// Garbage collection
|
// Garbage collection
|
||||||
void oop_follow_contents(oop obj);
|
void oop_follow_contents(oop obj);
|
||||||
|
@ -55,7 +55,8 @@
|
|||||||
#include "runtime/thread.inline.hpp"
|
#include "runtime/thread.inline.hpp"
|
||||||
#include "services/threadService.hpp"
|
#include "services/threadService.hpp"
|
||||||
#include "utilities/dtrace.hpp"
|
#include "utilities/dtrace.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/concurrentMarkSweep/cmsOopClosures.inline.hpp"
|
#include "gc_implementation/concurrentMarkSweep/cmsOopClosures.inline.hpp"
|
||||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||||
#include "gc_implementation/g1/g1OopClosures.inline.hpp"
|
#include "gc_implementation/g1/g1OopClosures.inline.hpp"
|
||||||
@ -66,7 +67,7 @@
|
|||||||
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
|
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
||||||
#include "oops/oop.pcgc.inline.hpp"
|
#include "oops/oop.pcgc.inline.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
#ifdef COMPILER1
|
#ifdef COMPILER1
|
||||||
#include "c1/c1_Compiler.hpp"
|
#include "c1/c1_Compiler.hpp"
|
||||||
#endif
|
#endif
|
||||||
@ -2042,7 +2043,7 @@ void InstanceKlass::oop_follow_contents(oop obj) {
|
|||||||
assert_is_in_closed_subset)
|
assert_is_in_closed_subset)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
void InstanceKlass::oop_follow_contents(ParCompactionManager* cm,
|
void InstanceKlass::oop_follow_contents(ParCompactionManager* cm,
|
||||||
oop obj) {
|
oop obj) {
|
||||||
assert(obj != NULL, "can't follow the content of NULL object");
|
assert(obj != NULL, "can't follow the content of NULL object");
|
||||||
@ -2054,7 +2055,7 @@ void InstanceKlass::oop_follow_contents(ParCompactionManager* cm,
|
|||||||
PSParallelCompact::mark_and_push(cm, p), \
|
PSParallelCompact::mark_and_push(cm, p), \
|
||||||
assert_is_in)
|
assert_is_in)
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// closure's do_metadata() method dictates whether the given closure should be
|
// closure's do_metadata() method dictates whether the given closure should be
|
||||||
// applied to the klass ptr in the object header.
|
// applied to the klass ptr in the object header.
|
||||||
@ -2082,7 +2083,7 @@ int InstanceKlass::oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure)
|
|||||||
return size_helper(); \
|
return size_helper(); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#define InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \
|
#define InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \
|
||||||
\
|
\
|
||||||
int InstanceKlass::oop_oop_iterate_backwards##nv_suffix(oop obj, \
|
int InstanceKlass::oop_oop_iterate_backwards##nv_suffix(oop obj, \
|
||||||
@ -2100,7 +2101,7 @@ int InstanceKlass::oop_oop_iterate_backwards##nv_suffix(oop obj,
|
|||||||
assert_is_in_closed_subset) \
|
assert_is_in_closed_subset) \
|
||||||
return size_helper(); \
|
return size_helper(); \
|
||||||
}
|
}
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#define InstanceKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix) \
|
#define InstanceKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix) \
|
||||||
\
|
\
|
||||||
@ -2124,10 +2125,10 @@ ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_DEFN)
|
|||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_DEFN)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_DEFN_m)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_DEFN_m)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_DEFN_m)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_DEFN_m)
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN)
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
int InstanceKlass::oop_adjust_pointers(oop obj) {
|
int InstanceKlass::oop_adjust_pointers(oop obj) {
|
||||||
int size = size_helper();
|
int size = size_helper();
|
||||||
@ -2139,7 +2140,7 @@ int InstanceKlass::oop_adjust_pointers(oop obj) {
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
void InstanceKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
|
void InstanceKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
|
||||||
InstanceKlass_OOP_MAP_REVERSE_ITERATE( \
|
InstanceKlass_OOP_MAP_REVERSE_ITERATE( \
|
||||||
obj, \
|
obj, \
|
||||||
@ -2159,7 +2160,7 @@ int InstanceKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
void InstanceKlass::clean_implementors_list(BoolObjectClosure* is_alive) {
|
void InstanceKlass::clean_implementors_list(BoolObjectClosure* is_alive) {
|
||||||
assert(is_loader_alive(is_alive), "this klass should be live");
|
assert(is_loader_alive(is_alive), "this klass should be live");
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "utilities/accessFlags.hpp"
|
#include "utilities/accessFlags.hpp"
|
||||||
#include "utilities/bitMap.inline.hpp"
|
#include "utilities/bitMap.inline.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
// An InstanceKlass is the VM level representation of a Java class.
|
// An InstanceKlass is the VM level representation of a Java class.
|
||||||
// It contains all information needed for at class at execution runtime.
|
// It contains all information needed for at class at execution runtime.
|
||||||
@ -932,13 +933,13 @@ class InstanceKlass: public Klass {
|
|||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_DECL)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_DECL)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_DECL)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_DECL)
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#define InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
|
#define InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
|
||||||
int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);
|
int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);
|
||||||
|
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
u2 idnum_allocated_count() const { return _idnum_allocated_count; }
|
u2 idnum_allocated_count() const { return _idnum_allocated_count; }
|
||||||
private:
|
private:
|
||||||
|
@ -35,7 +35,8 @@
|
|||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "oops/symbol.hpp"
|
#include "oops/symbol.hpp"
|
||||||
#include "runtime/handles.inline.hpp"
|
#include "runtime/handles.inline.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/concurrentMarkSweep/cmsOopClosures.inline.hpp"
|
#include "gc_implementation/concurrentMarkSweep/cmsOopClosures.inline.hpp"
|
||||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||||
#include "gc_implementation/g1/g1OopClosures.inline.hpp"
|
#include "gc_implementation/g1/g1OopClosures.inline.hpp"
|
||||||
@ -45,7 +46,7 @@
|
|||||||
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
|
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
||||||
#include "oops/oop.pcgc.inline.hpp"
|
#include "oops/oop.pcgc.inline.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
int InstanceMirrorKlass::_offset_of_static_fields = 0;
|
int InstanceMirrorKlass::_offset_of_static_fields = 0;
|
||||||
|
|
||||||
@ -168,7 +169,7 @@ void InstanceMirrorKlass::oop_follow_contents(oop obj) {
|
|||||||
assert_is_in_closed_subset)
|
assert_is_in_closed_subset)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
void InstanceMirrorKlass::oop_follow_contents(ParCompactionManager* cm,
|
void InstanceMirrorKlass::oop_follow_contents(ParCompactionManager* cm,
|
||||||
oop obj) {
|
oop obj) {
|
||||||
InstanceKlass::oop_follow_contents(cm, obj);
|
InstanceKlass::oop_follow_contents(cm, obj);
|
||||||
@ -189,7 +190,7 @@ void InstanceMirrorKlass::oop_follow_contents(ParCompactionManager* cm,
|
|||||||
PSParallelCompact::mark_and_push(cm, p), \
|
PSParallelCompact::mark_and_push(cm, p), \
|
||||||
assert_is_in)
|
assert_is_in)
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
int InstanceMirrorKlass::oop_adjust_pointers(oop obj) {
|
int InstanceMirrorKlass::oop_adjust_pointers(oop obj) {
|
||||||
int size = oop_size(obj);
|
int size = oop_size(obj);
|
||||||
@ -262,7 +263,7 @@ oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) {
|
|||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#define InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \
|
#define InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \
|
||||||
\
|
\
|
||||||
int InstanceMirrorKlass:: \
|
int InstanceMirrorKlass:: \
|
||||||
@ -278,7 +279,7 @@ oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) {
|
|||||||
InstanceMirrorKlass_SPECIALIZED_OOP_ITERATE_DEFN(oop, nv_suffix); \
|
InstanceMirrorKlass_SPECIALIZED_OOP_ITERATE_DEFN(oop, nv_suffix); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
|
|
||||||
#define InstanceMirrorKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix) \
|
#define InstanceMirrorKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix) \
|
||||||
@ -310,14 +311,14 @@ oop_oop_iterate##nv_suffix##_m(oop obj,
|
|||||||
|
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceMirrorKlass_OOP_OOP_ITERATE_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceMirrorKlass_OOP_OOP_ITERATE_DEFN)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceMirrorKlass_OOP_OOP_ITERATE_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceMirrorKlass_OOP_OOP_ITERATE_DEFN)
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN)
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceMirrorKlass_OOP_OOP_ITERATE_DEFN_m)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceMirrorKlass_OOP_OOP_ITERATE_DEFN_m)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceMirrorKlass_OOP_OOP_ITERATE_DEFN_m)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceMirrorKlass_OOP_OOP_ITERATE_DEFN_m)
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
void InstanceMirrorKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
|
void InstanceMirrorKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
|
||||||
// Note that we don't have to follow the mirror -> klass pointer, since all
|
// Note that we don't have to follow the mirror -> klass pointer, since all
|
||||||
// klasses that are dirty will be scavenged when we iterate over the
|
// klasses that are dirty will be scavenged when we iterate over the
|
||||||
@ -353,7 +354,7 @@ int InstanceMirrorKlass::oop_update_pointers(ParCompactionManager* cm, oop obj)
|
|||||||
assert_nothing)
|
assert_nothing)
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
int InstanceMirrorKlass::instance_size(KlassHandle k) {
|
int InstanceMirrorKlass::instance_size(KlassHandle k) {
|
||||||
if (k() != NULL && k->oop_is_instance()) {
|
if (k() != NULL && k->oop_is_instance()) {
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
#include "oops/instanceKlass.hpp"
|
#include "oops/instanceKlass.hpp"
|
||||||
#include "runtime/handles.hpp"
|
#include "runtime/handles.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
// An InstanceMirrorKlass is a specialized InstanceKlass for
|
// An InstanceMirrorKlass is a specialized InstanceKlass for
|
||||||
// java.lang.Class instances. These instances are special because
|
// java.lang.Class instances. These instances are special because
|
||||||
@ -107,13 +108,13 @@ class InstanceMirrorKlass: public InstanceKlass {
|
|||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceMirrorKlass_OOP_OOP_ITERATE_DECL)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceMirrorKlass_OOP_OOP_ITERATE_DECL)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceMirrorKlass_OOP_OOP_ITERATE_DECL)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceMirrorKlass_OOP_OOP_ITERATE_DECL)
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#define InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
|
#define InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
|
||||||
int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);
|
int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);
|
||||||
|
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SHARE_VM_OOPS_INSTANCEMIRRORKLASS_HPP
|
#endif // SHARE_VM_OOPS_INSTANCEMIRRORKLASS_HPP
|
||||||
|
@ -33,7 +33,8 @@
|
|||||||
#include "oops/instanceRefKlass.hpp"
|
#include "oops/instanceRefKlass.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "utilities/preserveException.hpp"
|
#include "utilities/preserveException.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||||
#include "gc_implementation/g1/g1OopClosures.inline.hpp"
|
#include "gc_implementation/g1/g1OopClosures.inline.hpp"
|
||||||
#include "gc_implementation/g1/g1RemSet.inline.hpp"
|
#include "gc_implementation/g1/g1RemSet.inline.hpp"
|
||||||
@ -42,7 +43,7 @@
|
|||||||
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
|
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
||||||
#include "oops/oop.pcgc.inline.hpp"
|
#include "oops/oop.pcgc.inline.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
void specialized_oop_follow_contents(InstanceRefKlass* ref, oop obj) {
|
void specialized_oop_follow_contents(InstanceRefKlass* ref, oop obj) {
|
||||||
@ -120,7 +121,7 @@ void InstanceRefKlass::oop_follow_contents(oop obj) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
template <class T>
|
template <class T>
|
||||||
void specialized_oop_follow_contents(InstanceRefKlass* ref,
|
void specialized_oop_follow_contents(InstanceRefKlass* ref,
|
||||||
ParCompactionManager* cm,
|
ParCompactionManager* cm,
|
||||||
@ -194,7 +195,7 @@ void InstanceRefKlass::oop_follow_contents(ParCompactionManager* cm,
|
|||||||
specialized_oop_follow_contents<oop>(this, cm, obj);
|
specialized_oop_follow_contents<oop>(this, cm, obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
template <class T> void trace_reference_gc(const char *s, oop obj,
|
template <class T> void trace_reference_gc(const char *s, oop obj,
|
||||||
@ -317,7 +318,7 @@ oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) {
|
|||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#define InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \
|
#define InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \
|
||||||
\
|
\
|
||||||
int InstanceRefKlass:: \
|
int InstanceRefKlass:: \
|
||||||
@ -333,7 +334,7 @@ oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) {
|
|||||||
InstanceRefKlass_SPECIALIZED_OOP_ITERATE(oop, nv_suffix, contains); \
|
InstanceRefKlass_SPECIALIZED_OOP_ITERATE(oop, nv_suffix, contains); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
|
|
||||||
#define InstanceRefKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix) \
|
#define InstanceRefKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix) \
|
||||||
@ -354,14 +355,14 @@ oop_oop_iterate##nv_suffix##_m(oop obj,
|
|||||||
|
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceRefKlass_OOP_OOP_ITERATE_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceRefKlass_OOP_OOP_ITERATE_DEFN)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceRefKlass_OOP_OOP_ITERATE_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceRefKlass_OOP_OOP_ITERATE_DEFN)
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN)
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceRefKlass_OOP_OOP_ITERATE_DEFN_m)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceRefKlass_OOP_OOP_ITERATE_DEFN_m)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceRefKlass_OOP_OOP_ITERATE_DEFN_m)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceRefKlass_OOP_OOP_ITERATE_DEFN_m)
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
template <class T>
|
template <class T>
|
||||||
void specialized_oop_push_contents(InstanceRefKlass *ref,
|
void specialized_oop_push_contents(InstanceRefKlass *ref,
|
||||||
PSPromotionManager* pm, oop obj) {
|
PSPromotionManager* pm, oop obj) {
|
||||||
@ -444,7 +445,7 @@ int InstanceRefKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
|
|||||||
}
|
}
|
||||||
return size_helper();
|
return size_helper();
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
void InstanceRefKlass::update_nonstatic_oop_maps(Klass* k) {
|
void InstanceRefKlass::update_nonstatic_oop_maps(Klass* k) {
|
||||||
// Clear the nonstatic oop-map entries corresponding to referent
|
// Clear the nonstatic oop-map entries corresponding to referent
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#define SHARE_VM_OOPS_INSTANCEREFKLASS_HPP
|
#define SHARE_VM_OOPS_INSTANCEREFKLASS_HPP
|
||||||
|
|
||||||
#include "oops/instanceKlass.hpp"
|
#include "oops/instanceKlass.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
// An InstanceRefKlass is a specialized InstanceKlass for Java
|
// An InstanceRefKlass is a specialized InstanceKlass for Java
|
||||||
// classes that are subclasses of java/lang/ref/Reference.
|
// classes that are subclasses of java/lang/ref/Reference.
|
||||||
@ -83,13 +84,13 @@ class InstanceRefKlass: public InstanceKlass {
|
|||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceRefKlass_OOP_OOP_ITERATE_DECL)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceRefKlass_OOP_OOP_ITERATE_DECL)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceRefKlass_OOP_OOP_ITERATE_DECL)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceRefKlass_OOP_OOP_ITERATE_DECL)
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#define InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
|
#define InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
|
||||||
int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);
|
int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);
|
||||||
|
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
static void release_and_notify_pending_list_lock(BasicLock *pending_list_basic_lock);
|
static void release_and_notify_pending_list_lock(BasicLock *pending_list_basic_lock);
|
||||||
static void acquire_pending_list_lock(BasicLock *pending_list_basic_lock);
|
static void acquire_pending_list_lock(BasicLock *pending_list_basic_lock);
|
||||||
|
@ -37,11 +37,12 @@
|
|||||||
#include "oops/oop.inline2.hpp"
|
#include "oops/oop.inline2.hpp"
|
||||||
#include "runtime/atomic.hpp"
|
#include "runtime/atomic.hpp"
|
||||||
#include "utilities/stack.hpp"
|
#include "utilities/stack.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
|
#include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/psPromotionManager.hpp"
|
#include "gc_implementation/parallelScavenge/psPromotionManager.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/psScavenge.hpp"
|
#include "gc_implementation/parallelScavenge/psScavenge.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
void Klass::set_name(Symbol* n) {
|
void Klass::set_name(Symbol* n) {
|
||||||
_name = n;
|
_name = n;
|
||||||
|
@ -35,11 +35,12 @@
|
|||||||
#include "runtime/orderAccess.hpp"
|
#include "runtime/orderAccess.hpp"
|
||||||
#include "trace/traceMacros.hpp"
|
#include "trace/traceMacros.hpp"
|
||||||
#include "utilities/accessFlags.hpp"
|
#include "utilities/accessFlags.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp"
|
#include "gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp"
|
||||||
#include "gc_implementation/g1/g1OopClosures.hpp"
|
#include "gc_implementation/g1/g1OopClosures.hpp"
|
||||||
#include "gc_implementation/parNew/parOopClosures.hpp"
|
#include "gc_implementation/parNew/parOopClosures.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
//
|
//
|
||||||
// A Klass provides:
|
// A Klass provides:
|
||||||
@ -625,13 +626,13 @@ class Klass : public Metadata {
|
|||||||
return oop_oop_iterate(obj, blk);
|
return oop_oop_iterate(obj, blk);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// In case we don't have a specialized backward scanner use forward
|
// In case we don't have a specialized backward scanner use forward
|
||||||
// iteration.
|
// iteration.
|
||||||
virtual int oop_oop_iterate_backwards_v(oop obj, ExtendedOopClosure* blk) {
|
virtual int oop_oop_iterate_backwards_v(oop obj, ExtendedOopClosure* blk) {
|
||||||
return oop_oop_iterate_v(obj, blk);
|
return oop_oop_iterate_v(obj, blk);
|
||||||
}
|
}
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// Iterates "blk" over all the oops in "obj" (of type "this") within "mr".
|
// Iterates "blk" over all the oops in "obj" (of type "this") within "mr".
|
||||||
// (I don't see why the _m should be required, but without it the Solaris
|
// (I don't see why the _m should be required, but without it the Solaris
|
||||||
@ -663,7 +664,7 @@ class Klass : public Metadata {
|
|||||||
SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_1(Klass_OOP_OOP_ITERATE_DECL)
|
SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_1(Klass_OOP_OOP_ITERATE_DECL)
|
||||||
SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(Klass_OOP_OOP_ITERATE_DECL)
|
SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(Klass_OOP_OOP_ITERATE_DECL)
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#define Klass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
|
#define Klass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
|
||||||
virtual int oop_oop_iterate_backwards##nv_suffix(oop obj, \
|
virtual int oop_oop_iterate_backwards##nv_suffix(oop obj, \
|
||||||
OopClosureType* blk) { \
|
OopClosureType* blk) { \
|
||||||
@ -673,7 +674,7 @@ class Klass : public Metadata {
|
|||||||
|
|
||||||
SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_1(Klass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_1(Klass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
||||||
SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(Klass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(Klass_OOP_OOP_ITERATE_BACKWARDS_DECL)
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
virtual void array_klasses_do(void f(Klass* k)) {}
|
virtual void array_klasses_do(void f(Klass* k)) {}
|
||||||
virtual void with_array_klasses_do(void f(Klass* k));
|
virtual void with_array_klasses_do(void f(Klass* k));
|
||||||
|
@ -27,7 +27,9 @@
|
|||||||
|
|
||||||
// Expands to Parallel Scavenge and Parallel Old declarations
|
// Expands to Parallel Scavenge and Parallel Old declarations
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#define PARALLEL_GC_DECLS \
|
#define PARALLEL_GC_DECLS \
|
||||||
virtual void oop_push_contents(PSPromotionManager* pm, oop obj); \
|
virtual void oop_push_contents(PSPromotionManager* pm, oop obj); \
|
||||||
/* Parallel Old GC support \
|
/* Parallel Old GC support \
|
||||||
@ -44,9 +46,9 @@
|
|||||||
virtual void oop_push_contents(PSPromotionManager* pm, oop obj) = 0; \
|
virtual void oop_push_contents(PSPromotionManager* pm, oop obj) = 0; \
|
||||||
virtual void oop_follow_contents(ParCompactionManager* cm, oop obj) = 0; \
|
virtual void oop_follow_contents(ParCompactionManager* cm, oop obj) = 0; \
|
||||||
virtual int oop_update_pointers(ParCompactionManager* cm, oop obj) = 0;
|
virtual int oop_update_pointers(ParCompactionManager* cm, oop obj) = 0;
|
||||||
#else // SERIALGC
|
#else // INCLUDE_ALL_GCS
|
||||||
#define PARALLEL_GC_DECLS
|
#define PARALLEL_GC_DECLS
|
||||||
#define PARALLEL_GC_DECLS_PV
|
#define PARALLEL_GC_DECLS_PV
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#endif // SHARE_VM_OOPS_KLASSPS_HPP
|
#endif // SHARE_VM_OOPS_KLASSPS_HPP
|
||||||
|
@ -43,7 +43,8 @@
|
|||||||
#include "runtime/handles.inline.hpp"
|
#include "runtime/handles.inline.hpp"
|
||||||
#include "runtime/mutexLocker.hpp"
|
#include "runtime/mutexLocker.hpp"
|
||||||
#include "utilities/copy.hpp"
|
#include "utilities/copy.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/concurrentMarkSweep/cmsOopClosures.inline.hpp"
|
#include "gc_implementation/concurrentMarkSweep/cmsOopClosures.inline.hpp"
|
||||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||||
#include "gc_implementation/g1/g1OopClosures.inline.hpp"
|
#include "gc_implementation/g1/g1OopClosures.inline.hpp"
|
||||||
@ -54,7 +55,7 @@
|
|||||||
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
|
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
||||||
#include "oops/oop.pcgc.inline.hpp"
|
#include "oops/oop.pcgc.inline.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
ObjArrayKlass* ObjArrayKlass::allocate(ClassLoaderData* loader_data, int n, KlassHandle klass_handle, Symbol* name, TRAPS) {
|
ObjArrayKlass* ObjArrayKlass::allocate(ClassLoaderData* loader_data, int n, KlassHandle klass_handle, Symbol* name, TRAPS) {
|
||||||
assert(ObjArrayKlass::header_size() <= InstanceKlass::header_size(),
|
assert(ObjArrayKlass::header_size() <= InstanceKlass::header_size(),
|
||||||
@ -461,7 +462,7 @@ void ObjArrayKlass::oop_follow_contents(oop obj) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
void ObjArrayKlass::oop_follow_contents(ParCompactionManager* cm,
|
void ObjArrayKlass::oop_follow_contents(ParCompactionManager* cm,
|
||||||
oop obj) {
|
oop obj) {
|
||||||
assert(obj->is_array(), "obj must be array");
|
assert(obj->is_array(), "obj must be array");
|
||||||
@ -472,7 +473,7 @@ void ObjArrayKlass::oop_follow_contents(ParCompactionManager* cm,
|
|||||||
objarray_follow_contents<oop>(cm, obj, 0);
|
objarray_follow_contents<oop>(cm, obj, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#define if_do_metadata_checked(closure, nv_suffix) \
|
#define if_do_metadata_checked(closure, nv_suffix) \
|
||||||
/* Make sure the non-virtual and the virtual versions match. */ \
|
/* Make sure the non-virtual and the virtual versions match. */ \
|
||||||
@ -573,7 +574,7 @@ int ObjArrayKlass::oop_adjust_pointers(oop obj) {
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
void ObjArrayKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
|
void ObjArrayKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
|
||||||
assert(obj->is_objArray(), "obj must be obj array");
|
assert(obj->is_objArray(), "obj must be obj array");
|
||||||
ObjArrayKlass_OOP_ITERATE( \
|
ObjArrayKlass_OOP_ITERATE( \
|
||||||
@ -591,7 +592,7 @@ int ObjArrayKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
|
|||||||
ObjArrayKlass_OOP_ITERATE(a, p, PSParallelCompact::adjust_pointer(p))
|
ObjArrayKlass_OOP_ITERATE(a, p, PSParallelCompact::adjust_pointer(p))
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// JVM support
|
// JVM support
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "classfile/classLoaderData.hpp"
|
#include "classfile/classLoaderData.hpp"
|
||||||
#include "memory/specialized_oop_closures.hpp"
|
#include "memory/specialized_oop_closures.hpp"
|
||||||
#include "oops/arrayKlass.hpp"
|
#include "oops/arrayKlass.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
// ObjArrayKlass is the klass for objArrays
|
// ObjArrayKlass is the klass for objArrays
|
||||||
|
|
||||||
@ -111,11 +112,11 @@ class ObjArrayKlass : public ArrayKlass {
|
|||||||
|
|
||||||
// Parallel Scavenge and Parallel Old
|
// Parallel Scavenge and Parallel Old
|
||||||
PARALLEL_GC_DECLS
|
PARALLEL_GC_DECLS
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
inline void oop_follow_contents(ParCompactionManager* cm, oop obj, int index);
|
inline void oop_follow_contents(ParCompactionManager* cm, oop obj, int index);
|
||||||
template <class T> inline void
|
template <class T> inline void
|
||||||
objarray_follow_contents(ParCompactionManager* cm, oop obj, int index);
|
objarray_follow_contents(ParCompactionManager* cm, oop obj, int index);
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// Iterators
|
// Iterators
|
||||||
int oop_oop_iterate(oop obj, ExtendedOopClosure* blk) {
|
int oop_oop_iterate(oop obj, ExtendedOopClosure* blk) {
|
||||||
|
@ -27,10 +27,11 @@
|
|||||||
|
|
||||||
#include "gc_implementation/shared/markSweep.inline.hpp"
|
#include "gc_implementation/shared/markSweep.inline.hpp"
|
||||||
#include "oops/objArrayKlass.hpp"
|
#include "oops/objArrayKlass.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/parallelScavenge/psCompactionManager.inline.hpp"
|
#include "gc_implementation/parallelScavenge/psCompactionManager.inline.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
|
#include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
void ObjArrayKlass::oop_follow_contents(oop obj, int index) {
|
void ObjArrayKlass::oop_follow_contents(oop obj, int index) {
|
||||||
if (UseCompressedOops) {
|
if (UseCompressedOops) {
|
||||||
@ -63,7 +64,7 @@ void ObjArrayKlass::objarray_follow_contents(oop obj, int index) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
void ObjArrayKlass::oop_follow_contents(ParCompactionManager* cm, oop obj,
|
void ObjArrayKlass::oop_follow_contents(ParCompactionManager* cm, oop obj,
|
||||||
int index) {
|
int index) {
|
||||||
if (UseCompressedOops) {
|
if (UseCompressedOops) {
|
||||||
@ -96,6 +97,6 @@ void ObjArrayKlass::objarray_follow_contents(ParCompactionManager* cm, oop obj,
|
|||||||
cm->push_objarray(a, end_index); // Push the continuation.
|
cm->push_objarray(a, end_index); // Push the continuation.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // #ifndef SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#endif // SHARE_VM_OOPS_OBJARRAYKLASS_INLINE_HPP
|
#endif // SHARE_VM_OOPS_OBJARRAYKLASS_INLINE_HPP
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include "memory/memRegion.hpp"
|
#include "memory/memRegion.hpp"
|
||||||
#include "memory/specialized_oop_closures.hpp"
|
#include "memory/specialized_oop_closures.hpp"
|
||||||
#include "oops/metadata.hpp"
|
#include "oops/metadata.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#include "utilities/top.hpp"
|
#include "utilities/top.hpp"
|
||||||
|
|
||||||
// oopDesc is the top baseclass for objects classes. The {name}Desc classes describe
|
// oopDesc is the top baseclass for objects classes. The {name}Desc classes describe
|
||||||
@ -298,7 +299,7 @@ class oopDesc {
|
|||||||
// reference field in "this".
|
// reference field in "this".
|
||||||
void follow_contents(void);
|
void follow_contents(void);
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// Parallel Scavenge
|
// Parallel Scavenge
|
||||||
void push_contents(PSPromotionManager* pm);
|
void push_contents(PSPromotionManager* pm);
|
||||||
|
|
||||||
@ -306,7 +307,7 @@ class oopDesc {
|
|||||||
void update_contents(ParCompactionManager* cm);
|
void update_contents(ParCompactionManager* cm);
|
||||||
|
|
||||||
void follow_contents(ParCompactionManager* cm);
|
void follow_contents(ParCompactionManager* cm);
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
bool is_scavengable() const;
|
bool is_scavengable() const;
|
||||||
|
|
||||||
@ -316,13 +317,13 @@ class oopDesc {
|
|||||||
void forward_to(oop p);
|
void forward_to(oop p);
|
||||||
bool cas_forward_to(oop p, markOop compare);
|
bool cas_forward_to(oop p, markOop compare);
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// Like "forward_to", but inserts the forwarding pointer atomically.
|
// Like "forward_to", but inserts the forwarding pointer atomically.
|
||||||
// Exactly one thread succeeds in inserting the forwarding pointer, and
|
// Exactly one thread succeeds in inserting the forwarding pointer, and
|
||||||
// this call returns "NULL" for that thread; any other thread has the
|
// this call returns "NULL" for that thread; any other thread has the
|
||||||
// value of the forwarding pointer returned and does not modify "this".
|
// value of the forwarding pointer returned and does not modify "this".
|
||||||
oop forward_to_atomic(oop p);
|
oop forward_to_atomic(oop p);
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
oop forwardee() const;
|
oop forwardee() const;
|
||||||
|
|
||||||
@ -334,10 +335,10 @@ class oopDesc {
|
|||||||
// return the size of this oop. This is used by the MarkSweep collector.
|
// return the size of this oop. This is used by the MarkSweep collector.
|
||||||
int adjust_pointers();
|
int adjust_pointers();
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// Parallel old
|
// Parallel old
|
||||||
void update_header(ParCompactionManager* cm);
|
void update_header(ParCompactionManager* cm);
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// mark-sweep support
|
// mark-sweep support
|
||||||
void follow_body(int begin, int end);
|
void follow_body(int begin, int end);
|
||||||
@ -354,7 +355,7 @@ class oopDesc {
|
|||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_ITERATE_DECL)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_ITERATE_DECL)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_ITERATE_DECL)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_ITERATE_DECL)
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#define OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
|
#define OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
|
||||||
int oop_iterate_backwards(OopClosureType* blk);
|
int oop_iterate_backwards(OopClosureType* blk);
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include "oops/oop.hpp"
|
#include "oops/oop.hpp"
|
||||||
#include "runtime/atomic.hpp"
|
#include "runtime/atomic.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#ifdef TARGET_ARCH_x86
|
#ifdef TARGET_ARCH_x86
|
||||||
# include "bytes_x86.hpp"
|
# include "bytes_x86.hpp"
|
||||||
#endif
|
#endif
|
||||||
@ -760,7 +761,7 @@ inline int oopDesc::oop_iterate_no_header(OopClosure* blk, MemRegion mr) {
|
|||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_ITERATE_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_ITERATE_DEFN)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_ITERATE_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_ITERATE_DEFN)
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#define OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \
|
#define OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \
|
||||||
\
|
\
|
||||||
inline int oopDesc::oop_iterate_backwards(OopClosureType* blk) { \
|
inline int oopDesc::oop_iterate_backwards(OopClosureType* blk) { \
|
||||||
@ -770,6 +771,6 @@ inline int oopDesc::oop_iterate_backwards(OopClosureType* blk) { \
|
|||||||
|
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_ITERATE_BACKWARDS_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_ITERATE_BACKWARDS_DEFN)
|
||||||
ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_ITERATE_BACKWARDS_DEFN)
|
ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_ITERATE_BACKWARDS_DEFN)
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#endif // SHARE_VM_OOPS_OOP_INLINE_HPP
|
#endif // SHARE_VM_OOPS_OOP_INLINE_HPP
|
||||||
|
@ -25,14 +25,15 @@
|
|||||||
#ifndef SHARE_VM_OOPS_OOP_PCGC_INLINE_HPP
|
#ifndef SHARE_VM_OOPS_OOP_PCGC_INLINE_HPP
|
||||||
#define SHARE_VM_OOPS_OOP_PCGC_INLINE_HPP
|
#define SHARE_VM_OOPS_OOP_PCGC_INLINE_HPP
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/parNew/parNewGeneration.hpp"
|
#include "gc_implementation/parNew/parNewGeneration.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
|
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/psCompactionManager.hpp"
|
#include "gc_implementation/parallelScavenge/psCompactionManager.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
|
#include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/psScavenge.hpp"
|
#include "gc_implementation/parallelScavenge/psScavenge.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
inline void oopDesc::update_contents(ParCompactionManager* cm) {
|
inline void oopDesc::update_contents(ParCompactionManager* cm) {
|
||||||
// The klass field must be updated before anything else
|
// The klass field must be updated before anything else
|
||||||
|
@ -25,11 +25,12 @@
|
|||||||
#ifndef SHARE_VM_OOPS_OOP_PSGC_INLINE_HPP
|
#ifndef SHARE_VM_OOPS_OOP_PSGC_INLINE_HPP
|
||||||
#define SHARE_VM_OOPS_OOP_PSGC_INLINE_HPP
|
#define SHARE_VM_OOPS_OOP_PSGC_INLINE_HPP
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
|
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/psScavenge.hpp"
|
#include "gc_implementation/parallelScavenge/psScavenge.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// ParallelScavengeHeap methods
|
// ParallelScavengeHeap methods
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include "oops/typeArrayKlass.hpp"
|
#include "oops/typeArrayKlass.hpp"
|
||||||
#include "oops/typeArrayOop.hpp"
|
#include "oops/typeArrayOop.hpp"
|
||||||
#include "runtime/handles.inline.hpp"
|
#include "runtime/handles.inline.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
bool TypeArrayKlass::compute_is_subtype_of(Klass* k) {
|
bool TypeArrayKlass::compute_is_subtype_of(Klass* k) {
|
||||||
if (!k->oop_is_typeArray()) {
|
if (!k->oop_is_typeArray()) {
|
||||||
@ -208,13 +209,13 @@ void TypeArrayKlass::oop_follow_contents(oop obj) {
|
|||||||
// know that Universe::TypeArrayKlass never moves.
|
// know that Universe::TypeArrayKlass never moves.
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
void TypeArrayKlass::oop_follow_contents(ParCompactionManager* cm, oop obj) {
|
void TypeArrayKlass::oop_follow_contents(ParCompactionManager* cm, oop obj) {
|
||||||
assert(obj->is_typeArray(),"must be a type array");
|
assert(obj->is_typeArray(),"must be a type array");
|
||||||
// Performance tweak: We skip iterating over the klass pointer since we
|
// Performance tweak: We skip iterating over the klass pointer since we
|
||||||
// know that Universe::TypeArrayKlass never moves.
|
// know that Universe::TypeArrayKlass never moves.
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
int TypeArrayKlass::oop_adjust_pointers(oop obj) {
|
int TypeArrayKlass::oop_adjust_pointers(oop obj) {
|
||||||
assert(obj->is_typeArray(),"must be a type array");
|
assert(obj->is_typeArray(),"must be a type array");
|
||||||
@ -240,7 +241,7 @@ int TypeArrayKlass::oop_oop_iterate_m(oop obj, ExtendedOopClosure* blk, MemRegio
|
|||||||
return t->object_size();
|
return t->object_size();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
void TypeArrayKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
|
void TypeArrayKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
|
||||||
ShouldNotReachHere();
|
ShouldNotReachHere();
|
||||||
assert(obj->is_typeArray(),"must be a type array");
|
assert(obj->is_typeArray(),"must be a type array");
|
||||||
@ -251,7 +252,7 @@ TypeArrayKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
|
|||||||
assert(obj->is_typeArray(),"must be a type array");
|
assert(obj->is_typeArray(),"must be a type array");
|
||||||
return typeArrayOop(obj)->object_size();
|
return typeArrayOop(obj)->object_size();
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
void TypeArrayKlass::initialize(TRAPS) {
|
void TypeArrayKlass::initialize(TRAPS) {
|
||||||
// Nothing to do. Having this function is handy since objArrayKlasses can be
|
// Nothing to do. Having this function is handy since objArrayKlasses can be
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
// Precompiled headers are turned off for Sun Studion,
|
// Precompiled headers are turned off for Sun Studion,
|
||||||
// or if the user passes USE_PRECOMPILED_HEADER=0 to the makefiles.
|
// or if the user passes USE_PRECOMPILED_HEADER=0 to the makefiles.
|
||||||
|
|
||||||
#ifndef DONT_USE_PRECOMPILED_HEADER
|
#ifndef DONT_USE_PRECOMPILED_HEADER
|
||||||
|
|
||||||
# include "asm/assembler.hpp"
|
# include "asm/assembler.hpp"
|
||||||
@ -285,7 +286,7 @@
|
|||||||
# include "c1/c1_ValueType.hpp"
|
# include "c1/c1_ValueType.hpp"
|
||||||
# include "c1/c1_globals.hpp"
|
# include "c1/c1_globals.hpp"
|
||||||
#endif // COMPILER1
|
#endif // COMPILER1
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
# include "gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp"
|
# include "gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp"
|
||||||
# include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp"
|
# include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp"
|
||||||
# include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp"
|
# include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp"
|
||||||
@ -314,6 +315,6 @@
|
|||||||
# include "gc_implementation/shared/gcAdaptivePolicyCounters.hpp"
|
# include "gc_implementation/shared/gcAdaptivePolicyCounters.hpp"
|
||||||
# include "gc_implementation/shared/gcPolicyCounters.hpp"
|
# include "gc_implementation/shared/gcPolicyCounters.hpp"
|
||||||
# include "gc_implementation/shared/parGCAllocBuffer.hpp"
|
# include "gc_implementation/shared/parGCAllocBuffer.hpp"
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#endif // !DONT_USE_PRECOMPILED_HEADER
|
#endif // !DONT_USE_PRECOMPILED_HEADER
|
||||||
|
@ -32,9 +32,10 @@
|
|||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
#include "classfile/vmSymbols.hpp"
|
#include "classfile/vmSymbols.hpp"
|
||||||
#include "interpreter/linkResolver.hpp"
|
#include "interpreter/linkResolver.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
#include "memory/allocation.hpp"
|
#include "memory/allocation.hpp"
|
||||||
#include "memory/allocation.inline.hpp"
|
#include "memory/allocation.inline.hpp"
|
||||||
#include "memory/gcLocker.inline.hpp"
|
#include "memory/gcLocker.inline.hpp"
|
||||||
@ -2641,7 +2642,7 @@ JNI_ENTRY(jobject, jni_GetObjectField(JNIEnv *env, jobject obj, jfieldID fieldID
|
|||||||
o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false);
|
o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false);
|
||||||
}
|
}
|
||||||
jobject ret = JNIHandles::make_local(env, o->obj_field(offset));
|
jobject ret = JNIHandles::make_local(env, o->obj_field(offset));
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// If G1 is enabled and we are accessing the value of the referent
|
// If G1 is enabled and we are accessing the value of the referent
|
||||||
// field in a reference object then we need to register a non-null
|
// field in a reference object then we need to register a non-null
|
||||||
// referent with the SATB barrier.
|
// referent with the SATB barrier.
|
||||||
@ -2660,7 +2661,7 @@ JNI_ENTRY(jobject, jni_GetObjectField(JNIEnv *env, jobject obj, jfieldID fieldID
|
|||||||
G1SATBCardTableModRefBS::enqueue(referent);
|
G1SATBCardTableModRefBS::enqueue(referent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
#ifndef USDT2
|
#ifndef USDT2
|
||||||
DTRACE_PROBE1(hotspot_jni, GetObjectField__return, ret);
|
DTRACE_PROBE1(hotspot_jni, GetObjectField__return, ret);
|
||||||
#else /* USDT2 */
|
#else /* USDT2 */
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "runtime/thread.hpp"
|
#include "runtime/thread.hpp"
|
||||||
#include "runtime/vm_operations.hpp"
|
#include "runtime/vm_operations.hpp"
|
||||||
#include "utilities/growableArray.hpp"
|
#include "utilities/growableArray.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
//
|
//
|
||||||
// Forward Declarations
|
// Forward Declarations
|
||||||
|
@ -50,9 +50,10 @@
|
|||||||
#include "runtime/vframe.hpp"
|
#include "runtime/vframe.hpp"
|
||||||
#include "services/attachListener.hpp"
|
#include "services/attachListener.hpp"
|
||||||
#include "services/serviceUtil.hpp"
|
#include "services/serviceUtil.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/parallelScavenge/psMarkSweep.hpp"
|
#include "gc_implementation/parallelScavenge/psMarkSweep.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#ifdef JVMTI_TRACE
|
#ifdef JVMTI_TRACE
|
||||||
#define EVT_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_SENT) != 0) { SafeResourceMark rm; tty->print_cr out; }
|
#define EVT_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_SENT) != 0) { SafeResourceMark rm; tty->print_cr out; }
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "runtime/handles.hpp"
|
#include "runtime/handles.hpp"
|
||||||
#include "utilities/globalDefinitions.hpp"
|
#include "utilities/globalDefinitions.hpp"
|
||||||
#include "utilities/growableArray.hpp"
|
#include "utilities/growableArray.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
// Must be included after jvmti.h.
|
// Must be included after jvmti.h.
|
||||||
#include "code/jvmticmlr.h"
|
#include "code/jvmticmlr.h"
|
||||||
|
@ -45,9 +45,10 @@
|
|||||||
#include "runtime/vmThread.hpp"
|
#include "runtime/vmThread.hpp"
|
||||||
#include "runtime/vm_operations.hpp"
|
#include "runtime/vm_operations.hpp"
|
||||||
#include "services/serviceUtil.hpp"
|
#include "services/serviceUtil.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
|
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// JvmtiTagHashmapEntry
|
// JvmtiTagHashmapEntry
|
||||||
//
|
//
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include "runtime/javaCalls.hpp"
|
#include "runtime/javaCalls.hpp"
|
||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "runtime/signature.hpp"
|
#include "runtime/signature.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#ifdef TARGET_OS_FAMILY_linux
|
#ifdef TARGET_OS_FAMILY_linux
|
||||||
# include "os_linux.inline.hpp"
|
# include "os_linux.inline.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
@ -24,9 +24,10 @@
|
|||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "classfile/vmSymbols.hpp"
|
#include "classfile/vmSymbols.hpp"
|
||||||
#ifndef SERIALGC
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
#include "memory/allocation.inline.hpp"
|
#include "memory/allocation.inline.hpp"
|
||||||
#include "prims/jni.h"
|
#include "prims/jni.h"
|
||||||
#include "prims/jvm.h"
|
#include "prims/jvm.h"
|
||||||
@ -189,7 +190,7 @@ UNSAFE_ENTRY(jobject, Unsafe_GetObject140(JNIEnv *env, jobject unsafe, jobject o
|
|||||||
if (obj == NULL) THROW_0(vmSymbols::java_lang_NullPointerException());
|
if (obj == NULL) THROW_0(vmSymbols::java_lang_NullPointerException());
|
||||||
GET_OOP_FIELD(obj, offset, v)
|
GET_OOP_FIELD(obj, offset, v)
|
||||||
jobject ret = JNIHandles::make_local(env, v);
|
jobject ret = JNIHandles::make_local(env, v);
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// We could be accessing the referent field in a reference
|
// We could be accessing the referent field in a reference
|
||||||
// object. If G1 is enabled then we need to register a non-null
|
// object. If G1 is enabled then we need to register a non-null
|
||||||
// referent with the SATB barrier.
|
// referent with the SATB barrier.
|
||||||
@ -212,7 +213,7 @@ UNSAFE_ENTRY(jobject, Unsafe_GetObject140(JNIEnv *env, jobject unsafe, jobject o
|
|||||||
G1SATBCardTableModRefBS::enqueue(referent);
|
G1SATBCardTableModRefBS::enqueue(referent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
return ret;
|
return ret;
|
||||||
UNSAFE_END
|
UNSAFE_END
|
||||||
|
|
||||||
@ -247,7 +248,7 @@ UNSAFE_ENTRY(jobject, Unsafe_GetObject(JNIEnv *env, jobject unsafe, jobject obj,
|
|||||||
UnsafeWrapper("Unsafe_GetObject");
|
UnsafeWrapper("Unsafe_GetObject");
|
||||||
GET_OOP_FIELD(obj, offset, v)
|
GET_OOP_FIELD(obj, offset, v)
|
||||||
jobject ret = JNIHandles::make_local(env, v);
|
jobject ret = JNIHandles::make_local(env, v);
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// We could be accessing the referent field in a reference
|
// We could be accessing the referent field in a reference
|
||||||
// object. If G1 is enabled then we need to register non-null
|
// object. If G1 is enabled then we need to register non-null
|
||||||
// referent with the SATB barrier.
|
// referent with the SATB barrier.
|
||||||
@ -270,7 +271,7 @@ UNSAFE_ENTRY(jobject, Unsafe_GetObject(JNIEnv *env, jobject unsafe, jobject obj,
|
|||||||
G1SATBCardTableModRefBS::enqueue(referent);
|
G1SATBCardTableModRefBS::enqueue(referent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
return ret;
|
return ret;
|
||||||
UNSAFE_END
|
UNSAFE_END
|
||||||
|
|
||||||
|
@ -36,12 +36,13 @@
|
|||||||
#include "runtime/interfaceSupport.hpp"
|
#include "runtime/interfaceSupport.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "utilities/debug.hpp"
|
#include "utilities/debug.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/g1/concurrentMark.hpp"
|
#include "gc_implementation/g1/concurrentMark.hpp"
|
||||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||||
#include "gc_implementation/g1/heapRegionRemSet.hpp"
|
#include "gc_implementation/g1/heapRegionRemSet.hpp"
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
bool WhiteBox::_used = false;
|
bool WhiteBox::_used = false;
|
||||||
|
|
||||||
@ -85,7 +86,7 @@ WB_ENTRY(jboolean, WB_IsClassAlive(JNIEnv* env, jobject target, jstring name))
|
|||||||
return closure.found();
|
return closure.found();
|
||||||
WB_END
|
WB_END
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
WB_ENTRY(jboolean, WB_G1IsHumongous(JNIEnv* env, jobject o, jobject obj))
|
WB_ENTRY(jboolean, WB_G1IsHumongous(JNIEnv* env, jobject o, jobject obj))
|
||||||
G1CollectedHeap* g1 = G1CollectedHeap::heap();
|
G1CollectedHeap* g1 = G1CollectedHeap::heap();
|
||||||
oop result = JNIHandles::resolve(obj);
|
oop result = JNIHandles::resolve(obj);
|
||||||
@ -108,7 +109,7 @@ WB_END
|
|||||||
WB_ENTRY(jint, WB_G1RegionSize(JNIEnv* env, jobject o))
|
WB_ENTRY(jint, WB_G1RegionSize(JNIEnv* env, jobject o))
|
||||||
return (jint)HeapRegion::GrainBytes;
|
return (jint)HeapRegion::GrainBytes;
|
||||||
WB_END
|
WB_END
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
//Some convenience methods to deal with objects from java
|
//Some convenience methods to deal with objects from java
|
||||||
int WhiteBox::offset_for_field(const char* field_name, oop object,
|
int WhiteBox::offset_for_field(const char* field_name, oop object,
|
||||||
@ -171,12 +172,12 @@ static JNINativeMethod methods[] = {
|
|||||||
CC "(Ljava/lang/String;[Lsun/hotspot/parser/DiagnosticCommand;)[Ljava/lang/Object;",
|
CC "(Ljava/lang/String;[Lsun/hotspot/parser/DiagnosticCommand;)[Ljava/lang/Object;",
|
||||||
(void*) &WB_ParseCommandLine
|
(void*) &WB_ParseCommandLine
|
||||||
},
|
},
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
{CC"g1InConcurrentMark", CC"()Z", (void*)&WB_G1InConcurrentMark},
|
{CC"g1InConcurrentMark", CC"()Z", (void*)&WB_G1InConcurrentMark},
|
||||||
{CC"g1IsHumongous", CC"(Ljava/lang/Object;)Z", (void*)&WB_G1IsHumongous },
|
{CC"g1IsHumongous", CC"(Ljava/lang/Object;)Z", (void*)&WB_G1IsHumongous },
|
||||||
{CC"g1NumFreeRegions", CC"()J", (void*)&WB_G1NumFreeRegions },
|
{CC"g1NumFreeRegions", CC"()J", (void*)&WB_G1NumFreeRegions },
|
||||||
{CC"g1RegionSize", CC"()I", (void*)&WB_G1RegionSize },
|
{CC"g1RegionSize", CC"()I", (void*)&WB_G1RegionSize },
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef CC
|
#undef CC
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "services/management.hpp"
|
#include "services/management.hpp"
|
||||||
#include "services/memTracker.hpp"
|
#include "services/memTracker.hpp"
|
||||||
#include "utilities/defaultStream.hpp"
|
#include "utilities/defaultStream.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#include "utilities/taskqueue.hpp"
|
#include "utilities/taskqueue.hpp"
|
||||||
#ifdef TARGET_OS_FAMILY_linux
|
#ifdef TARGET_OS_FAMILY_linux
|
||||||
# include "os_linux.inline.hpp"
|
# include "os_linux.inline.hpp"
|
||||||
@ -51,9 +52,9 @@
|
|||||||
#ifdef TARGET_OS_FAMILY_bsd
|
#ifdef TARGET_OS_FAMILY_bsd
|
||||||
# include "os_bsd.inline.hpp"
|
# include "os_bsd.inline.hpp"
|
||||||
#endif
|
#endif
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp"
|
#include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// Note: This is a special bug reporting site for the JVM
|
// Note: This is a special bug reporting site for the JVM
|
||||||
#define DEFAULT_VENDOR_URL_BUG "http://bugreport.sun.com/bugreport/crash.jsp"
|
#define DEFAULT_VENDOR_URL_BUG "http://bugreport.sun.com/bugreport/crash.jsp"
|
||||||
@ -1072,7 +1073,7 @@ void Arguments::set_tiered_flags() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if INCLUDE_ALTERNATE_GCS
|
#if INCLUDE_ALL_GCS
|
||||||
static void disable_adaptive_size_policy(const char* collector_name) {
|
static void disable_adaptive_size_policy(const char* collector_name) {
|
||||||
if (UseAdaptiveSizePolicy) {
|
if (UseAdaptiveSizePolicy) {
|
||||||
if (FLAG_IS_CMDLINE(UseAdaptiveSizePolicy)) {
|
if (FLAG_IS_CMDLINE(UseAdaptiveSizePolicy)) {
|
||||||
@ -1284,7 +1285,7 @@ void Arguments::set_cms_and_parnew_gc_flags() {
|
|||||||
tty->print_cr("ConcGCThreads: %u", ConcGCThreads);
|
tty->print_cr("ConcGCThreads: %u", ConcGCThreads);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // INCLUDE_ALTERNATE_GCS
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
void set_object_alignment() {
|
void set_object_alignment() {
|
||||||
// Object alignment.
|
// Object alignment.
|
||||||
@ -1301,10 +1302,10 @@ void set_object_alignment() {
|
|||||||
// Oop encoding heap max
|
// Oop encoding heap max
|
||||||
OopEncodingHeapMax = (uint64_t(max_juint) + 1) << LogMinObjAlignmentInBytes;
|
OopEncodingHeapMax = (uint64_t(max_juint) + 1) << LogMinObjAlignmentInBytes;
|
||||||
|
|
||||||
#if INCLUDE_ALTERNATE_GCS
|
#if INCLUDE_ALL_GCS
|
||||||
// Set CMS global values
|
// Set CMS global values
|
||||||
CompactibleFreeListSpace::set_cms_values();
|
CompactibleFreeListSpace::set_cms_values();
|
||||||
#endif // INCLUDE_ALTERNATE_GCS
|
#endif // INCLUDE_ALL_GCS
|
||||||
}
|
}
|
||||||
|
|
||||||
bool verify_object_alignment() {
|
bool verify_object_alignment() {
|
||||||
@ -1976,7 +1977,7 @@ bool Arguments::check_vm_args_consistency() {
|
|||||||
|
|
||||||
status = status && verify_min_value(ParGCArrayScanChunk, 1, "ParGCArrayScanChunk");
|
status = status && verify_min_value(ParGCArrayScanChunk, 1, "ParGCArrayScanChunk");
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
if (UseG1GC) {
|
if (UseG1GC) {
|
||||||
status = status && verify_percentage(InitiatingHeapOccupancyPercent,
|
status = status && verify_percentage(InitiatingHeapOccupancyPercent,
|
||||||
"InitiatingHeapOccupancyPercent");
|
"InitiatingHeapOccupancyPercent");
|
||||||
@ -1985,7 +1986,7 @@ bool Arguments::check_vm_args_consistency() {
|
|||||||
status = status && verify_min_value((intx)G1ConcMarkStepDurationMillis, 1,
|
status = status && verify_min_value((intx)G1ConcMarkStepDurationMillis, 1,
|
||||||
"G1ConcMarkStepDurationMillis");
|
"G1ConcMarkStepDurationMillis");
|
||||||
}
|
}
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
status = status && verify_interval(RefDiscoveryPolicy,
|
status = status && verify_interval(RefDiscoveryPolicy,
|
||||||
ReferenceProcessor::DiscoveryPolicyMin,
|
ReferenceProcessor::DiscoveryPolicyMin,
|
||||||
@ -3157,7 +3158,7 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
|
|||||||
UNSUPPORTED_OPTION(UseLargePages, "-XX:+UseLargePages");
|
UNSUPPORTED_OPTION(UseLargePages, "-XX:+UseLargePages");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !INCLUDE_ALTERNATE_GCS
|
#if !INCLUDE_ALL_GCS
|
||||||
if (UseParallelGC) {
|
if (UseParallelGC) {
|
||||||
warning("Parallel GC is not supported in this VM. Using Serial GC.");
|
warning("Parallel GC is not supported in this VM. Using Serial GC.");
|
||||||
}
|
}
|
||||||
@ -3170,7 +3171,7 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
|
|||||||
if (UseParNewGC) {
|
if (UseParNewGC) {
|
||||||
warning("Par New GC is not supported in this VM. Using Serial GC.");
|
warning("Par New GC is not supported in this VM. Using Serial GC.");
|
||||||
}
|
}
|
||||||
#endif // INCLUDE_ALTERNATE_GCS
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
if (TraceBytecodesAt != 0) {
|
if (TraceBytecodesAt != 0) {
|
||||||
@ -3217,9 +3218,9 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
|
|||||||
// Set object alignment values.
|
// Set object alignment values.
|
||||||
set_object_alignment();
|
set_object_alignment();
|
||||||
|
|
||||||
#ifdef SERIALGC
|
#if !INCLUDE_ALL_GCS
|
||||||
force_serial_gc();
|
force_serial_gc();
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
#if !INCLUDE_CDS
|
#if !INCLUDE_CDS
|
||||||
no_shared_spaces();
|
no_shared_spaces();
|
||||||
#endif // INCLUDE_CDS
|
#endif // INCLUDE_CDS
|
||||||
@ -3247,7 +3248,7 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
|
|||||||
// Set heap size based on available physical memory
|
// Set heap size based on available physical memory
|
||||||
set_heap_size();
|
set_heap_size();
|
||||||
|
|
||||||
#if INCLUDE_ALTERNATE_GCS
|
#if INCLUDE_ALL_GCS
|
||||||
// Set per-collector flags
|
// Set per-collector flags
|
||||||
if (UseParallelGC || UseParallelOldGC) {
|
if (UseParallelGC || UseParallelOldGC) {
|
||||||
set_parallel_gc_flags();
|
set_parallel_gc_flags();
|
||||||
@ -3259,11 +3260,9 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
|
|||||||
set_g1_gc_flags();
|
set_g1_gc_flags();
|
||||||
}
|
}
|
||||||
check_deprecated_gcs();
|
check_deprecated_gcs();
|
||||||
#endif // INCLUDE_ALTERNATE_GCS
|
#else // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
#ifdef SERIALGC
|
|
||||||
assert(verify_serial_gc_flags(), "SerialGC unset");
|
assert(verify_serial_gc_flags(), "SerialGC unset");
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// Set bytecode rewriting flags
|
// Set bytecode rewriting flags
|
||||||
set_bytecode_flags();
|
set_bytecode_flags();
|
||||||
@ -3357,7 +3356,7 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jint Arguments::adjust_after_os() {
|
jint Arguments::adjust_after_os() {
|
||||||
#if INCLUDE_ALTERNATE_GCS
|
#if INCLUDE_ALL_GCS
|
||||||
if (UseParallelGC || UseParallelOldGC) {
|
if (UseParallelGC || UseParallelOldGC) {
|
||||||
if (UseNUMA) {
|
if (UseNUMA) {
|
||||||
if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
|
if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
|
||||||
@ -3368,7 +3367,7 @@ jint Arguments::adjust_after_os() {
|
|||||||
UseNUMAInterleaving = true;
|
UseNUMAInterleaving = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
return JNI_OK;
|
return JNI_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#ifndef SHARE_VM_RUNTIME_FPROFILER_HPP
|
#ifndef SHARE_VM_RUNTIME_FPROFILER_HPP
|
||||||
#define SHARE_VM_RUNTIME_FPROFILER_HPP
|
#define SHARE_VM_RUNTIME_FPROFILER_HPP
|
||||||
|
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#include "runtime/timer.hpp"
|
#include "runtime/timer.hpp"
|
||||||
|
|
||||||
// a simple flat profiler for Java
|
// a simple flat profiler for Java
|
||||||
|
@ -29,10 +29,11 @@
|
|||||||
#include "runtime/globals.hpp"
|
#include "runtime/globals.hpp"
|
||||||
#include "runtime/globals_extension.hpp"
|
#include "runtime/globals_extension.hpp"
|
||||||
#include "utilities/ostream.hpp"
|
#include "utilities/ostream.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#include "utilities/top.hpp"
|
#include "utilities/top.hpp"
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/g1/g1_globals.hpp"
|
#include "gc_implementation/g1/g1_globals.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
#ifdef COMPILER1
|
#ifdef COMPILER1
|
||||||
#include "c1/c1_globals.hpp"
|
#include "c1/c1_globals.hpp"
|
||||||
#endif
|
#endif
|
||||||
@ -256,9 +257,9 @@ void Flag::print_as_flag(outputStream* st) {
|
|||||||
static Flag flagTable[] = {
|
static Flag flagTable[] = {
|
||||||
RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_STRUCT, RUNTIME_PD_DEVELOP_FLAG_STRUCT, RUNTIME_PRODUCT_FLAG_STRUCT, RUNTIME_PD_PRODUCT_FLAG_STRUCT, RUNTIME_DIAGNOSTIC_FLAG_STRUCT, RUNTIME_EXPERIMENTAL_FLAG_STRUCT, RUNTIME_NOTPRODUCT_FLAG_STRUCT, RUNTIME_MANAGEABLE_FLAG_STRUCT, RUNTIME_PRODUCT_RW_FLAG_STRUCT, RUNTIME_LP64_PRODUCT_FLAG_STRUCT)
|
RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_STRUCT, RUNTIME_PD_DEVELOP_FLAG_STRUCT, RUNTIME_PRODUCT_FLAG_STRUCT, RUNTIME_PD_PRODUCT_FLAG_STRUCT, RUNTIME_DIAGNOSTIC_FLAG_STRUCT, RUNTIME_EXPERIMENTAL_FLAG_STRUCT, RUNTIME_NOTPRODUCT_FLAG_STRUCT, RUNTIME_MANAGEABLE_FLAG_STRUCT, RUNTIME_PRODUCT_RW_FLAG_STRUCT, RUNTIME_LP64_PRODUCT_FLAG_STRUCT)
|
||||||
RUNTIME_OS_FLAGS(RUNTIME_DEVELOP_FLAG_STRUCT, RUNTIME_PD_DEVELOP_FLAG_STRUCT, RUNTIME_PRODUCT_FLAG_STRUCT, RUNTIME_PD_PRODUCT_FLAG_STRUCT, RUNTIME_DIAGNOSTIC_FLAG_STRUCT, RUNTIME_NOTPRODUCT_FLAG_STRUCT)
|
RUNTIME_OS_FLAGS(RUNTIME_DEVELOP_FLAG_STRUCT, RUNTIME_PD_DEVELOP_FLAG_STRUCT, RUNTIME_PRODUCT_FLAG_STRUCT, RUNTIME_PD_PRODUCT_FLAG_STRUCT, RUNTIME_DIAGNOSTIC_FLAG_STRUCT, RUNTIME_NOTPRODUCT_FLAG_STRUCT)
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
G1_FLAGS(RUNTIME_DEVELOP_FLAG_STRUCT, RUNTIME_PD_DEVELOP_FLAG_STRUCT, RUNTIME_PRODUCT_FLAG_STRUCT, RUNTIME_PD_PRODUCT_FLAG_STRUCT, RUNTIME_DIAGNOSTIC_FLAG_STRUCT, RUNTIME_EXPERIMENTAL_FLAG_STRUCT, RUNTIME_NOTPRODUCT_FLAG_STRUCT, RUNTIME_MANAGEABLE_FLAG_STRUCT, RUNTIME_PRODUCT_RW_FLAG_STRUCT)
|
G1_FLAGS(RUNTIME_DEVELOP_FLAG_STRUCT, RUNTIME_PD_DEVELOP_FLAG_STRUCT, RUNTIME_PRODUCT_FLAG_STRUCT, RUNTIME_PD_PRODUCT_FLAG_STRUCT, RUNTIME_DIAGNOSTIC_FLAG_STRUCT, RUNTIME_EXPERIMENTAL_FLAG_STRUCT, RUNTIME_NOTPRODUCT_FLAG_STRUCT, RUNTIME_MANAGEABLE_FLAG_STRUCT, RUNTIME_PRODUCT_RW_FLAG_STRUCT)
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
#ifdef COMPILER1
|
#ifdef COMPILER1
|
||||||
C1_FLAGS(C1_DEVELOP_FLAG_STRUCT, C1_PD_DEVELOP_FLAG_STRUCT, C1_PRODUCT_FLAG_STRUCT, C1_PD_PRODUCT_FLAG_STRUCT, C1_NOTPRODUCT_FLAG_STRUCT)
|
C1_FLAGS(C1_DEVELOP_FLAG_STRUCT, C1_PD_DEVELOP_FLAG_STRUCT, C1_PRODUCT_FLAG_STRUCT, C1_PD_PRODUCT_FLAG_STRUCT, C1_NOTPRODUCT_FLAG_STRUCT)
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#define SHARE_VM_RUNTIME_GLOBALS_EXTENSION_HPP
|
#define SHARE_VM_RUNTIME_GLOBALS_EXTENSION_HPP
|
||||||
|
|
||||||
#include "runtime/globals.hpp"
|
#include "runtime/globals.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#include "utilities/top.hpp"
|
#include "utilities/top.hpp"
|
||||||
|
|
||||||
// Construct enum of Flag_<cmdline-arg> constants.
|
// Construct enum of Flag_<cmdline-arg> constants.
|
||||||
@ -94,9 +95,9 @@
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_EXPERIMENTAL_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER, RUNTIME_MANAGEABLE_FLAG_MEMBER, RUNTIME_PRODUCT_RW_FLAG_MEMBER, RUNTIME_LP64_PRODUCT_FLAG_MEMBER)
|
RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_EXPERIMENTAL_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER, RUNTIME_MANAGEABLE_FLAG_MEMBER, RUNTIME_PRODUCT_RW_FLAG_MEMBER, RUNTIME_LP64_PRODUCT_FLAG_MEMBER)
|
||||||
RUNTIME_OS_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER)
|
RUNTIME_OS_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER)
|
||||||
#if INCLUDE_ALTERNATE_GCS
|
#if INCLUDE_ALL_GCS
|
||||||
G1_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_EXPERIMENTAL_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER, RUNTIME_MANAGEABLE_FLAG_MEMBER, RUNTIME_PRODUCT_RW_FLAG_MEMBER)
|
G1_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_EXPERIMENTAL_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER, RUNTIME_MANAGEABLE_FLAG_MEMBER, RUNTIME_PRODUCT_RW_FLAG_MEMBER)
|
||||||
#endif // INCLUDE_ALTERNATE_GCS
|
#endif // INCLUDE_ALL_GCS
|
||||||
#ifdef COMPILER1
|
#ifdef COMPILER1
|
||||||
C1_FLAGS(C1_DEVELOP_FLAG_MEMBER, C1_PD_DEVELOP_FLAG_MEMBER, C1_PRODUCT_FLAG_MEMBER, C1_PD_PRODUCT_FLAG_MEMBER, C1_NOTPRODUCT_FLAG_MEMBER)
|
C1_FLAGS(C1_DEVELOP_FLAG_MEMBER, C1_PD_DEVELOP_FLAG_MEMBER, C1_PRODUCT_FLAG_MEMBER, C1_PD_PRODUCT_FLAG_MEMBER, C1_NOTPRODUCT_FLAG_MEMBER)
|
||||||
#endif
|
#endif
|
||||||
@ -187,7 +188,7 @@ typedef enum {
|
|||||||
RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE)
|
RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE)
|
||||||
#if INCLUDE_ALTERNATE_GCS
|
#if INCLUDE_ALL_GCS
|
||||||
G1_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE,
|
G1_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
@ -197,7 +198,7 @@ typedef enum {
|
|||||||
RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_PRODUCT_RW_FLAG_MEMBER_WITH_TYPE)
|
RUNTIME_PRODUCT_RW_FLAG_MEMBER_WITH_TYPE)
|
||||||
#endif // INCLUDE_ALTERNATE_GCS
|
#endif // INCLUDE_ALL_GCS
|
||||||
#ifdef COMPILER1
|
#ifdef COMPILER1
|
||||||
C1_FLAGS(C1_DEVELOP_FLAG_MEMBER_WITH_TYPE,
|
C1_FLAGS(C1_DEVELOP_FLAG_MEMBER_WITH_TYPE,
|
||||||
C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
|
C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "runtime/init.hpp"
|
#include "runtime/init.hpp"
|
||||||
#include "runtime/safepoint.hpp"
|
#include "runtime/safepoint.hpp"
|
||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
// Initialization done by VM thread in vm_init_globals()
|
// Initialization done by VM thread in vm_init_globals()
|
||||||
void check_ThreadShadow();
|
void check_ThreadShadow();
|
||||||
|
@ -64,6 +64,7 @@
|
|||||||
#include "utilities/dtrace.hpp"
|
#include "utilities/dtrace.hpp"
|
||||||
#include "utilities/globalDefinitions.hpp"
|
#include "utilities/globalDefinitions.hpp"
|
||||||
#include "utilities/histogram.hpp"
|
#include "utilities/histogram.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#include "utilities/vmError.hpp"
|
#include "utilities/vmError.hpp"
|
||||||
#ifdef TARGET_ARCH_x86
|
#ifdef TARGET_ARCH_x86
|
||||||
# include "vm_version_x86.hpp"
|
# include "vm_version_x86.hpp"
|
||||||
@ -80,11 +81,11 @@
|
|||||||
#ifdef TARGET_ARCH_ppc
|
#ifdef TARGET_ARCH_ppc
|
||||||
# include "vm_version_ppc.hpp"
|
# include "vm_version_ppc.hpp"
|
||||||
#endif
|
#endif
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
|
#include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/psScavenge.hpp"
|
#include "gc_implementation/parallelScavenge/psScavenge.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
#ifdef COMPILER1
|
#ifdef COMPILER1
|
||||||
#include "c1/c1_Compiler.hpp"
|
#include "c1/c1_Compiler.hpp"
|
||||||
#include "c1/c1_Runtime1.hpp"
|
#include "c1/c1_Runtime1.hpp"
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
#include "services/memTracker.hpp"
|
#include "services/memTracker.hpp"
|
||||||
#include "services/runtimeService.hpp"
|
#include "services/runtimeService.hpp"
|
||||||
#include "utilities/events.hpp"
|
#include "utilities/events.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#ifdef TARGET_ARCH_x86
|
#ifdef TARGET_ARCH_x86
|
||||||
# include "nativeInst_x86.hpp"
|
# include "nativeInst_x86.hpp"
|
||||||
# include "vmreg_x86.inline.hpp"
|
# include "vmreg_x86.inline.hpp"
|
||||||
@ -72,10 +73,10 @@
|
|||||||
# include "nativeInst_ppc.hpp"
|
# include "nativeInst_ppc.hpp"
|
||||||
# include "vmreg_ppc.inline.hpp"
|
# include "vmreg_ppc.inline.hpp"
|
||||||
#endif
|
#endif
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
|
#include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
|
||||||
#include "gc_implementation/shared/concurrentGCThread.hpp"
|
#include "gc_implementation/shared/concurrentGCThread.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
#ifdef COMPILER1
|
#ifdef COMPILER1
|
||||||
#include "c1/c1_globals.hpp"
|
#include "c1/c1_globals.hpp"
|
||||||
#endif
|
#endif
|
||||||
@ -103,7 +104,7 @@ void SafepointSynchronize::begin() {
|
|||||||
_ts_of_current_safepoint = tty->time_stamp().seconds();
|
_ts_of_current_safepoint = tty->time_stamp().seconds();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
if (UseConcMarkSweepGC) {
|
if (UseConcMarkSweepGC) {
|
||||||
// In the future we should investigate whether CMS can use the
|
// In the future we should investigate whether CMS can use the
|
||||||
// more-general mechanism below. DLD (01/05).
|
// more-general mechanism below. DLD (01/05).
|
||||||
@ -111,7 +112,7 @@ void SafepointSynchronize::begin() {
|
|||||||
} else if (UseG1GC) {
|
} else if (UseG1GC) {
|
||||||
ConcurrentGCThread::safepoint_synchronize();
|
ConcurrentGCThread::safepoint_synchronize();
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// By getting the Threads_lock, we assure that no threads are about to start or
|
// By getting the Threads_lock, we assure that no threads are about to start or
|
||||||
// exit. It is released again in SafepointSynchronize::end().
|
// exit. It is released again in SafepointSynchronize::end().
|
||||||
@ -480,14 +481,14 @@ void SafepointSynchronize::end() {
|
|||||||
Threads_lock->unlock();
|
Threads_lock->unlock();
|
||||||
|
|
||||||
}
|
}
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// If there are any concurrent GC threads resume them.
|
// If there are any concurrent GC threads resume them.
|
||||||
if (UseConcMarkSweepGC) {
|
if (UseConcMarkSweepGC) {
|
||||||
ConcurrentMarkSweepThread::desynchronize(false);
|
ConcurrentMarkSweepThread::desynchronize(false);
|
||||||
} else if (UseG1GC) {
|
} else if (UseG1GC) {
|
||||||
ConcurrentGCThread::safepoint_desynchronize();
|
ConcurrentGCThread::safepoint_desynchronize();
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
// record this time so VMThread can keep track how much time has elasped
|
// record this time so VMThread can keep track how much time has elasped
|
||||||
// since last safepoint.
|
// since last safepoint.
|
||||||
_end_of_last_safepoint = os::javaTimeMillis();
|
_end_of_last_safepoint = os::javaTimeMillis();
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
#include "utilities/dtrace.hpp"
|
#include "utilities/dtrace.hpp"
|
||||||
#include "utilities/events.hpp"
|
#include "utilities/events.hpp"
|
||||||
#include "utilities/hashtable.inline.hpp"
|
#include "utilities/hashtable.inline.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#include "utilities/xmlstream.hpp"
|
#include "utilities/xmlstream.hpp"
|
||||||
#ifdef TARGET_ARCH_x86
|
#ifdef TARGET_ARCH_x86
|
||||||
# include "nativeInst_x86.hpp"
|
# include "nativeInst_x86.hpp"
|
||||||
@ -212,7 +213,7 @@ void SharedRuntime::print_ic_miss_histogram() {
|
|||||||
}
|
}
|
||||||
#endif // PRODUCT
|
#endif // PRODUCT
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// G1 write-barrier pre: executed before a pointer store.
|
// G1 write-barrier pre: executed before a pointer store.
|
||||||
JRT_LEAF(void, SharedRuntime::g1_wb_pre(oopDesc* orig, JavaThread *thread))
|
JRT_LEAF(void, SharedRuntime::g1_wb_pre(oopDesc* orig, JavaThread *thread))
|
||||||
@ -230,7 +231,7 @@ JRT_LEAF(void, SharedRuntime::g1_wb_post(void* card_addr, JavaThread* thread))
|
|||||||
thread->dirty_card_queue().enqueue(card_addr);
|
thread->dirty_card_queue().enqueue(card_addr);
|
||||||
JRT_END
|
JRT_END
|
||||||
|
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
|
|
||||||
JRT_LEAF(jlong, SharedRuntime::lmul(jlong y, jlong x))
|
JRT_LEAF(jlong, SharedRuntime::lmul(jlong y, jlong x))
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "memory/resourceArea.hpp"
|
#include "memory/resourceArea.hpp"
|
||||||
#include "runtime/threadLocalStorage.hpp"
|
#include "runtime/threadLocalStorage.hpp"
|
||||||
#include "utilities/hashtable.hpp"
|
#include "utilities/hashtable.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
class AdapterHandlerEntry;
|
class AdapterHandlerEntry;
|
||||||
class AdapterHandlerTable;
|
class AdapterHandlerTable;
|
||||||
@ -168,11 +169,11 @@ class SharedRuntime: AllStatic {
|
|||||||
static address raw_exception_handler_for_return_address(JavaThread* thread, address return_address);
|
static address raw_exception_handler_for_return_address(JavaThread* thread, address return_address);
|
||||||
static address exception_handler_for_return_address(JavaThread* thread, address return_address);
|
static address exception_handler_for_return_address(JavaThread* thread, address return_address);
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// G1 write barriers
|
// G1 write barriers
|
||||||
static void g1_wb_pre(oopDesc* orig, JavaThread *thread);
|
static void g1_wb_pre(oopDesc* orig, JavaThread *thread);
|
||||||
static void g1_wb_post(void* card_addr, JavaThread* thread);
|
static void g1_wb_post(void* card_addr, JavaThread* thread);
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// exception handling and implicit exceptions
|
// exception handling and implicit exceptions
|
||||||
static address compute_compiled_exc_handler(nmethod* nm, address ret_pc, Handle& exception,
|
static address compute_compiled_exc_handler(nmethod* nm, address ret_pc, Handle& exception,
|
||||||
|
@ -82,6 +82,7 @@
|
|||||||
#include "utilities/dtrace.hpp"
|
#include "utilities/dtrace.hpp"
|
||||||
#include "utilities/events.hpp"
|
#include "utilities/events.hpp"
|
||||||
#include "utilities/preserveException.hpp"
|
#include "utilities/preserveException.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
#ifdef TARGET_OS_FAMILY_linux
|
#ifdef TARGET_OS_FAMILY_linux
|
||||||
# include "os_linux.inline.hpp"
|
# include "os_linux.inline.hpp"
|
||||||
#endif
|
#endif
|
||||||
@ -94,11 +95,11 @@
|
|||||||
#ifdef TARGET_OS_FAMILY_bsd
|
#ifdef TARGET_OS_FAMILY_bsd
|
||||||
# include "os_bsd.inline.hpp"
|
# include "os_bsd.inline.hpp"
|
||||||
#endif
|
#endif
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
|
#include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
|
||||||
#include "gc_implementation/g1/concurrentMarkThread.inline.hpp"
|
#include "gc_implementation/g1/concurrentMarkThread.inline.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/pcTasks.hpp"
|
#include "gc_implementation/parallelScavenge/pcTasks.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
#ifdef COMPILER1
|
#ifdef COMPILER1
|
||||||
#include "c1/c1_Compiler.hpp"
|
#include "c1/c1_Compiler.hpp"
|
||||||
#endif
|
#endif
|
||||||
@ -1482,17 +1483,17 @@ void JavaThread::initialize() {
|
|||||||
pd_initialize();
|
pd_initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
SATBMarkQueueSet JavaThread::_satb_mark_queue_set;
|
SATBMarkQueueSet JavaThread::_satb_mark_queue_set;
|
||||||
DirtyCardQueueSet JavaThread::_dirty_card_queue_set;
|
DirtyCardQueueSet JavaThread::_dirty_card_queue_set;
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
JavaThread::JavaThread(bool is_attaching_via_jni) :
|
JavaThread::JavaThread(bool is_attaching_via_jni) :
|
||||||
Thread()
|
Thread()
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
, _satb_mark_queue(&_satb_mark_queue_set),
|
, _satb_mark_queue(&_satb_mark_queue_set),
|
||||||
_dirty_card_queue(&_dirty_card_queue_set)
|
_dirty_card_queue(&_dirty_card_queue_set)
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
{
|
{
|
||||||
initialize();
|
initialize();
|
||||||
if (is_attaching_via_jni) {
|
if (is_attaching_via_jni) {
|
||||||
@ -1547,10 +1548,10 @@ static void compiler_thread_entry(JavaThread* thread, TRAPS);
|
|||||||
|
|
||||||
JavaThread::JavaThread(ThreadFunction entry_point, size_t stack_sz) :
|
JavaThread::JavaThread(ThreadFunction entry_point, size_t stack_sz) :
|
||||||
Thread()
|
Thread()
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
, _satb_mark_queue(&_satb_mark_queue_set),
|
, _satb_mark_queue(&_satb_mark_queue_set),
|
||||||
_dirty_card_queue(&_dirty_card_queue_set)
|
_dirty_card_queue(&_dirty_card_queue_set)
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
{
|
{
|
||||||
if (TraceThreadEvents) {
|
if (TraceThreadEvents) {
|
||||||
tty->print_cr("creating thread %p", this);
|
tty->print_cr("creating thread %p", this);
|
||||||
@ -1896,19 +1897,19 @@ void JavaThread::exit(bool destroy_vm, ExitType exit_type) {
|
|||||||
JvmtiExport::cleanup_thread(this);
|
JvmtiExport::cleanup_thread(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// We must flush G1-related buffers before removing a thread from
|
// We must flush G1-related buffers before removing a thread from
|
||||||
// the list of active threads.
|
// the list of active threads.
|
||||||
if (UseG1GC) {
|
if (UseG1GC) {
|
||||||
flush_barrier_queues();
|
flush_barrier_queues();
|
||||||
}
|
}
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// Remove from list of active threads list, and notify VM thread if we are the last non-daemon thread
|
// Remove from list of active threads list, and notify VM thread if we are the last non-daemon thread
|
||||||
Threads::remove(this);
|
Threads::remove(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// Flush G1-related queues.
|
// Flush G1-related queues.
|
||||||
void JavaThread::flush_barrier_queues() {
|
void JavaThread::flush_barrier_queues() {
|
||||||
satb_mark_queue().flush();
|
satb_mark_queue().flush();
|
||||||
@ -1936,7 +1937,7 @@ void JavaThread::initialize_queues() {
|
|||||||
// active field set to true.
|
// active field set to true.
|
||||||
assert(dirty_queue.is_active(), "dirty card queue should be active");
|
assert(dirty_queue.is_active(), "dirty card queue should be active");
|
||||||
}
|
}
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
void JavaThread::cleanup_failed_attach_current_thread() {
|
void JavaThread::cleanup_failed_attach_current_thread() {
|
||||||
if (get_thread_profiler() != NULL) {
|
if (get_thread_profiler() != NULL) {
|
||||||
@ -1964,11 +1965,11 @@ void JavaThread::cleanup_failed_attach_current_thread() {
|
|||||||
tlab().make_parsable(true); // retire TLAB, if any
|
tlab().make_parsable(true); // retire TLAB, if any
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
if (UseG1GC) {
|
if (UseG1GC) {
|
||||||
flush_barrier_queues();
|
flush_barrier_queues();
|
||||||
}
|
}
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
Threads::remove(this);
|
Threads::remove(this);
|
||||||
delete this;
|
delete this;
|
||||||
@ -3600,7 +3601,7 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
|
|||||||
vm_exit_during_initialization(Handle(THREAD, PENDING_EXCEPTION));
|
vm_exit_during_initialization(Handle(THREAD, PENDING_EXCEPTION));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// Support for ConcurrentMarkSweep. This should be cleaned up
|
// Support for ConcurrentMarkSweep. This should be cleaned up
|
||||||
// and better encapsulated. The ugly nested if test would go away
|
// and better encapsulated. The ugly nested if test would go away
|
||||||
// once things are properly refactored. XXX YSR
|
// once things are properly refactored. XXX YSR
|
||||||
@ -3614,7 +3615,7 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
|
|||||||
vm_exit_during_initialization(Handle(THREAD, PENDING_EXCEPTION));
|
vm_exit_during_initialization(Handle(THREAD, PENDING_EXCEPTION));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// Always call even when there are not JVMTI environments yet, since environments
|
// Always call even when there are not JVMTI environments yet, since environments
|
||||||
// may be attached late and JVMTI must track phases of VM execution
|
// may be attached late and JVMTI must track phases of VM execution
|
||||||
@ -4209,7 +4210,7 @@ void Threads::possibly_parallel_oops_do(OopClosure* f, CLDToOopClosure* cld_f, C
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// Used by ParallelScavenge
|
// Used by ParallelScavenge
|
||||||
void Threads::create_thread_roots_tasks(GCTaskQueue* q) {
|
void Threads::create_thread_roots_tasks(GCTaskQueue* q) {
|
||||||
ALL_JAVA_THREADS(p) {
|
ALL_JAVA_THREADS(p) {
|
||||||
@ -4225,7 +4226,7 @@ void Threads::create_thread_roots_marking_tasks(GCTaskQueue* q) {
|
|||||||
}
|
}
|
||||||
q->enqueue(new ThreadRootsMarkingTask(VMThread::vm_thread()));
|
q->enqueue(new ThreadRootsMarkingTask(VMThread::vm_thread()));
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
void Threads::nmethods_do(CodeBlobClosure* cf) {
|
void Threads::nmethods_do(CodeBlobClosure* cf) {
|
||||||
ALL_JAVA_THREADS(p) {
|
ALL_JAVA_THREADS(p) {
|
||||||
@ -4333,13 +4334,13 @@ void Threads::print_on(outputStream* st, bool print_stacks, bool internal_format
|
|||||||
);
|
);
|
||||||
st->cr();
|
st->cr();
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// Dump concurrent locks
|
// Dump concurrent locks
|
||||||
ConcurrentLocksDump concurrent_locks;
|
ConcurrentLocksDump concurrent_locks;
|
||||||
if (print_concurrent_locks) {
|
if (print_concurrent_locks) {
|
||||||
concurrent_locks.dump_at_safepoint();
|
concurrent_locks.dump_at_safepoint();
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
ALL_JAVA_THREADS(p) {
|
ALL_JAVA_THREADS(p) {
|
||||||
ResourceMark rm;
|
ResourceMark rm;
|
||||||
@ -4352,11 +4353,11 @@ void Threads::print_on(outputStream* st, bool print_stacks, bool internal_format
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
st->cr();
|
st->cr();
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
if (print_concurrent_locks) {
|
if (print_concurrent_locks) {
|
||||||
concurrent_locks.print_locks_on(p, st);
|
concurrent_locks.print_locks_on(p, st);
|
||||||
}
|
}
|
||||||
#endif // SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
}
|
}
|
||||||
|
|
||||||
VMThread::vm_thread()->print_on(st);
|
VMThread::vm_thread()->print_on(st);
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include "runtime/stubRoutines.hpp"
|
#include "runtime/stubRoutines.hpp"
|
||||||
#include "runtime/threadLocalStorage.hpp"
|
#include "runtime/threadLocalStorage.hpp"
|
||||||
#include "runtime/unhandledOops.hpp"
|
#include "runtime/unhandledOops.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
#if INCLUDE_NMT
|
#if INCLUDE_NMT
|
||||||
#include "services/memRecorder.hpp"
|
#include "services/memRecorder.hpp"
|
||||||
@ -49,10 +50,10 @@
|
|||||||
#include "trace/tracing.hpp"
|
#include "trace/tracing.hpp"
|
||||||
#include "utilities/exceptions.hpp"
|
#include "utilities/exceptions.hpp"
|
||||||
#include "utilities/top.hpp"
|
#include "utilities/top.hpp"
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
#include "gc_implementation/g1/dirtyCardQueue.hpp"
|
#include "gc_implementation/g1/dirtyCardQueue.hpp"
|
||||||
#include "gc_implementation/g1/satbQueue.hpp"
|
#include "gc_implementation/g1/satbQueue.hpp"
|
||||||
#endif
|
#endif // INCLUDE_ALL_GCS
|
||||||
#ifdef ZERO
|
#ifdef ZERO
|
||||||
#ifdef TARGET_ARCH_zero
|
#ifdef TARGET_ARCH_zero
|
||||||
# include "stack_zero.hpp"
|
# include "stack_zero.hpp"
|
||||||
@ -929,7 +930,7 @@ class JavaThread: public Thread {
|
|||||||
} _jmp_ring[ jump_ring_buffer_size ];
|
} _jmp_ring[ jump_ring_buffer_size ];
|
||||||
#endif /* PRODUCT */
|
#endif /* PRODUCT */
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// Support for G1 barriers
|
// Support for G1 barriers
|
||||||
|
|
||||||
ObjPtrQueue _satb_mark_queue; // Thread-local log for SATB barrier.
|
ObjPtrQueue _satb_mark_queue; // Thread-local log for SATB barrier.
|
||||||
@ -941,7 +942,7 @@ class JavaThread: public Thread {
|
|||||||
static DirtyCardQueueSet _dirty_card_queue_set;
|
static DirtyCardQueueSet _dirty_card_queue_set;
|
||||||
|
|
||||||
void flush_barrier_queues();
|
void flush_barrier_queues();
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
friend class VMThread;
|
friend class VMThread;
|
||||||
friend class ThreadWaitTransition;
|
friend class ThreadWaitTransition;
|
||||||
@ -1345,10 +1346,10 @@ class JavaThread: public Thread {
|
|||||||
return byte_offset_of(JavaThread, _should_post_on_exceptions_flag);
|
return byte_offset_of(JavaThread, _should_post_on_exceptions_flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
static ByteSize satb_mark_queue_offset() { return byte_offset_of(JavaThread, _satb_mark_queue); }
|
static ByteSize satb_mark_queue_offset() { return byte_offset_of(JavaThread, _satb_mark_queue); }
|
||||||
static ByteSize dirty_card_queue_offset() { return byte_offset_of(JavaThread, _dirty_card_queue); }
|
static ByteSize dirty_card_queue_offset() { return byte_offset_of(JavaThread, _dirty_card_queue); }
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// Returns the jni environment for this thread
|
// Returns the jni environment for this thread
|
||||||
JNIEnv* jni_environment() { return &_jni_environment; }
|
JNIEnv* jni_environment() { return &_jni_environment; }
|
||||||
@ -1637,7 +1638,7 @@ public:
|
|||||||
_stack_size_at_create = value;
|
_stack_size_at_create = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
// SATB marking queue support
|
// SATB marking queue support
|
||||||
ObjPtrQueue& satb_mark_queue() { return _satb_mark_queue; }
|
ObjPtrQueue& satb_mark_queue() { return _satb_mark_queue; }
|
||||||
static SATBMarkQueueSet& satb_mark_queue_set() {
|
static SATBMarkQueueSet& satb_mark_queue_set() {
|
||||||
@ -1649,7 +1650,7 @@ public:
|
|||||||
static DirtyCardQueueSet& dirty_card_queue_set() {
|
static DirtyCardQueueSet& dirty_card_queue_set() {
|
||||||
return _dirty_card_queue_set;
|
return _dirty_card_queue_set;
|
||||||
}
|
}
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// This method initializes the SATB and dirty card queues before a
|
// This method initializes the SATB and dirty card queues before a
|
||||||
// JavaThread is added to the Java thread list. Right now, we don't
|
// JavaThread is added to the Java thread list. Right now, we don't
|
||||||
@ -1668,11 +1669,11 @@ public:
|
|||||||
// might happen between the JavaThread constructor being called and the
|
// might happen between the JavaThread constructor being called and the
|
||||||
// thread being added to the Java thread list (an example of this is
|
// thread being added to the Java thread list (an example of this is
|
||||||
// when the structure for the DestroyJavaVM thread is created).
|
// when the structure for the DestroyJavaVM thread is created).
|
||||||
#ifndef SERIALGC
|
#if INCLUDE_ALL_GCS
|
||||||
void initialize_queues();
|
void initialize_queues();
|
||||||
#else // !SERIALGC
|
#else // INCLUDE_ALL_GCS
|
||||||
void initialize_queues() { }
|
void initialize_queues() { }
|
||||||
#endif // !SERIALGC
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
// Machine dependent stuff
|
// Machine dependent stuff
|
||||||
#ifdef TARGET_OS_ARCH_linux_x86
|
#ifdef TARGET_OS_ARCH_linux_x86
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user