Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
85da33de
D
dragonwell8_hotspot
项目概览
openanolis
/
dragonwell8_hotspot
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_hotspot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
85da33de
编写于
11年前
作者:
E
ehelin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8015107: NPG: Use consistent naming for metaspace concepts
Reviewed-by: coleenp, mgerdin, hseigel
上级
f6012b7b
master
Tags不可用
无相关合并请求
变更
43
隐藏空白更改
内联
并排
Showing
43 changed file
with
229 addition
and
176 deletion
+229
-176
agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
+1
-1
agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java
.../src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java
+12
-12
src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
+4
-4
src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp
src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp
+2
-2
src/cpu/sparc/vm/macroAssembler_sparc.cpp
src/cpu/sparc/vm/macroAssembler_sparc.cpp
+9
-9
src/cpu/sparc/vm/sparc.ad
src/cpu/sparc/vm/sparc.ad
+4
-4
src/cpu/sparc/vm/stubGenerator_sparc.cpp
src/cpu/sparc/vm/stubGenerator_sparc.cpp
+3
-3
src/cpu/sparc/vm/vtableStubs_sparc.cpp
src/cpu/sparc/vm/vtableStubs_sparc.cpp
+2
-2
src/cpu/x86/vm/c1_FrameMap_x86.hpp
src/cpu/x86/vm/c1_FrameMap_x86.hpp
+1
-1
src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
+10
-10
src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
+2
-2
src/cpu/x86/vm/c1_MacroAssembler_x86.cpp
src/cpu/x86/vm/c1_MacroAssembler_x86.cpp
+4
-4
src/cpu/x86/vm/macroAssembler_x86.cpp
src/cpu/x86/vm/macroAssembler_x86.cpp
+12
-12
src/cpu/x86/vm/vtableStubs_x86_64.cpp
src/cpu/x86/vm/vtableStubs_x86_64.cpp
+2
-2
src/cpu/x86/vm/x86_64.ad
src/cpu/x86/vm/x86_64.ad
+3
-3
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
...ion/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
+2
-2
src/share/vm/memory/metaspace.cpp
src/share/vm/memory/metaspace.cpp
+16
-16
src/share/vm/memory/metaspace.hpp
src/share/vm/memory/metaspace.hpp
+2
-2
src/share/vm/memory/metaspaceCounters.cpp
src/share/vm/memory/metaspaceCounters.cpp
+2
-2
src/share/vm/memory/universe.cpp
src/share/vm/memory/universe.cpp
+1
-1
src/share/vm/memory/universe.hpp
src/share/vm/memory/universe.hpp
+3
-3
src/share/vm/oops/arrayOop.hpp
src/share/vm/oops/arrayOop.hpp
+1
-1
src/share/vm/oops/instanceOop.hpp
src/share/vm/oops/instanceOop.hpp
+2
-2
src/share/vm/oops/oop.inline.hpp
src/share/vm/oops/oop.inline.hpp
+9
-9
src/share/vm/opto/cfgnode.cpp
src/share/vm/opto/cfgnode.cpp
+1
-1
src/share/vm/opto/compile.cpp
src/share/vm/opto/compile.cpp
+2
-2
src/share/vm/opto/connode.cpp
src/share/vm/opto/connode.cpp
+1
-1
src/share/vm/opto/library_call.cpp
src/share/vm/opto/library_call.cpp
+1
-1
src/share/vm/opto/live.cpp
src/share/vm/opto/live.cpp
+1
-1
src/share/vm/opto/macro.cpp
src/share/vm/opto/macro.cpp
+1
-1
src/share/vm/opto/memnode.cpp
src/share/vm/opto/memnode.cpp
+2
-2
src/share/vm/opto/type.cpp
src/share/vm/opto/type.cpp
+1
-1
src/share/vm/runtime/arguments.cpp
src/share/vm/runtime/arguments.cpp
+25
-21
src/share/vm/runtime/globals.hpp
src/share/vm/runtime/globals.hpp
+5
-5
src/share/vm/services/memoryPool.cpp
src/share/vm/services/memoryPool.cpp
+1
-1
src/share/vm/services/memoryService.cpp
src/share/vm/services/memoryService.cpp
+1
-1
test/gc/arguments/TestCompressedClassFlags.java
test/gc/arguments/TestCompressedClassFlags.java
+49
-0
test/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java
test/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java
+7
-7
test/gc/metaspace/TestMetaspaceMemoryPool.java
test/gc/metaspace/TestMetaspaceMemoryPool.java
+2
-2
test/gc/metaspace/TestMetaspacePerfCounters.java
test/gc/metaspace/TestMetaspacePerfCounters.java
+7
-7
test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java
test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java
+3
-3
test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrsError.java
test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrsError.java
+8
-8
test/runtime/CompressedOops/CompressedKlassPointerAndOops.java
...runtime/CompressedOops/CompressedKlassPointerAndOops.java
+2
-2
未找到文件。
agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
浏览文件 @
85da33de
...
...
@@ -792,7 +792,7 @@ public class VM {
public
boolean
isCompressedKlassPointersEnabled
()
{
if
(
compressedKlassPointersEnabled
==
null
)
{
Flag
flag
=
getCommandLineFlag
(
"UseCompressed
K
lassPointers"
);
Flag
flag
=
getCommandLineFlag
(
"UseCompressed
C
lassPointers"
);
compressedKlassPointersEnabled
=
(
flag
==
null
)
?
Boolean
.
FALSE
:
(
flag
.
getBool
()?
Boolean
.
TRUE
:
Boolean
.
FALSE
);
}
...
...
This diff is collapsed.
Click to expand it.
agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java
浏览文件 @
85da33de
...
...
@@ -66,18 +66,18 @@ public class HeapSummary extends Tool {
printGCAlgorithm
(
flagMap
);
System
.
out
.
println
();
System
.
out
.
println
(
"Heap Configuration:"
);
printValue
(
"MinHeapFreeRatio = "
,
getFlagValue
(
"MinHeapFreeRatio"
,
flagMap
));
printValue
(
"MaxHeapFreeRatio = "
,
getFlagValue
(
"MaxHeapFreeRatio"
,
flagMap
));
printValMB
(
"MaxHeapSize = "
,
getFlagValue
(
"MaxHeapSize"
,
flagMap
));
printValMB
(
"NewSize = "
,
getFlagValue
(
"NewSize"
,
flagMap
));
printValMB
(
"MaxNewSize = "
,
getFlagValue
(
"MaxNewSize"
,
flagMap
));
printValMB
(
"OldSize = "
,
getFlagValue
(
"OldSize"
,
flagMap
));
printValue
(
"NewRatio = "
,
getFlagValue
(
"NewRatio"
,
flagMap
));
printValue
(
"SurvivorRatio = "
,
getFlagValue
(
"SurvivorRatio"
,
flagMap
));
printValMB
(
"MetaspaceSize = "
,
getFlagValue
(
"MetaspaceSize"
,
flagMap
));
printValMB
(
"C
lassMetaspaceSize = "
,
getFlagValue
(
"ClassMetas
paceSize"
,
flagMap
));
printValMB
(
"MaxMetaspaceSize = "
,
getFlagValue
(
"MaxMetaspaceSize"
,
flagMap
));
printValMB
(
"G1HeapRegionSize = "
,
HeapRegion
.
grainBytes
());
printValue
(
"MinHeapFreeRatio
= "
,
getFlagValue
(
"MinHeapFreeRatio"
,
flagMap
));
printValue
(
"MaxHeapFreeRatio
= "
,
getFlagValue
(
"MaxHeapFreeRatio"
,
flagMap
));
printValMB
(
"MaxHeapSize
= "
,
getFlagValue
(
"MaxHeapSize"
,
flagMap
));
printValMB
(
"NewSize
= "
,
getFlagValue
(
"NewSize"
,
flagMap
));
printValMB
(
"MaxNewSize
= "
,
getFlagValue
(
"MaxNewSize"
,
flagMap
));
printValMB
(
"OldSize
= "
,
getFlagValue
(
"OldSize"
,
flagMap
));
printValue
(
"NewRatio
= "
,
getFlagValue
(
"NewRatio"
,
flagMap
));
printValue
(
"SurvivorRatio
= "
,
getFlagValue
(
"SurvivorRatio"
,
flagMap
));
printValMB
(
"MetaspaceSize
= "
,
getFlagValue
(
"MetaspaceSize"
,
flagMap
));
printValMB
(
"C
ompressedClassSpaceSize = "
,
getFlagValue
(
"CompressedClassS
paceSize"
,
flagMap
));
printValMB
(
"MaxMetaspaceSize
= "
,
getFlagValue
(
"MaxMetaspaceSize"
,
flagMap
));
printValMB
(
"G1HeapRegionSize
= "
,
HeapRegion
.
grainBytes
());
System
.
out
.
println
();
System
.
out
.
println
(
"Heap Usage:"
);
...
...
This diff is collapsed.
Click to expand it.
src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
浏览文件 @
85da33de
...
...
@@ -105,7 +105,7 @@ bool LIR_Assembler::is_single_instruction(LIR_Op* op) {
if
(
src
->
is_address
()
&&
!
src
->
is_stack
()
&&
(
src
->
type
()
==
T_OBJECT
||
src
->
type
()
==
T_ARRAY
))
return
false
;
}
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
if
(
src
->
is_address
()
&&
!
src
->
is_stack
()
&&
src
->
type
()
==
T_ADDRESS
&&
src
->
as_address_ptr
()
->
disp
()
==
oopDesc
::
klass_offset_in_bytes
())
return
false
;
}
...
...
@@ -963,7 +963,7 @@ int LIR_Assembler::load(Register base, int offset, LIR_Opr to_reg, BasicType typ
case
T_METADATA
:
__
ld_ptr
(
base
,
offset
,
to_reg
->
as_register
());
break
;
case
T_ADDRESS
:
#ifdef _LP64
if
(
offset
==
oopDesc
::
klass_offset_in_bytes
()
&&
UseCompressed
K
lassPointers
)
{
if
(
offset
==
oopDesc
::
klass_offset_in_bytes
()
&&
UseCompressed
C
lassPointers
)
{
__
lduw
(
base
,
offset
,
to_reg
->
as_register
());
__
decode_klass_not_null
(
to_reg
->
as_register
());
}
else
...
...
@@ -2208,7 +2208,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
// We don't know the array types are compatible
if
(
basic_type
!=
T_OBJECT
)
{
// Simple test for basic type arrays
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
// We don't need decode because we just need to compare
__
lduw
(
src
,
oopDesc
::
klass_offset_in_bytes
(),
tmp
);
__
lduw
(
dst
,
oopDesc
::
klass_offset_in_bytes
(),
tmp2
);
...
...
@@ -2342,7 +2342,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
// but not necessarily exactly of type default_type.
Label
known_ok
,
halt
;
metadata2reg
(
op
->
expected_type
()
->
constant_encoding
(),
tmp
);
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
// tmp holds the default type. It currently comes uncompressed after the
// load of a constant, so encode it.
__
encode_klass_not_null
(
tmp
);
...
...
This diff is collapsed.
Click to expand it.
src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp
浏览文件 @
85da33de
...
...
@@ -186,7 +186,7 @@ void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register
set
((
intx
)
markOopDesc
::
prototype
(),
t1
);
}
st_ptr
(
t1
,
obj
,
oopDesc
::
mark_offset_in_bytes
());
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
// Save klass
mov
(
klass
,
t1
);
encode_klass_not_null
(
t1
);
...
...
@@ -196,7 +196,7 @@ void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register
}
if
(
len
->
is_valid
())
{
st
(
len
,
obj
,
arrayOopDesc
::
length_offset_in_bytes
());
}
else
if
(
UseCompressed
K
lassPointers
)
{
}
else
if
(
UseCompressed
C
lassPointers
)
{
// otherwise length is in the class gap
store_klass_gap
(
G0
,
obj
);
}
...
...
This diff is collapsed.
Click to expand it.
src/cpu/sparc/vm/macroAssembler_sparc.cpp
浏览文件 @
85da33de
...
...
@@ -3911,7 +3911,7 @@ void MacroAssembler::load_klass(Register src_oop, Register klass) {
// The number of bytes in this code is used by
// MachCallDynamicJavaNode::ret_addr_offset()
// if this changes, change that.
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
lduw
(
src_oop
,
oopDesc
::
klass_offset_in_bytes
(),
klass
);
decode_klass_not_null
(
klass
);
}
else
{
...
...
@@ -3920,7 +3920,7 @@ void MacroAssembler::load_klass(Register src_oop, Register klass) {
}
void
MacroAssembler
::
store_klass
(
Register
klass
,
Register
dst_oop
)
{
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
assert
(
dst_oop
!=
klass
,
"not enough registers"
);
encode_klass_not_null
(
klass
);
st
(
klass
,
dst_oop
,
oopDesc
::
klass_offset_in_bytes
());
...
...
@@ -3930,7 +3930,7 @@ void MacroAssembler::store_klass(Register klass, Register dst_oop) {
}
void
MacroAssembler
::
store_klass_gap
(
Register
s
,
Register
d
)
{
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
assert
(
s
!=
d
,
"not enough registers"
);
st
(
s
,
d
,
oopDesc
::
klass_gap_offset_in_bytes
());
}
...
...
@@ -4089,7 +4089,7 @@ void MacroAssembler::decode_heap_oop_not_null(Register src, Register dst) {
}
void
MacroAssembler
::
encode_klass_not_null
(
Register
r
)
{
assert
(
UseCompressed
K
lassPointers
,
"must be compressed"
);
assert
(
UseCompressed
C
lassPointers
,
"must be compressed"
);
assert
(
Universe
::
narrow_klass_base
()
!=
NULL
,
"narrow_klass_base should be initialized"
);
assert
(
r
!=
G6_heapbase
,
"bad register choice"
);
set
((
intptr_t
)
Universe
::
narrow_klass_base
(),
G6_heapbase
);
...
...
@@ -4105,7 +4105,7 @@ void MacroAssembler::encode_klass_not_null(Register src, Register dst) {
if
(
src
==
dst
)
{
encode_klass_not_null
(
src
);
}
else
{
assert
(
UseCompressed
K
lassPointers
,
"must be compressed"
);
assert
(
UseCompressed
C
lassPointers
,
"must be compressed"
);
assert
(
Universe
::
narrow_klass_base
()
!=
NULL
,
"narrow_klass_base should be initialized"
);
set
((
intptr_t
)
Universe
::
narrow_klass_base
(),
dst
);
sub
(
src
,
dst
,
dst
);
...
...
@@ -4119,7 +4119,7 @@ void MacroAssembler::encode_klass_not_null(Register src, Register dst) {
// generated by decode_klass_not_null() and reinit_heapbase(). Hence, if
// the instructions they generate change, then this method needs to be updated.
int
MacroAssembler
::
instr_size_for_decode_klass_not_null
()
{
assert
(
UseCompressed
K
lassPointers
,
"only for compressed klass ptrs"
);
assert
(
UseCompressed
C
lassPointers
,
"only for compressed klass ptrs"
);
// set + add + set
int
num_instrs
=
insts_for_internal_set
((
intptr_t
)
Universe
::
narrow_klass_base
())
+
1
+
insts_for_internal_set
((
intptr_t
)
Universe
::
narrow_ptrs_base
());
...
...
@@ -4135,7 +4135,7 @@ int MacroAssembler::instr_size_for_decode_klass_not_null() {
void
MacroAssembler
::
decode_klass_not_null
(
Register
r
)
{
// Do not add assert code to this unless you change vtableStubs_sparc.cpp
// pd_code_size_limit.
assert
(
UseCompressed
K
lassPointers
,
"must be compressed"
);
assert
(
UseCompressed
C
lassPointers
,
"must be compressed"
);
assert
(
Universe
::
narrow_klass_base
()
!=
NULL
,
"narrow_klass_base should be initialized"
);
assert
(
r
!=
G6_heapbase
,
"bad register choice"
);
set
((
intptr_t
)
Universe
::
narrow_klass_base
(),
G6_heapbase
);
...
...
@@ -4151,7 +4151,7 @@ void MacroAssembler::decode_klass_not_null(Register src, Register dst) {
}
else
{
// Do not add assert code to this unless you change vtableStubs_sparc.cpp
// pd_code_size_limit.
assert
(
UseCompressed
K
lassPointers
,
"must be compressed"
);
assert
(
UseCompressed
C
lassPointers
,
"must be compressed"
);
assert
(
Universe
::
narrow_klass_base
()
!=
NULL
,
"narrow_klass_base should be initialized"
);
if
(
Universe
::
narrow_klass_shift
()
!=
0
)
{
assert
((
src
!=
G6_heapbase
)
&&
(
dst
!=
G6_heapbase
),
"bad register choice"
);
...
...
@@ -4167,7 +4167,7 @@ void MacroAssembler::decode_klass_not_null(Register src, Register dst) {
}
void
MacroAssembler
::
reinit_heapbase
()
{
if
(
UseCompressedOops
||
UseCompressed
K
lassPointers
)
{
if
(
UseCompressedOops
||
UseCompressed
C
lassPointers
)
{
if
(
Universe
::
heap
()
!=
NULL
)
{
set
((
intptr_t
)
Universe
::
narrow_ptrs_base
(),
G6_heapbase
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
src/cpu/sparc/vm/sparc.ad
浏览文件 @
85da33de
...
...
@@ -557,7 +557,7 @@ int MachCallDynamicJavaNode::ret_addr_offset() {
int entry_offset = InstanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size();
int v_off = entry_offset*wordSize + vtableEntry::method_offset_in_bytes();
int klass_load_size;
if (UseCompressed
K
lassPointers) {
if (UseCompressed
C
lassPointers) {
assert(Universe::heap() != NULL, "java heap should be initialized");
klass_load_size = MacroAssembler::instr_size_for_decode_klass_not_null() + 1*BytesPerInstWord;
} else {
...
...
@@ -1657,7 +1657,7 @@ uint BoxLockNode::size(PhaseRegAlloc *ra_) const {
void MachUEPNode::format( PhaseRegAlloc *ra_, outputStream *st ) const {
st->print_cr("\nUEP:");
#ifdef _LP64
if (UseCompressed
K
lassPointers) {
if (UseCompressed
C
lassPointers) {
assert(Universe::heap() != NULL, "java heap should be initialized");
st->print_cr("\tLDUW [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check - compressed klass");
st->print_cr("\tSET Universe::narrow_klass_base,R_G6_heap_base");
...
...
@@ -1897,7 +1897,7 @@ bool Matcher::narrow_oop_use_complex_address() {
bool Matcher::narrow_klass_use_complex_address() {
NOT_LP64(ShouldNotCallThis());
assert(UseCompressed
K
lassPointers, "only for compressed klass code");
assert(UseCompressed
C
lassPointers, "only for compressed klass code");
return false;
}
...
...
@@ -2561,7 +2561,7 @@ encode %{
int off = __ offset();
__ load_klass(O0, G3_scratch);
int klass_load_size;
if (UseCompressed
K
lassPointers) {
if (UseCompressed
C
lassPointers) {
assert(Universe::heap() != NULL, "java heap should be initialized");
klass_load_size = MacroAssembler::instr_size_for_decode_klass_not_null() + 1*BytesPerInstWord;
} else {
...
...
This diff is collapsed.
Click to expand it.
src/cpu/sparc/vm/stubGenerator_sparc.cpp
浏览文件 @
85da33de
...
...
@@ -2945,7 +2945,7 @@ class StubGenerator: public StubCodeGenerator {
BLOCK_COMMENT
(
"arraycopy argument klass checks"
);
// get src->klass()
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
__
delayed
()
->
nop
();
// ??? not good
__
load_klass
(
src
,
G3_src_klass
);
}
else
{
...
...
@@ -2980,7 +2980,7 @@ class StubGenerator: public StubCodeGenerator {
// Load 32-bits signed value. Use br() instruction with it to check icc.
__
lduw
(
G3_src_klass
,
lh_offset
,
G5_lh
);
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
__
load_klass
(
dst
,
G4_dst_klass
);
}
// Handle objArrays completely differently...
...
...
@@ -2988,7 +2988,7 @@ class StubGenerator: public StubCodeGenerator {
__
set
(
objArray_lh
,
O5_temp
);
__
cmp
(
G5_lh
,
O5_temp
);
__
br
(
Assembler
::
equal
,
false
,
Assembler
::
pt
,
L_objArray
);
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
__
delayed
()
->
nop
();
}
else
{
__
delayed
()
->
ld_ptr
(
dst
,
oopDesc
::
klass_offset_in_bytes
(),
G4_dst_klass
);
...
...
This diff is collapsed.
Click to expand it.
src/cpu/sparc/vm/vtableStubs_sparc.cpp
浏览文件 @
85da33de
...
...
@@ -218,13 +218,13 @@ int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
// ld;ld;ld,jmp,nop
const
int
basic
=
5
*
BytesPerInstWord
+
// shift;add for load_klass (only shift with zero heap based)
(
UseCompressed
K
lassPointers
?
(
UseCompressed
C
lassPointers
?
MacroAssembler
::
instr_size_for_decode_klass_not_null
()
:
0
);
return
basic
+
slop
;
}
else
{
const
int
basic
=
(
28
LP64_ONLY
(
+
6
))
*
BytesPerInstWord
+
// shift;add for load_klass (only shift with zero heap based)
(
UseCompressed
K
lassPointers
?
(
UseCompressed
C
lassPointers
?
MacroAssembler
::
instr_size_for_decode_klass_not_null
()
:
0
);
return
(
basic
+
slop
);
}
...
...
This diff is collapsed.
Click to expand it.
src/cpu/x86/vm/c1_FrameMap_x86.hpp
浏览文件 @
85da33de
...
...
@@ -148,7 +148,7 @@
static
int
adjust_reg_range
(
int
range
)
{
// Reduce the number of available regs (to free r12) in case of compressed oops
if
(
UseCompressedOops
||
UseCompressed
K
lassPointers
)
return
range
-
1
;
if
(
UseCompressedOops
||
UseCompressed
C
lassPointers
)
return
range
-
1
;
return
range
;
}
...
...
This diff is collapsed.
Click to expand it.
src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
浏览文件 @
85da33de
...
...
@@ -341,7 +341,7 @@ int LIR_Assembler::check_icache() {
Register
receiver
=
FrameMap
::
receiver_opr
->
as_register
();
Register
ic_klass
=
IC_Klass
;
const
int
ic_cmp_size
=
LP64_ONLY
(
10
)
NOT_LP64
(
9
);
const
bool
do_post_padding
=
VerifyOops
||
UseCompressed
K
lassPointers
;
const
bool
do_post_padding
=
VerifyOops
||
UseCompressed
C
lassPointers
;
if
(
!
do_post_padding
)
{
// insert some nops so that the verified entry point is aligned on CodeEntryAlignment
while
((
__
offset
()
+
ic_cmp_size
)
%
CodeEntryAlignment
!=
0
)
{
...
...
@@ -1263,7 +1263,7 @@ void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
break
;
case
T_ADDRESS
:
if
(
UseCompressed
K
lassPointers
&&
addr
->
disp
()
==
oopDesc
::
klass_offset_in_bytes
())
{
if
(
UseCompressed
C
lassPointers
&&
addr
->
disp
()
==
oopDesc
::
klass_offset_in_bytes
())
{
__
movl
(
dest
->
as_register
(),
from_addr
);
}
else
{
__
movptr
(
dest
->
as_register
(),
from_addr
);
...
...
@@ -1371,7 +1371,7 @@ void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
__
verify_oop
(
dest
->
as_register
());
}
else
if
(
type
==
T_ADDRESS
&&
addr
->
disp
()
==
oopDesc
::
klass_offset_in_bytes
())
{
#ifdef _LP64
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
__
decode_klass_not_null
(
dest
->
as_register
());
}
#endif
...
...
@@ -1716,7 +1716,7 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
}
else
if
(
obj
==
klass_RInfo
)
{
klass_RInfo
=
dst
;
}
if
(
k
->
is_loaded
()
&&
!
UseCompressed
K
lassPointers
)
{
if
(
k
->
is_loaded
()
&&
!
UseCompressed
C
lassPointers
)
{
select_different_registers
(
obj
,
dst
,
k_RInfo
,
klass_RInfo
);
}
else
{
Rtmp1
=
op
->
tmp3
()
->
as_register
();
...
...
@@ -1754,7 +1754,7 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
// get object class
// not a safepoint as obj null check happens earlier
#ifdef _LP64
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
__
load_klass
(
Rtmp1
,
obj
);
__
cmpptr
(
k_RInfo
,
Rtmp1
);
}
else
{
...
...
@@ -3294,7 +3294,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
// We don't know the array types are compatible
if
(
basic_type
!=
T_OBJECT
)
{
// Simple test for basic type arrays
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
__
movl
(
tmp
,
src_klass_addr
);
__
cmpl
(
tmp
,
dst_klass_addr
);
}
else
{
...
...
@@ -3456,21 +3456,21 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
Label
known_ok
,
halt
;
__
mov_metadata
(
tmp
,
default_type
->
constant_encoding
());
#ifdef _LP64
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
__
encode_klass_not_null
(
tmp
);
}
#endif
if
(
basic_type
!=
T_OBJECT
)
{
if
(
UseCompressed
K
lassPointers
)
__
cmpl
(
tmp
,
dst_klass_addr
);
if
(
UseCompressed
C
lassPointers
)
__
cmpl
(
tmp
,
dst_klass_addr
);
else
__
cmpptr
(
tmp
,
dst_klass_addr
);
__
jcc
(
Assembler
::
notEqual
,
halt
);
if
(
UseCompressed
K
lassPointers
)
__
cmpl
(
tmp
,
src_klass_addr
);
if
(
UseCompressed
C
lassPointers
)
__
cmpl
(
tmp
,
src_klass_addr
);
else
__
cmpptr
(
tmp
,
src_klass_addr
);
__
jcc
(
Assembler
::
equal
,
known_ok
);
}
else
{
if
(
UseCompressed
K
lassPointers
)
__
cmpl
(
tmp
,
dst_klass_addr
);
if
(
UseCompressed
C
lassPointers
)
__
cmpl
(
tmp
,
dst_klass_addr
);
else
__
cmpptr
(
tmp
,
dst_klass_addr
);
__
jcc
(
Assembler
::
equal
,
known_ok
);
__
cmpptr
(
src
,
dst
);
...
...
This diff is collapsed.
Click to expand it.
src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
浏览文件 @
85da33de
...
...
@@ -1239,7 +1239,7 @@ void LIRGenerator::do_CheckCast(CheckCast* x) {
}
LIR_Opr
reg
=
rlock_result
(
x
);
LIR_Opr
tmp3
=
LIR_OprFact
::
illegalOpr
;
if
(
!
x
->
klass
()
->
is_loaded
()
||
UseCompressed
K
lassPointers
)
{
if
(
!
x
->
klass
()
->
is_loaded
()
||
UseCompressed
C
lassPointers
)
{
tmp3
=
new_register
(
objectType
);
}
__
checkcast
(
reg
,
obj
.
result
(),
x
->
klass
(),
...
...
@@ -1261,7 +1261,7 @@ void LIRGenerator::do_InstanceOf(InstanceOf* x) {
}
obj
.
load_item
();
LIR_Opr
tmp3
=
LIR_OprFact
::
illegalOpr
;
if
(
!
x
->
klass
()
->
is_loaded
()
||
UseCompressed
K
lassPointers
)
{
if
(
!
x
->
klass
()
->
is_loaded
()
||
UseCompressed
C
lassPointers
)
{
tmp3
=
new_register
(
objectType
);
}
__
instanceof
(
reg
,
obj
.
result
(),
x
->
klass
(),
...
...
This diff is collapsed.
Click to expand it.
src/cpu/x86/vm/c1_MacroAssembler_x86.cpp
浏览文件 @
85da33de
...
...
@@ -157,7 +157,7 @@ void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register
movptr
(
Address
(
obj
,
oopDesc
::
mark_offset_in_bytes
()),
(
int32_t
)(
intptr_t
)
markOopDesc
::
prototype
());
}
#ifdef _LP64
if
(
UseCompressed
K
lassPointers
)
{
// Take care not to kill klass
if
(
UseCompressed
C
lassPointers
)
{
// Take care not to kill klass
movptr
(
t1
,
klass
);
encode_klass_not_null
(
t1
);
movl
(
Address
(
obj
,
oopDesc
::
klass_offset_in_bytes
()),
t1
);
...
...
@@ -171,7 +171,7 @@ void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register
movl
(
Address
(
obj
,
arrayOopDesc
::
length_offset_in_bytes
()),
len
);
}
#ifdef _LP64
else
if
(
UseCompressed
K
lassPointers
)
{
else
if
(
UseCompressed
C
lassPointers
)
{
xorptr
(
t1
,
t1
);
store_klass_gap
(
obj
,
t1
);
}
...
...
@@ -334,7 +334,7 @@ void C1_MacroAssembler::inline_cache_check(Register receiver, Register iCache) {
assert
(
!
MacroAssembler
::
needs_explicit_null_check
(
oopDesc
::
klass_offset_in_bytes
()),
"must add explicit null check"
);
int
start_offset
=
offset
();
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
load_klass
(
rscratch1
,
receiver
);
cmpptr
(
rscratch1
,
iCache
);
}
else
{
...
...
@@ -345,7 +345,7 @@ void C1_MacroAssembler::inline_cache_check(Register receiver, Register iCache) {
jump_cc
(
Assembler
::
notEqual
,
RuntimeAddress
(
SharedRuntime
::
get_ic_miss_stub
()));
const
int
ic_cmp_size
=
LP64_ONLY
(
10
)
NOT_LP64
(
9
);
assert
(
UseCompressed
K
lassPointers
||
offset
()
-
start_offset
==
ic_cmp_size
,
"check alignment in emit_method_entry"
);
assert
(
UseCompressed
C
lassPointers
||
offset
()
-
start_offset
==
ic_cmp_size
,
"check alignment in emit_method_entry"
);
}
...
...
This diff is collapsed.
Click to expand it.
src/cpu/x86/vm/macroAssembler_x86.cpp
浏览文件 @
85da33de
...
...
@@ -1635,7 +1635,7 @@ void MacroAssembler::call_VM_base(Register oop_result,
#ifdef ASSERT
// TraceBytecodes does not use r12 but saves it over the call, so don't verify
// r12 is the heapbase.
LP64_ONLY
(
if
((
UseCompressedOops
||
UseCompressed
K
lassPointers
)
&&
!
TraceBytecodes
)
verify_heapbase
(
"call_VM_base: heap base corrupted?"
);)
LP64_ONLY
(
if
((
UseCompressedOops
||
UseCompressed
C
lassPointers
)
&&
!
TraceBytecodes
)
verify_heapbase
(
"call_VM_base: heap base corrupted?"
);)
#endif // ASSERT
assert
(
java_thread
!=
oop_result
,
"cannot use the same register for java_thread & oop_result"
);
...
...
@@ -4802,7 +4802,7 @@ void MacroAssembler::restore_cpu_control_state_after_jni() {
void
MacroAssembler
::
load_klass
(
Register
dst
,
Register
src
)
{
#ifdef _LP64
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
movl
(
dst
,
Address
(
src
,
oopDesc
::
klass_offset_in_bytes
()));
decode_klass_not_null
(
dst
);
}
else
...
...
@@ -4817,7 +4817,7 @@ void MacroAssembler::load_prototype_header(Register dst, Register src) {
void
MacroAssembler
::
store_klass
(
Register
dst
,
Register
src
)
{
#ifdef _LP64
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
encode_klass_not_null
(
src
);
movl
(
Address
(
dst
,
oopDesc
::
klass_offset_in_bytes
()),
src
);
}
else
...
...
@@ -4892,7 +4892,7 @@ void MacroAssembler::store_heap_oop_null(Address dst) {
#ifdef _LP64
void
MacroAssembler
::
store_klass_gap
(
Register
dst
,
Register
src
)
{
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
// Store to klass gap in destination
movl
(
Address
(
dst
,
oopDesc
::
klass_gap_offset_in_bytes
()),
src
);
}
...
...
@@ -5075,7 +5075,7 @@ void MacroAssembler::encode_klass_not_null(Register dst, Register src) {
// when (Universe::heap() != NULL). Hence, if the instructions they
// generate change, then this method needs to be updated.
int
MacroAssembler
::
instr_size_for_decode_klass_not_null
()
{
assert
(
UseCompressed
K
lassPointers
,
"only for compressed klass ptrs"
);
assert
(
UseCompressed
C
lassPointers
,
"only for compressed klass ptrs"
);
// mov64 + addq + shlq? + mov64 (for reinit_heapbase()).
return
(
Universe
::
narrow_klass_shift
()
==
0
?
20
:
24
);
}
...
...
@@ -5085,7 +5085,7 @@ int MacroAssembler::instr_size_for_decode_klass_not_null() {
void
MacroAssembler
::
decode_klass_not_null
(
Register
r
)
{
// Note: it will change flags
assert
(
Universe
::
narrow_klass_base
()
!=
NULL
,
"Base should be initialized"
);
assert
(
UseCompressed
K
lassPointers
,
"should only be used for compressed headers"
);
assert
(
UseCompressed
C
lassPointers
,
"should only be used for compressed headers"
);
assert
(
r
!=
r12_heapbase
,
"Decoding a klass in r12"
);
// Cannot assert, unverified entry point counts instructions (see .ad file)
// vtableStubs also counts instructions in pd_code_size_limit.
...
...
@@ -5103,7 +5103,7 @@ void MacroAssembler::decode_klass_not_null(Register r) {
void
MacroAssembler
::
decode_klass_not_null
(
Register
dst
,
Register
src
)
{
// Note: it will change flags
assert
(
Universe
::
narrow_klass_base
()
!=
NULL
,
"Base should be initialized"
);
assert
(
UseCompressed
K
lassPointers
,
"should only be used for compressed headers"
);
assert
(
UseCompressed
C
lassPointers
,
"should only be used for compressed headers"
);
if
(
dst
==
src
)
{
decode_klass_not_null
(
dst
);
}
else
{
...
...
@@ -5141,7 +5141,7 @@ void MacroAssembler::set_narrow_oop(Address dst, jobject obj) {
}
void
MacroAssembler
::
set_narrow_klass
(
Register
dst
,
Klass
*
k
)
{
assert
(
UseCompressed
K
lassPointers
,
"should only be used for compressed headers"
);
assert
(
UseCompressed
C
lassPointers
,
"should only be used for compressed headers"
);
assert
(
oop_recorder
()
!=
NULL
,
"this assembler needs an OopRecorder"
);
int
klass_index
=
oop_recorder
()
->
find_index
(
k
);
RelocationHolder
rspec
=
metadata_Relocation
::
spec
(
klass_index
);
...
...
@@ -5149,7 +5149,7 @@ void MacroAssembler::set_narrow_klass(Register dst, Klass* k) {
}
void
MacroAssembler
::
set_narrow_klass
(
Address
dst
,
Klass
*
k
)
{
assert
(
UseCompressed
K
lassPointers
,
"should only be used for compressed headers"
);
assert
(
UseCompressed
C
lassPointers
,
"should only be used for compressed headers"
);
assert
(
oop_recorder
()
!=
NULL
,
"this assembler needs an OopRecorder"
);
int
klass_index
=
oop_recorder
()
->
find_index
(
k
);
RelocationHolder
rspec
=
metadata_Relocation
::
spec
(
klass_index
);
...
...
@@ -5175,7 +5175,7 @@ void MacroAssembler::cmp_narrow_oop(Address dst, jobject obj) {
}
void
MacroAssembler
::
cmp_narrow_klass
(
Register
dst
,
Klass
*
k
)
{
assert
(
UseCompressed
K
lassPointers
,
"should only be used for compressed headers"
);
assert
(
UseCompressed
C
lassPointers
,
"should only be used for compressed headers"
);
assert
(
oop_recorder
()
!=
NULL
,
"this assembler needs an OopRecorder"
);
int
klass_index
=
oop_recorder
()
->
find_index
(
k
);
RelocationHolder
rspec
=
metadata_Relocation
::
spec
(
klass_index
);
...
...
@@ -5183,7 +5183,7 @@ void MacroAssembler::cmp_narrow_klass(Register dst, Klass* k) {
}
void
MacroAssembler
::
cmp_narrow_klass
(
Address
dst
,
Klass
*
k
)
{
assert
(
UseCompressed
K
lassPointers
,
"should only be used for compressed headers"
);
assert
(
UseCompressed
C
lassPointers
,
"should only be used for compressed headers"
);
assert
(
oop_recorder
()
!=
NULL
,
"this assembler needs an OopRecorder"
);
int
klass_index
=
oop_recorder
()
->
find_index
(
k
);
RelocationHolder
rspec
=
metadata_Relocation
::
spec
(
klass_index
);
...
...
@@ -5191,7 +5191,7 @@ void MacroAssembler::cmp_narrow_klass(Address dst, Klass* k) {
}
void
MacroAssembler
::
reinit_heapbase
()
{
if
(
UseCompressedOops
||
UseCompressed
K
lassPointers
)
{
if
(
UseCompressedOops
||
UseCompressed
C
lassPointers
)
{
if
(
Universe
::
heap
()
!=
NULL
)
{
if
(
Universe
::
narrow_oop_base
()
==
NULL
)
{
MacroAssembler
::
xorptr
(
r12_heapbase
,
r12_heapbase
);
...
...
This diff is collapsed.
Click to expand it.
src/cpu/x86/vm/vtableStubs_x86_64.cpp
浏览文件 @
85da33de
...
...
@@ -211,11 +211,11 @@ int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
if
(
is_vtable_stub
)
{
// Vtable stub size
return
(
DebugVtables
?
512
:
24
)
+
(
CountCompiledCalls
?
13
:
0
)
+
(
UseCompressed
K
lassPointers
?
MacroAssembler
::
instr_size_for_decode_klass_not_null
()
:
0
);
(
UseCompressed
C
lassPointers
?
MacroAssembler
::
instr_size_for_decode_klass_not_null
()
:
0
);
}
else
{
// Itable stub size
return
(
DebugVtables
?
512
:
74
)
+
(
CountCompiledCalls
?
13
:
0
)
+
(
UseCompressed
K
lassPointers
?
MacroAssembler
::
instr_size_for_decode_klass_not_null
()
:
0
);
(
UseCompressed
C
lassPointers
?
MacroAssembler
::
instr_size_for_decode_klass_not_null
()
:
0
);
}
// In order to tune these parameters, run the JVM with VM options
// +PrintMiscellaneous and +WizardMode to see information about
...
...
This diff is collapsed.
Click to expand it.
src/cpu/x86/vm/x86_64.ad
浏览文件 @
85da33de
...
...
@@ -1391,7 +1391,7 @@ uint BoxLockNode::size(PhaseRegAlloc *ra_) const
#ifndef PRODUCT
void MachUEPNode::format(PhaseRegAlloc* ra_, outputStream* st) const
{
if (UseCompressed
K
lassPointers) {
if (UseCompressed
C
lassPointers) {
st->print_cr("movl rscratch1, [j_rarg0 + oopDesc::klass_offset_in_bytes()]\t# compressed klass");
st->print_cr("\tdecode_klass_not_null rscratch1, rscratch1");
st->print_cr("\tcmpq rax, rscratch1\t # Inline cache check");
...
...
@@ -1408,7 +1408,7 @@ void MachUEPNode::emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const
{
MacroAssembler masm(&cbuf);
uint insts_size = cbuf.insts_size();
if (UseCompressed
K
lassPointers) {
if (UseCompressed
C
lassPointers) {
masm.load_klass(rscratch1, j_rarg0);
masm.cmpptr(rax, rscratch1);
} else {
...
...
@@ -1557,7 +1557,7 @@ bool Matcher::narrow_oop_use_complex_address() {
}
bool Matcher::narrow_klass_use_complex_address() {
assert(UseCompressed
K
lassPointers, "only for compressed klass code");
assert(UseCompressed
C
lassPointers, "only for compressed klass code");
return (LogKlassAlignmentInBytes <= 3);
}
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
浏览文件 @
85da33de
...
...
@@ -230,7 +230,7 @@ ConcurrentMarkSweepGeneration::ConcurrentMarkSweepGeneration(
// depends on this property.
debug_only
(
FreeChunk
*
junk
=
NULL
;
assert
(
UseCompressed
K
lassPointers
||
assert
(
UseCompressed
C
lassPointers
||
junk
->
prev_addr
()
==
(
void
*
)(
oop
(
junk
)
->
klass_addr
()),
"Offset of FreeChunk::_prev within FreeChunk must match"
" that of OopDesc::_klass within OopDesc"
);
...
...
@@ -1407,7 +1407,7 @@ ConcurrentMarkSweepGeneration::par_promote(int thread_num,
assert
(
!
((
FreeChunk
*
)
obj_ptr
)
->
is_free
(),
"Error, block will look free but show wrong size"
);
OrderAccess
::
storestore
();
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
// Copy gap missed by (aligned) header size calculation below
obj
->
set_klass_gap
(
old
->
klass_gap
());
}
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/memory/metaspace.cpp
浏览文件 @
85da33de
...
...
@@ -423,7 +423,7 @@ class VirtualSpaceList : public CHeapObj<mtClass> {
// Can this virtual list allocate >1 spaces? Also, used to determine
// whether to allocate unlimited small chunks in this virtual space
bool
_is_class
;
bool
can_grow
()
const
{
return
!
is_class
()
||
!
UseCompressed
K
lassPointers
;
}
bool
can_grow
()
const
{
return
!
is_class
()
||
!
UseCompressed
C
lassPointers
;
}
// Sum of space in all virtual spaces and number of virtual spaces
size_t
_virtual_space_total
;
...
...
@@ -2836,7 +2836,7 @@ void Metaspace::set_narrow_klass_base_and_shift(address metaspace_base, address
// to work with compressed klass pointers.
bool
Metaspace
::
can_use_cds_with_metaspace_addr
(
char
*
metaspace_base
,
address
cds_base
)
{
assert
(
cds_base
!=
0
&&
UseSharedSpaces
,
"Only use with CDS"
);
assert
(
UseCompressed
K
lassPointers
,
"Only use with CompressedKlassPtrs"
);
assert
(
UseCompressed
C
lassPointers
,
"Only use with CompressedKlassPtrs"
);
address
lower_base
=
MIN2
((
address
)
metaspace_base
,
cds_base
);
address
higher_address
=
MAX2
((
address
)(
cds_base
+
FileMapInfo
::
shared_spaces_size
()),
(
address
)(
metaspace_base
+
class_metaspace_size
()));
...
...
@@ -2846,7 +2846,7 @@ bool Metaspace::can_use_cds_with_metaspace_addr(char* metaspace_base, address cd
// Try to allocate the metaspace at the requested addr.
void
Metaspace
::
allocate_metaspace_compressed_klass_ptrs
(
char
*
requested_addr
,
address
cds_base
)
{
assert
(
using_class_space
(),
"called improperly"
);
assert
(
UseCompressed
K
lassPointers
,
"Only use with CompressedKlassPtrs"
);
assert
(
UseCompressed
C
lassPointers
,
"Only use with CompressedKlassPtrs"
);
assert
(
class_metaspace_size
()
<
KlassEncodingMetaspaceMax
,
"Metaspace size is too big"
);
...
...
@@ -2869,9 +2869,9 @@ void Metaspace::allocate_metaspace_compressed_klass_ptrs(char* requested_addr, a
// If no successful allocation then try to allocate the space anywhere. If
// that fails then OOM doom. At this point we cannot try allocating the
// metaspace as if UseCompressed
K
lassPointers is off because too much
// initialization has happened that depends on UseCompressed
K
lassPointers.
// So, UseCompressed
K
lassPointers cannot be turned off at this point.
// metaspace as if UseCompressed
C
lassPointers is off because too much
// initialization has happened that depends on UseCompressed
C
lassPointers.
// So, UseCompressed
C
lassPointers cannot be turned off at this point.
if
(
!
metaspace_rs
.
is_reserved
())
{
metaspace_rs
=
ReservedSpace
(
class_metaspace_size
(),
os
::
vm_allocation_granularity
(),
false
);
...
...
@@ -2904,12 +2904,12 @@ void Metaspace::allocate_metaspace_compressed_klass_ptrs(char* requested_addr, a
}
}
// For UseCompressed
K
lassPointers the class space is reserved above the top of
// For UseCompressed
C
lassPointers the class space is reserved above the top of
// the Java heap. The argument passed in is at the base of the compressed space.
void
Metaspace
::
initialize_class_space
(
ReservedSpace
rs
)
{
// The reserved space size may be bigger because of alignment, esp with UseLargePages
assert
(
rs
.
size
()
>=
C
lassMetas
paceSize
,
err_msg
(
SIZE_FORMAT
" != "
UINTX_FORMAT
,
rs
.
size
(),
C
lassMetas
paceSize
));
assert
(
rs
.
size
()
>=
C
ompressedClassS
paceSize
,
err_msg
(
SIZE_FORMAT
" != "
UINTX_FORMAT
,
rs
.
size
(),
C
ompressedClassS
paceSize
));
assert
(
using_class_space
(),
"Must be using class space"
);
_class_space_list
=
new
VirtualSpaceList
(
rs
);
}
...
...
@@ -2921,7 +2921,7 @@ void Metaspace::global_initialize() {
int
max_alignment
=
os
::
vm_page_size
();
size_t
cds_total
=
0
;
set_class_metaspace_size
(
align_size_up
(
C
lassMetas
paceSize
,
set_class_metaspace_size
(
align_size_up
(
C
ompressedClassS
paceSize
,
os
::
vm_allocation_granularity
()));
MetaspaceShared
::
set_max_alignment
(
max_alignment
);
...
...
@@ -2941,8 +2941,8 @@ void Metaspace::global_initialize() {
#ifdef _LP64
// Set the compressed klass pointer base so that decoding of these pointers works
// properly when creating the shared archive.
assert
(
UseCompressedOops
&&
UseCompressed
K
lassPointers
,
"UseCompressedOops and UseCompressed
K
lassPointers must be set"
);
assert
(
UseCompressedOops
&&
UseCompressed
C
lassPointers
,
"UseCompressedOops and UseCompressed
C
lassPointers must be set"
);
Universe
::
set_narrow_klass_base
((
address
)
_space_list
->
current_virtual_space
()
->
bottom
());
if
(
TraceMetavirtualspaceAllocation
&&
Verbose
)
{
gclog_or_tty
->
print_cr
(
"Setting_narrow_klass_base to Address: "
PTR_FORMAT
,
...
...
@@ -2979,7 +2979,7 @@ void Metaspace::global_initialize() {
}
#ifdef _LP64
// If UseCompressed
K
lassPointers is set then allocate the metaspace area
// If UseCompressed
C
lassPointers is set then allocate the metaspace area
// above the heap and above the CDS area (if it exists).
if
(
using_class_space
())
{
if
(
UseSharedSpaces
)
{
...
...
@@ -2997,7 +2997,7 @@ void Metaspace::global_initialize() {
// on the medium chunk list. The next chunk will be small and progress
// from there. This size calculated by -version.
_first_class_chunk_word_size
=
MIN2
((
size_t
)
MediumChunk
*
6
,
(
C
lassMetas
paceSize
/
BytesPerWord
)
*
2
);
(
C
ompressedClassS
paceSize
/
BytesPerWord
)
*
2
);
_first_class_chunk_word_size
=
align_word_size_up
(
_first_class_chunk_word_size
);
// Arbitrarily set the initial virtual space to a multiple
// of the boot class loader size.
...
...
@@ -3064,7 +3064,7 @@ size_t Metaspace::align_word_size_up(size_t word_size) {
MetaWord
*
Metaspace
::
allocate
(
size_t
word_size
,
MetadataType
mdtype
)
{
// DumpSharedSpaces doesn't use class metadata area (yet)
// Also, don't use class_vsm() unless UseCompressed
K
lassPointers is true.
// Also, don't use class_vsm() unless UseCompressed
C
lassPointers is true.
if
(
mdtype
==
ClassType
&&
using_class_space
())
{
return
class_vsm
()
->
allocate
(
word_size
);
}
else
{
...
...
@@ -3213,7 +3213,7 @@ Metablock* Metaspace::allocate(ClassLoaderData* loader_data, size_t word_size,
MetaspaceAux
::
dump
(
gclog_or_tty
);
}
// -XX:+HeapDumpOnOutOfMemoryError and -XX:OnOutOfMemoryError support
const
char
*
space_string
=
(
mdtype
==
ClassType
)
?
"C
lass Metadata
space"
:
const
char
*
space_string
=
(
mdtype
==
ClassType
)
?
"C
ompressed class
space"
:
"Metadata space"
;
report_java_out_of_memory
(
space_string
);
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/memory/metaspace.hpp
浏览文件 @
85da33de
...
...
@@ -213,9 +213,9 @@ class Metaspace : public CHeapObj<mtClass> {
void
iterate
(
AllocRecordClosure
*
closure
);
// Return TRUE only if UseCompressed
K
lassPointers is True and DumpSharedSpaces is False.
// Return TRUE only if UseCompressed
C
lassPointers is True and DumpSharedSpaces is False.
static
bool
using_class_space
()
{
return
NOT_LP64
(
false
)
LP64_ONLY
(
UseCompressed
K
lassPointers
&&
!
DumpSharedSpaces
);
return
NOT_LP64
(
false
)
LP64_ONLY
(
UseCompressed
C
lassPointers
&&
!
DumpSharedSpaces
);
}
};
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/memory/metaspaceCounters.cpp
浏览文件 @
85da33de
...
...
@@ -109,7 +109,7 @@ size_t CompressedClassSpaceCounters::calculate_capacity() {
}
void
CompressedClassSpaceCounters
::
update_performance_counters
()
{
if
(
UsePerfData
&&
UseCompressed
K
lassPointers
)
{
if
(
UsePerfData
&&
UseCompressed
C
lassPointers
)
{
assert
(
_perf_counters
!=
NULL
,
"Should be initialized"
);
size_t
capacity
=
calculate_capacity
();
...
...
@@ -125,7 +125,7 @@ void CompressedClassSpaceCounters::initialize_performance_counters() {
assert
(
_perf_counters
==
NULL
,
"Should only be initialized once"
);
const
char
*
ns
=
"compressedclassspace"
;
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
size_t
min_capacity
=
MetaspaceAux
::
min_chunk_size
();
size_t
capacity
=
calculate_capacity
();
size_t
max_capacity
=
MetaspaceAux
::
reserved_in_bytes
(
_class_type
);
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/memory/universe.cpp
浏览文件 @
85da33de
...
...
@@ -1028,7 +1028,7 @@ bool universe_post_init() {
msg
=
java_lang_String
::
create_from_str
(
"Metadata space"
,
CHECK_false
);
java_lang_Throwable
::
set_message
(
Universe
::
_out_of_memory_error_metaspace
,
msg
());
msg
=
java_lang_String
::
create_from_str
(
"C
lass Metadata
space"
,
CHECK_false
);
msg
=
java_lang_String
::
create_from_str
(
"C
ompressed class
space"
,
CHECK_false
);
java_lang_Throwable
::
set_message
(
Universe
::
_out_of_memory_error_class_metaspace
,
msg
());
msg
=
java_lang_String
::
create_from_str
(
"Requested array size exceeds VM limit"
,
CHECK_false
);
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/memory/universe.hpp
浏览文件 @
85da33de
...
...
@@ -181,7 +181,7 @@ class Universe: AllStatic {
// For UseCompressedOops.
static
struct
NarrowPtrStruct
_narrow_oop
;
// For UseCompressed
K
lassPointers.
// For UseCompressed
C
lassPointers.
static
struct
NarrowPtrStruct
_narrow_klass
;
static
address
_narrow_ptrs_base
;
...
...
@@ -229,7 +229,7 @@ class Universe: AllStatic {
_narrow_oop
.
_base
=
base
;
}
static
void
set_narrow_klass_base
(
address
base
)
{
assert
(
UseCompressed
K
lassPointers
,
"no compressed klass ptrs?"
);
assert
(
UseCompressed
C
lassPointers
,
"no compressed klass ptrs?"
);
_narrow_klass
.
_base
=
base
;
}
static
void
set_narrow_oop_use_implicit_null_checks
(
bool
use
)
{
...
...
@@ -353,7 +353,7 @@ class Universe: AllStatic {
static
int
narrow_oop_shift
()
{
return
_narrow_oop
.
_shift
;
}
static
bool
narrow_oop_use_implicit_null_checks
()
{
return
_narrow_oop
.
_use_implicit_null_checks
;
}
// For UseCompressed
K
lassPointers
// For UseCompressed
C
lassPointers
static
address
narrow_klass_base
()
{
return
_narrow_klass
.
_base
;
}
static
bool
is_narrow_klass_base
(
void
*
addr
)
{
return
(
narrow_klass_base
()
==
(
address
)
addr
);
}
static
int
narrow_klass_shift
()
{
return
_narrow_klass
.
_shift
;
}
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/oops/arrayOop.hpp
浏览文件 @
85da33de
...
...
@@ -65,7 +65,7 @@ class arrayOopDesc : public oopDesc {
// declared nonstatic fields in arrayOopDesc if not compressed, otherwise
// it occupies the second half of the _klass field in oopDesc.
static
int
length_offset_in_bytes
()
{
return
UseCompressed
K
lassPointers
?
klass_gap_offset_in_bytes
()
:
return
UseCompressed
C
lassPointers
?
klass_gap_offset_in_bytes
()
:
sizeof
(
arrayOopDesc
);
}
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/oops/instanceOop.hpp
浏览文件 @
85da33de
...
...
@@ -37,9 +37,9 @@ class instanceOopDesc : public oopDesc {
// If compressed, the offset of the fields of the instance may not be aligned.
static
int
base_offset_in_bytes
()
{
// offset computation code breaks if UseCompressed
K
lassPointers
// offset computation code breaks if UseCompressed
C
lassPointers
// only is true
return
(
UseCompressedOops
&&
UseCompressed
K
lassPointers
)
?
return
(
UseCompressedOops
&&
UseCompressed
C
lassPointers
)
?
klass_gap_offset_in_bytes
()
:
sizeof
(
instanceOopDesc
);
}
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/oops/oop.inline.hpp
浏览文件 @
85da33de
...
...
@@ -69,7 +69,7 @@ inline markOop oopDesc::cas_set_mark(markOop new_mark, markOop old_mark) {
}
inline
Klass
*
oopDesc
::
klass
()
const
{
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
return
Klass
::
decode_klass_not_null
(
_metadata
.
_compressed_klass
);
}
else
{
return
_metadata
.
_klass
;
...
...
@@ -78,7 +78,7 @@ inline Klass* oopDesc::klass() const {
inline
Klass
*
oopDesc
::
klass_or_null
()
const
volatile
{
// can be NULL in CMS
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
return
Klass
::
decode_klass
(
_metadata
.
_compressed_klass
);
}
else
{
return
_metadata
.
_klass
;
...
...
@@ -86,19 +86,19 @@ inline Klass* oopDesc::klass_or_null() const volatile {
}
inline
int
oopDesc
::
klass_gap_offset_in_bytes
()
{
assert
(
UseCompressed
K
lassPointers
,
"only applicable to compressed klass pointers"
);
assert
(
UseCompressed
C
lassPointers
,
"only applicable to compressed klass pointers"
);
return
oopDesc
::
klass_offset_in_bytes
()
+
sizeof
(
narrowKlass
);
}
inline
Klass
**
oopDesc
::
klass_addr
()
{
// Only used internally and with CMS and will not work with
// UseCompressedOops
assert
(
!
UseCompressed
K
lassPointers
,
"only supported with uncompressed klass pointers"
);
assert
(
!
UseCompressed
C
lassPointers
,
"only supported with uncompressed klass pointers"
);
return
(
Klass
**
)
&
_metadata
.
_klass
;
}
inline
narrowKlass
*
oopDesc
::
compressed_klass_addr
()
{
assert
(
UseCompressed
K
lassPointers
,
"only called by compressed klass pointers"
);
assert
(
UseCompressed
C
lassPointers
,
"only called by compressed klass pointers"
);
return
&
_metadata
.
_compressed_klass
;
}
...
...
@@ -106,7 +106,7 @@ inline void oopDesc::set_klass(Klass* k) {
// since klasses are promoted no store check is needed
assert
(
Universe
::
is_bootstrapping
()
||
k
!=
NULL
,
"must be a real Klass*"
);
assert
(
Universe
::
is_bootstrapping
()
||
k
->
is_klass
(),
"not a Klass*"
);
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
*
compressed_klass_addr
()
=
Klass
::
encode_klass_not_null
(
k
);
}
else
{
*
klass_addr
()
=
k
;
...
...
@@ -118,7 +118,7 @@ inline int oopDesc::klass_gap() const {
}
inline
void
oopDesc
::
set_klass_gap
(
int
v
)
{
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
*
(
int
*
)(((
intptr_t
)
this
)
+
klass_gap_offset_in_bytes
())
=
v
;
}
}
...
...
@@ -126,7 +126,7 @@ inline void oopDesc::set_klass_gap(int v) {
inline
void
oopDesc
::
set_klass_to_list_ptr
(
oop
k
)
{
// This is only to be used during GC, for from-space objects, so no
// barrier is needed.
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
_metadata
.
_compressed_klass
=
(
narrowKlass
)
encode_heap_oop
(
k
);
// may be null (parnew overflow handling)
}
else
{
_metadata
.
_klass
=
(
Klass
*
)(
address
)
k
;
...
...
@@ -135,7 +135,7 @@ inline void oopDesc::set_klass_to_list_ptr(oop k) {
inline
oop
oopDesc
::
list_ptr_from_klass
()
{
// This is only to be used during GC, for from-space objects.
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
return
decode_heap_oop
((
narrowOop
)
_metadata
.
_compressed_klass
);
}
else
{
// Special case for GC
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/opto/cfgnode.cpp
浏览文件 @
85da33de
...
...
@@ -1932,7 +1932,7 @@ Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) {
#ifdef _LP64
// Push DecodeN/DecodeNKlass down through phi.
// The rest of phi graph will transform by split EncodeP node though phis up.
if
((
UseCompressedOops
||
UseCompressed
K
lassPointers
)
&&
can_reshape
&&
progress
==
NULL
)
{
if
((
UseCompressedOops
||
UseCompressed
C
lassPointers
)
&&
can_reshape
&&
progress
==
NULL
)
{
bool
may_push
=
true
;
bool
has_decodeN
=
false
;
bool
is_decodeN
=
false
;
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/opto/compile.cpp
浏览文件 @
85da33de
...
...
@@ -2631,7 +2631,7 @@ void Compile::final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc) {
addp
->
in
(
AddPNode
::
Base
)
==
n
->
in
(
AddPNode
::
Base
),
"Base pointers must match"
);
#ifdef _LP64
if
((
UseCompressedOops
||
UseCompressed
K
lassPointers
)
&&
if
((
UseCompressedOops
||
UseCompressed
C
lassPointers
)
&&
addp
->
Opcode
()
==
Op_ConP
&&
addp
==
n
->
in
(
AddPNode
::
Base
)
&&
n
->
in
(
AddPNode
::
Offset
)
->
is_Con
())
{
...
...
@@ -3018,7 +3018,7 @@ void Compile::final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_
// Skip next transformation if compressed oops are not used.
if
((
UseCompressedOops
&&
!
Matcher
::
gen_narrow_oop_implicit_null_checks
())
||
(
!
UseCompressedOops
&&
!
UseCompressed
K
lassPointers
))
(
!
UseCompressedOops
&&
!
UseCompressed
C
lassPointers
))
return
;
// Go over safepoints nodes to skip DecodeN/DecodeNKlass nodes for debug edges.
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/opto/connode.cpp
浏览文件 @
85da33de
...
...
@@ -630,7 +630,7 @@ const Type *EncodePKlassNode::Value( PhaseTransform *phase ) const {
if
(
t
==
Type
::
TOP
)
return
Type
::
TOP
;
assert
(
t
!=
TypePtr
::
NULL_PTR
,
"null klass?"
);
assert
(
UseCompressed
K
lassPointers
&&
t
->
isa_klassptr
(),
"only klass ptr here"
);
assert
(
UseCompressed
C
lassPointers
&&
t
->
isa_klassptr
(),
"only klass ptr here"
);
return
t
->
make_narrowklass
();
}
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/opto/library_call.cpp
浏览文件 @
85da33de
...
...
@@ -4199,7 +4199,7 @@ void LibraryCallKit::copy_to_clone(Node* obj, Node* alloc_obj, Node* obj_size, b
// 12 - 64-bit VM, compressed klass
// 16 - 64-bit VM, normal klass
if
(
base_off
%
BytesPerLong
!=
0
)
{
assert
(
UseCompressed
K
lassPointers
,
""
);
assert
(
UseCompressed
C
lassPointers
,
""
);
if
(
is_array
)
{
// Exclude length to copy by 8 bytes words.
base_off
+=
sizeof
(
int
);
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/opto/live.cpp
浏览文件 @
85da33de
...
...
@@ -321,7 +321,7 @@ void PhaseChaitin::verify_base_ptrs( ResourceArea *a ) const {
#ifdef _LP64
UseCompressedOops
&&
check
->
as_Mach
()
->
ideal_Opcode
()
==
Op_CastPP
||
UseCompressedOops
&&
check
->
as_Mach
()
->
ideal_Opcode
()
==
Op_DecodeN
||
UseCompressed
K
lassPointers
&&
check
->
as_Mach
()
->
ideal_Opcode
()
==
Op_DecodeNKlass
||
UseCompressed
C
lassPointers
&&
check
->
as_Mach
()
->
ideal_Opcode
()
==
Op_DecodeNKlass
||
#endif
check
->
as_Mach
()
->
ideal_Opcode
()
==
Op_LoadP
||
check
->
as_Mach
()
->
ideal_Opcode
()
==
Op_LoadKlass
))
{
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/opto/macro.cpp
浏览文件 @
85da33de
...
...
@@ -2191,7 +2191,7 @@ void PhaseMacroExpand::expand_lock_node(LockNode *lock) {
Node
*
k_adr
=
basic_plus_adr
(
obj
,
oopDesc
::
klass_offset_in_bytes
());
klass_node
=
transform_later
(
LoadKlassNode
::
make
(
_igvn
,
mem
,
k_adr
,
_igvn
.
type
(
k_adr
)
->
is_ptr
())
);
#ifdef _LP64
if
(
UseCompressed
K
lassPointers
&&
klass_node
->
is_DecodeNKlass
())
{
if
(
UseCompressed
C
lassPointers
&&
klass_node
->
is_DecodeNKlass
())
{
assert
(
klass_node
->
in
(
1
)
->
Opcode
()
==
Op_LoadNKlass
,
"sanity"
);
klass_node
->
in
(
1
)
->
init_req
(
0
,
ctrl
);
}
else
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/opto/memnode.cpp
浏览文件 @
85da33de
...
...
@@ -1971,7 +1971,7 @@ Node *LoadKlassNode::make( PhaseGVN& gvn, Node *mem, Node *adr, const TypePtr* a
assert
(
adr_type
!=
NULL
,
"expecting TypeKlassPtr"
);
#ifdef _LP64
if
(
adr_type
->
is_ptr_to_narrowklass
())
{
assert
(
UseCompressed
K
lassPointers
,
"no compressed klasses"
);
assert
(
UseCompressed
C
lassPointers
,
"no compressed klasses"
);
Node
*
load_klass
=
gvn
.
transform
(
new
(
C
)
LoadNKlassNode
(
ctl
,
mem
,
adr
,
at
,
tk
->
make_narrowklass
()));
return
new
(
C
)
DecodeNKlassNode
(
load_klass
,
load_klass
->
bottom_type
()
->
make_ptr
());
}
...
...
@@ -2309,7 +2309,7 @@ StoreNode* StoreNode::make( PhaseGVN& gvn, Node* ctl, Node* mem, Node* adr, cons
val
=
gvn
.
transform
(
new
(
C
)
EncodePNode
(
val
,
val
->
bottom_type
()
->
make_narrowoop
()));
return
new
(
C
)
StoreNNode
(
ctl
,
mem
,
adr
,
adr_type
,
val
);
}
else
if
(
adr
->
bottom_type
()
->
is_ptr_to_narrowklass
()
||
(
UseCompressed
K
lassPointers
&&
val
->
bottom_type
()
->
isa_klassptr
()
&&
(
UseCompressed
C
lassPointers
&&
val
->
bottom_type
()
->
isa_klassptr
()
&&
adr
->
bottom_type
()
->
isa_rawptr
()))
{
val
=
gvn
.
transform
(
new
(
C
)
EncodePKlassNode
(
val
,
val
->
bottom_type
()
->
make_narrowklass
()));
return
new
(
C
)
StoreNKlassNode
(
ctl
,
mem
,
adr
,
adr_type
,
val
);
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/opto/type.cpp
浏览文件 @
85da33de
...
...
@@ -2381,7 +2381,7 @@ TypeOopPtr::TypeOopPtr( TYPES t, PTR ptr, ciKlass* k, bool xk, ciObject* o, int
#ifdef _LP64
if
(
_offset
!=
0
)
{
if
(
_offset
==
oopDesc
::
klass_offset_in_bytes
())
{
_is_ptr_to_narrowklass
=
UseCompressed
K
lassPointers
;
_is_ptr_to_narrowklass
=
UseCompressed
C
lassPointers
;
}
else
if
(
klass
()
==
NULL
)
{
// Array with unknown body type
assert
(
this
->
isa_aryptr
(),
"only arrays without klass"
);
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/runtime/arguments.cpp
浏览文件 @
85da33de
...
...
@@ -1439,7 +1439,7 @@ void Arguments::set_use_compressed_oops() {
if
(
UseCompressedOops
&&
!
FLAG_IS_DEFAULT
(
UseCompressedOops
))
{
warning
(
"Max heap size too large for Compressed Oops"
);
FLAG_SET_DEFAULT
(
UseCompressedOops
,
false
);
FLAG_SET_DEFAULT
(
UseCompressed
K
lassPointers
,
false
);
FLAG_SET_DEFAULT
(
UseCompressed
C
lassPointers
,
false
);
}
}
#endif // _LP64
...
...
@@ -1452,22 +1452,22 @@ void Arguments::set_use_compressed_oops() {
void
Arguments
::
set_use_compressed_klass_ptrs
()
{
#ifndef ZERO
#ifdef _LP64
// UseCompressedOops must be on for UseCompressed
K
lassPointers to be on.
// UseCompressedOops must be on for UseCompressed
C
lassPointers to be on.
if
(
!
UseCompressedOops
)
{
if
(
UseCompressed
K
lassPointers
)
{
warning
(
"UseCompressed
K
lassPointers requires UseCompressedOops"
);
if
(
UseCompressed
C
lassPointers
)
{
warning
(
"UseCompressed
C
lassPointers requires UseCompressedOops"
);
}
FLAG_SET_DEFAULT
(
UseCompressed
K
lassPointers
,
false
);
FLAG_SET_DEFAULT
(
UseCompressed
C
lassPointers
,
false
);
}
else
{
// Turn on UseCompressed
K
lassPointers too
if
(
FLAG_IS_DEFAULT
(
UseCompressed
K
lassPointers
))
{
FLAG_SET_ERGO
(
bool
,
UseCompressed
K
lassPointers
,
true
);
}
// Check the C
lassMetas
paceSize to make sure we use compressed klass ptrs.
if
(
UseCompressed
K
lassPointers
)
{
if
(
C
lassMetas
paceSize
>
KlassEncodingMetaspaceMax
)
{
warning
(
"C
lass metaspace size is too large for UseCompressedK
lassPointers"
);
FLAG_SET_DEFAULT
(
UseCompressed
K
lassPointers
,
false
);
// Turn on UseCompressed
C
lassPointers too
if
(
FLAG_IS_DEFAULT
(
UseCompressed
C
lassPointers
))
{
FLAG_SET_ERGO
(
bool
,
UseCompressed
C
lassPointers
,
true
);
}
// Check the C
ompressedClassS
paceSize to make sure we use compressed klass ptrs.
if
(
UseCompressed
C
lassPointers
)
{
if
(
C
ompressedClassS
paceSize
>
KlassEncodingMetaspaceMax
)
{
warning
(
"C
ompressedClassSpaceSize is too large for UseCompressedC
lassPointers"
);
FLAG_SET_DEFAULT
(
UseCompressed
C
lassPointers
,
false
);
}
}
}
...
...
@@ -2148,8 +2148,8 @@ bool Arguments::check_vm_args_consistency() {
status
=
status
&&
verify_object_alignment
();
status
=
status
&&
verify_interval
(
C
lassMetas
paceSize
,
1
*
M
,
3
*
G
,
"C
lassMetas
paceSize"
);
status
=
status
&&
verify_interval
(
C
ompressedClassS
paceSize
,
1
*
M
,
3
*
G
,
"C
ompressedClassS
paceSize"
);
status
=
status
&&
verify_interval
(
MarkStackSizeMax
,
1
,
(
max_jint
-
1
),
"MarkStackSizeMax"
);
...
...
@@ -3274,13 +3274,13 @@ void Arguments::set_shared_spaces_flags() {
}
UseSharedSpaces
=
false
;
#ifdef _LP64
if
(
!
UseCompressedOops
||
!
UseCompressed
K
lassPointers
)
{
if
(
!
UseCompressedOops
||
!
UseCompressed
C
lassPointers
)
{
vm_exit_during_initialization
(
"Cannot dump shared archive when UseCompressedOops or UseCompressed
K
lassPointers is off."
,
NULL
);
"Cannot dump shared archive when UseCompressedOops or UseCompressed
C
lassPointers is off."
,
NULL
);
}
}
else
{
// UseCompressedOops and UseCompressed
K
lassPointers must be on for UseSharedSpaces.
if
(
!
UseCompressedOops
||
!
UseCompressed
K
lassPointers
)
{
// UseCompressedOops and UseCompressed
C
lassPointers must be on for UseSharedSpaces.
if
(
!
UseCompressedOops
||
!
UseCompressed
C
lassPointers
)
{
no_shared_spaces
();
}
#endif
...
...
@@ -3581,7 +3581,7 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
FLAG_SET_DEFAULT
(
ProfileInterpreter
,
false
);
FLAG_SET_DEFAULT
(
UseBiasedLocking
,
false
);
LP64_ONLY
(
FLAG_SET_DEFAULT
(
UseCompressedOops
,
false
));
LP64_ONLY
(
FLAG_SET_DEFAULT
(
UseCompressed
K
lassPointers
,
false
));
LP64_ONLY
(
FLAG_SET_DEFAULT
(
UseCompressed
C
lassPointers
,
false
));
#endif // CC_INTERP
#ifdef COMPILER2
...
...
@@ -3610,6 +3610,10 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
DebugNonSafepoints
=
true
;
}
if
(
FLAG_IS_CMDLINE
(
CompressedClassSpaceSize
)
&&
!
UseCompressedClassPointers
)
{
warning
(
"Setting CompressedClassSpaceSize has no effect when compressed class pointers are not used"
);
}
#ifndef PRODUCT
if
(
CompileTheWorld
)
{
// Force NmethodSweeper to sweep whole CodeCache each time.
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/runtime/globals.hpp
浏览文件 @
85da33de
...
...
@@ -443,8 +443,8 @@ class CommandLineFlags {
"Use 32-bit object references in 64-bit VM " \
"lp64_product means flag is always constant in 32 bit VM") \
\
lp64_product(bool, UseCompressed
K
lassPointers, false, \
"Use 32-bit
k
lass pointers in 64-bit VM " \
lp64_product(bool, UseCompressed
C
lassPointers, false, \
"Use 32-bit
c
lass pointers in 64-bit VM " \
"lp64_product means flag is always constant in 32 bit VM") \
\
notproduct(bool, CheckCompressedOops, true, \
...
...
@@ -3039,9 +3039,9 @@ class CommandLineFlags {
product(uintx, MaxMetaspaceSize, max_uintx, \
"Maximum size of Metaspaces (in bytes)") \
\
product(uintx, C
lassMetaspaceSize, 1*G,
\
"Maximum size of
InstanceKlass area in Metaspace used for "
\
"
UseCompressedKlassPointers")
\
product(uintx, C
ompressedClassSpaceSize, 1*G,
\
"Maximum size of
class area in Metaspace when compressed "
\
"
class pointers are used")
\
\
product(uintx, MinHeapFreeRatio, 40, \
"Min percentage of heap free after GC to avoid expansion") \
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/services/memoryPool.cpp
浏览文件 @
85da33de
...
...
@@ -280,7 +280,7 @@ size_t MetaspacePool::calculate_max_size() const {
}
CompressedKlassSpacePool
::
CompressedKlassSpacePool
()
:
MemoryPool
(
"Compressed Class Space"
,
NonHeap
,
capacity_in_bytes
(),
C
lassMetas
paceSize
,
true
,
false
)
{
}
MemoryPool
(
"Compressed Class Space"
,
NonHeap
,
capacity_in_bytes
(),
C
ompressedClassS
paceSize
,
true
,
false
)
{
}
size_t
CompressedKlassSpacePool
::
used_in_bytes
()
{
return
MetaspaceAux
::
allocated_used_bytes
(
Metaspace
::
ClassType
);
...
...
This diff is collapsed.
Click to expand it.
src/share/vm/services/memoryService.cpp
浏览文件 @
85da33de
...
...
@@ -409,7 +409,7 @@ void MemoryService::add_metaspace_memory_pools() {
mgr
->
add_pool
(
_metaspace_pool
);
_pools_list
->
append
(
_metaspace_pool
);
if
(
UseCompressed
K
lassPointers
)
{
if
(
UseCompressed
C
lassPointers
)
{
_compressed_class_pool
=
new
CompressedKlassSpacePool
();
mgr
->
add_pool
(
_compressed_class_pool
);
_pools_list
->
append
(
_compressed_class_pool
);
...
...
This diff is collapsed.
Click to expand it.
test/gc/arguments/TestCompressedClassFlags.java
0 → 100644
浏览文件 @
85da33de
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import
com.oracle.java.testlibrary.*
;
/*
* @test
* @bug 8015107
* @summary Tests that VM prints a warning when -XX:CompressedClassSpaceSize
* is used together with -XX:-UseCompressedClassPointers
* @library /testlibrary
*/
public
class
TestCompressedClassFlags
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
if
(
Platform
.
is64bit
())
{
OutputAnalyzer
output
=
runJava
(
"-XX:CompressedClassSpaceSize=1g"
,
"-XX:-UseCompressedClassPointers"
,
"-version"
);
output
.
shouldContain
(
"warning"
);
output
.
shouldNotContain
(
"error"
);
output
.
shouldHaveExitValue
(
0
);
}
}
private
static
OutputAnalyzer
runJava
(
String
...
args
)
throws
Exception
{
ProcessBuilder
pb
=
ProcessTools
.
createJavaProcessBuilder
(
args
);
return
new
OutputAnalyzer
(
pb
.
start
());
}
}
This diff is collapsed.
Click to expand it.
test/gc/metaspace/C
lassMetas
paceSizeInJmapHeap.java
→
test/gc/metaspace/C
ompressedClassS
paceSizeInJmapHeap.java
浏览文件 @
85da33de
...
...
@@ -22,11 +22,11 @@
*/
/*
* @test C
lassMetas
paceSizeInJmapHeap
* @test C
ompressedClassS
paceSizeInJmapHeap
* @bug 8004924
* @summary Checks that jmap -heap contains the flag C
lassMetas
paceSize
* @summary Checks that jmap -heap contains the flag C
ompressedClassS
paceSize
* @library /testlibrary
* @run main/othervm -XX:C
lassMetaspaceSize=50m ClassMetas
paceSizeInJmapHeap
* @run main/othervm -XX:C
ompressedClassSpaceSize=50m CompressedClassS
paceSizeInJmapHeap
*/
import
com.oracle.java.testlibrary.*
;
...
...
@@ -35,7 +35,7 @@ import java.io.File;
import
java.nio.charset.Charset
;
import
java.util.List
;
public
class
C
lassMetas
paceSizeInJmapHeap
{
public
class
C
ompressedClassS
paceSizeInJmapHeap
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
String
pid
=
Integer
.
toString
(
ProcessTools
.
getProcessId
());
...
...
@@ -44,16 +44,16 @@ public class ClassMetaspaceSizeInJmapHeap {
.
addToolArg
(
pid
);
ProcessBuilder
pb
=
new
ProcessBuilder
(
jmap
.
getCommand
());
File
out
=
new
File
(
"C
lassMetas
paceSizeInJmapHeap.stdout.txt"
);
File
out
=
new
File
(
"C
ompressedClassS
paceSizeInJmapHeap.stdout.txt"
);
pb
.
redirectOutput
(
out
);
File
err
=
new
File
(
"C
lassMetas
paceSizeInJmapHeap.stderr.txt"
);
File
err
=
new
File
(
"C
ompressedClassS
paceSizeInJmapHeap.stderr.txt"
);
pb
.
redirectError
(
err
);
run
(
pb
);
OutputAnalyzer
output
=
new
OutputAnalyzer
(
read
(
out
));
output
.
shouldContain
(
"C
lassMetas
paceSize = 52428800 (50.0MB)"
);
output
.
shouldContain
(
"C
ompressedClassS
paceSize = 52428800 (50.0MB)"
);
out
.
delete
();
}
...
...
This diff is collapsed.
Click to expand it.
test/gc/metaspace/TestMetaspaceMemoryPool.java
浏览文件 @
85da33de
...
...
@@ -36,8 +36,8 @@ import java.lang.management.ManagementFactory;
* MemoryManagerMXBean is created.
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops TestMetaspaceMemoryPool
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:MaxMetaspaceSize=60m TestMetaspaceMemoryPool
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressed
K
lassPointers TestMetaspaceMemoryPool
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressed
KlassPointers -XX:ClassMetas
paceSize=60m TestMetaspaceMemoryPool
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressed
C
lassPointers TestMetaspaceMemoryPool
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressed
ClassPointers -XX:CompressedClassS
paceSize=60m TestMetaspaceMemoryPool
*/
public
class
TestMetaspaceMemoryPool
{
public
static
void
main
(
String
[]
args
)
{
...
...
This diff is collapsed.
Click to expand it.
test/gc/metaspace/TestMetaspacePerfCounters.java
浏览文件 @
85da33de
...
...
@@ -33,13 +33,13 @@ import static com.oracle.java.testlibrary.Asserts.*;
* @summary Tests that performance counters for metaspace and compressed class
* space exists and works.
*
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressed
K
lassPointers -XX:+UsePerfData -XX:+UseSerialGC TestMetaspacePerfCounters
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressed
K
lassPointers -XX:+UsePerfData -XX:+UseParallelGC -XX:+UseParallelOldGC TestMetaspacePerfCounters
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressed
K
lassPointers -XX:+UsePerfData -XX:+UseG1GC TestMetaspacePerfCounters
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressed
C
lassPointers -XX:+UsePerfData -XX:+UseSerialGC TestMetaspacePerfCounters
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressed
C
lassPointers -XX:+UsePerfData -XX:+UseParallelGC -XX:+UseParallelOldGC TestMetaspacePerfCounters
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressed
C
lassPointers -XX:+UsePerfData -XX:+UseG1GC TestMetaspacePerfCounters
*
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressed
K
lassPointers -XX:+UsePerfData -XX:+UseSerialGC TestMetaspacePerfCounters
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressed
K
lassPointers -XX:+UsePerfData -XX:+UseParallelGC -XX:+UseParallelOldGC TestMetaspacePerfCounters
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressed
K
lassPointers -XX:+UsePerfData -XX:+UseG1GC TestMetaspacePerfCounters
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressed
C
lassPointers -XX:+UsePerfData -XX:+UseSerialGC TestMetaspacePerfCounters
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressed
C
lassPointers -XX:+UsePerfData -XX:+UseParallelGC -XX:+UseParallelOldGC TestMetaspacePerfCounters
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressed
C
lassPointers -XX:+UsePerfData -XX:+UseG1GC TestMetaspacePerfCounters
*/
public
class
TestMetaspacePerfCounters
{
public
static
Class
fooClass
=
null
;
...
...
@@ -99,6 +99,6 @@ public class TestMetaspacePerfCounters {
}
private
static
boolean
isUsingCompressedClassPointers
()
{
return
Platform
.
is64bit
()
&&
InputArguments
.
contains
(
"-XX:+UseCompressed
K
lassPointers"
);
return
Platform
.
is64bit
()
&&
InputArguments
.
contains
(
"-XX:+UseCompressed
C
lassPointers"
);
}
}
This diff is collapsed.
Click to expand it.
test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java
浏览文件 @
85da33de
...
...
@@ -24,7 +24,7 @@
/*
* @test
* @bug 8003424
* @summary Testing UseCompressed
K
lassPointers with CDS
* @summary Testing UseCompressed
C
lassPointers with CDS
* @library /testlibrary
* @run main CDSCompressedKPtrs
*/
...
...
@@ -36,7 +36,7 @@ public class CDSCompressedKPtrs {
ProcessBuilder
pb
;
if
(
Platform
.
is64bit
())
{
pb
=
ProcessTools
.
createJavaProcessBuilder
(
"-XX:+UseCompressed
K
lassPointers"
,
"-XX:+UseCompressedOops"
,
"-XX:+UseCompressed
C
lassPointers"
,
"-XX:+UseCompressedOops"
,
"-XX:+UnlockDiagnosticVMOptions"
,
"-XX:SharedArchiveFile=./sample.jsa"
,
"-Xshare:dump"
);
OutputAnalyzer
output
=
new
OutputAnalyzer
(
pb
.
start
());
try
{
...
...
@@ -44,7 +44,7 @@ public class CDSCompressedKPtrs {
output
.
shouldHaveExitValue
(
0
);
pb
=
ProcessTools
.
createJavaProcessBuilder
(
"-XX:+UseCompressed
K
lassPointers"
,
"-XX:+UseCompressedOops"
,
"-XX:+UseCompressed
C
lassPointers"
,
"-XX:+UseCompressedOops"
,
"-XX:+UnlockDiagnosticVMOptions"
,
"-XX:SharedArchiveFile=./sample.jsa"
,
"-Xshare:on"
,
"-version"
);
output
=
new
OutputAnalyzer
(
pb
.
start
());
output
.
shouldContain
(
"sharing"
);
...
...
This diff is collapsed.
Click to expand it.
test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrsError.java
浏览文件 @
85da33de
...
...
@@ -24,7 +24,7 @@
/*
* @test
* @bug 8003424
* @summary Test that cannot use CDS if UseCompressed
K
lassPointers is turned off.
* @summary Test that cannot use CDS if UseCompressed
C
lassPointers is turned off.
* @library /testlibrary
* @run main CDSCompressedKPtrsError
*/
...
...
@@ -36,7 +36,7 @@ public class CDSCompressedKPtrsError {
ProcessBuilder
pb
;
if
(
Platform
.
is64bit
())
{
pb
=
ProcessTools
.
createJavaProcessBuilder
(
"-XX:+UseCompressedOops"
,
"-XX:+UseCompressed
K
lassPointers"
,
"-XX:+UnlockDiagnosticVMOptions"
,
"-XX:+UseCompressedOops"
,
"-XX:+UseCompressed
C
lassPointers"
,
"-XX:+UnlockDiagnosticVMOptions"
,
"-XX:SharedArchiveFile=./sample.jsa"
,
"-Xshare:dump"
);
OutputAnalyzer
output
=
new
OutputAnalyzer
(
pb
.
start
());
try
{
...
...
@@ -44,21 +44,21 @@ public class CDSCompressedKPtrsError {
output
.
shouldHaveExitValue
(
0
);
pb
=
ProcessTools
.
createJavaProcessBuilder
(
"-XX:-UseCompressed
K
lassPointers"
,
"-XX:-UseCompressedOops"
,
"-XX:-UseCompressed
C
lassPointers"
,
"-XX:-UseCompressedOops"
,
"-XX:+UnlockDiagnosticVMOptions"
,
"-XX:SharedArchiveFile=./sample.jsa"
,
"-Xshare:on"
,
"-version"
);
output
=
new
OutputAnalyzer
(
pb
.
start
());
output
.
shouldContain
(
"Unable to use shared archive"
);
output
.
shouldHaveExitValue
(
0
);
pb
=
ProcessTools
.
createJavaProcessBuilder
(
"-XX:-UseCompressed
K
lassPointers"
,
"-XX:+UseCompressedOops"
,
"-XX:-UseCompressed
C
lassPointers"
,
"-XX:+UseCompressedOops"
,
"-XX:+UnlockDiagnosticVMOptions"
,
"-XX:SharedArchiveFile=./sample.jsa"
,
"-Xshare:on"
,
"-version"
);
output
=
new
OutputAnalyzer
(
pb
.
start
());
output
.
shouldContain
(
"Unable to use shared archive"
);
output
.
shouldHaveExitValue
(
0
);
pb
=
ProcessTools
.
createJavaProcessBuilder
(
"-XX:+UseCompressed
K
lassPointers"
,
"-XX:-UseCompressedOops"
,
"-XX:+UseCompressed
C
lassPointers"
,
"-XX:-UseCompressedOops"
,
"-XX:+UnlockDiagnosticVMOptions"
,
"-XX:SharedArchiveFile=./sample.jsa"
,
"-Xshare:on"
,
"-version"
);
output
=
new
OutputAnalyzer
(
pb
.
start
());
output
.
shouldContain
(
"Unable to use shared archive"
);
...
...
@@ -71,19 +71,19 @@ public class CDSCompressedKPtrsError {
// Test bad options with -Xshare:dump.
pb
=
ProcessTools
.
createJavaProcessBuilder
(
"-XX:-UseCompressedOops"
,
"-XX:+UseCompressed
K
lassPointers"
,
"-XX:+UnlockDiagnosticVMOptions"
,
"-XX:-UseCompressedOops"
,
"-XX:+UseCompressed
C
lassPointers"
,
"-XX:+UnlockDiagnosticVMOptions"
,
"-XX:SharedArchiveFile=./sample.jsa"
,
"-Xshare:dump"
);
output
=
new
OutputAnalyzer
(
pb
.
start
());
output
.
shouldContain
(
"Cannot dump shared archive"
);
pb
=
ProcessTools
.
createJavaProcessBuilder
(
"-XX:+UseCompressedOops"
,
"-XX:-UseCompressed
K
lassPointers"
,
"-XX:+UnlockDiagnosticVMOptions"
,
"-XX:+UseCompressedOops"
,
"-XX:-UseCompressed
C
lassPointers"
,
"-XX:+UnlockDiagnosticVMOptions"
,
"-XX:SharedArchiveFile=./sample.jsa"
,
"-Xshare:dump"
);
output
=
new
OutputAnalyzer
(
pb
.
start
());
output
.
shouldContain
(
"Cannot dump shared archive"
);
pb
=
ProcessTools
.
createJavaProcessBuilder
(
"-XX:-UseCompressedOops"
,
"-XX:-UseCompressed
K
lassPointers"
,
"-XX:+UnlockDiagnosticVMOptions"
,
"-XX:-UseCompressedOops"
,
"-XX:-UseCompressed
C
lassPointers"
,
"-XX:+UnlockDiagnosticVMOptions"
,
"-XX:SharedArchiveFile=./sample.jsa"
,
"-Xshare:dump"
);
output
=
new
OutputAnalyzer
(
pb
.
start
());
output
.
shouldContain
(
"Cannot dump shared archive"
);
...
...
This diff is collapsed.
Click to expand it.
test/runtime/CompressedOops/CompressedKlassPointerAndOops.java
浏览文件 @
85da33de
...
...
@@ -25,7 +25,7 @@
* @test
* @bug 8000968
* @key regression
* @summary NPG: UseCompressed
K
lassPointers asserts with ObjectAlignmentInBytes=32
* @summary NPG: UseCompressed
C
lassPointers asserts with ObjectAlignmentInBytes=32
* @library /testlibrary
*/
...
...
@@ -52,7 +52,7 @@ public class CompressedKlassPointerAndOops {
OutputAnalyzer
output
;
pb
=
ProcessTools
.
createJavaProcessBuilder
(
"-XX:+UseCompressed
K
lassPointers"
,
"-XX:+UseCompressed
C
lassPointers"
,
"-XX:+UseCompressedOops"
,
"-XX:ObjectAlignmentInBytes="
+
alignment
,
"-version"
);
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
反馈
建议
客服
返回
顶部