Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
d6ea363e
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看板
提交
d6ea363e
编写于
12月 08, 2015
作者:
K
kevinw
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
353676bc
c9c6749f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
53 addition
and
37 deletion
+53
-37
src/share/vm/memory/universe.cpp
src/share/vm/memory/universe.cpp
+25
-24
src/share/vm/memory/universe.hpp
src/share/vm/memory/universe.hpp
+2
-0
test/testlibrary/com/oracle/java/testlibrary/OutputAnalyzer.java
...stlibrary/com/oracle/java/testlibrary/OutputAnalyzer.java
+26
-13
未找到文件。
src/share/vm/memory/universe.cpp
浏览文件 @
d6ea363e
...
...
@@ -847,12 +847,6 @@ jint Universe::initialize_heap() {
// See needs_explicit_null_check.
// Only set the heap base for compressed oops because it indicates
// compressed oops for pstack code.
bool
verbose
=
PrintCompressedOopsMode
||
(
PrintMiscellaneous
&&
Verbose
);
if
(
verbose
)
{
tty
->
cr
();
tty
->
print
(
"heap address: "
PTR_FORMAT
", size: "
SIZE_FORMAT
" MB"
,
Universe
::
heap
()
->
base
(),
Universe
::
heap
()
->
reserved_region
().
byte_size
()
/
M
);
}
if
(((
uint64_t
)
Universe
::
heap
()
->
reserved_region
().
end
()
>
OopEncodingHeapMax
))
{
// Can't reserve heap below 32Gb.
// keep the Universe::narrow_oop_base() set in Universe::reserve_heap()
...
...
@@ -862,16 +856,8 @@ jint Universe::initialize_heap() {
// are decoded so that NULL is preserved, so this page will not be accessed.
Universe
::
set_narrow_oop_use_implicit_null_checks
(
false
);
#endif
if
(
verbose
)
{
tty
->
print
(
", %s: "
PTR_FORMAT
,
narrow_oop_mode_to_string
(
HeapBasedNarrowOop
),
Universe
::
narrow_oop_base
());
}
}
else
{
Universe
::
set_narrow_oop_base
(
0
);
if
(
verbose
)
{
tty
->
print
(
", %s"
,
narrow_oop_mode_to_string
(
ZeroBasedNarrowOop
));
}
#ifdef _WIN64
if
(
!
Universe
::
narrow_oop_use_implicit_null_checks
())
{
// Don't need guard page for implicit checks in indexed addressing
...
...
@@ -884,17 +870,14 @@ jint Universe::initialize_heap() {
Universe
::
set_narrow_oop_shift
(
LogMinObjAlignmentInBytes
);
}
else
{
Universe
::
set_narrow_oop_shift
(
0
);
if
(
verbose
)
{
tty
->
print
(
", %s"
,
narrow_oop_mode_to_string
(
UnscaledNarrowOop
));
}
}
}
if
(
verbose
)
{
tty
->
cr
();
tty
->
cr
();
}
Universe
::
set_narrow_ptrs_base
(
Universe
::
narrow_oop_base
());
if
(
PrintCompressedOopsMode
||
(
PrintMiscellaneous
&&
Verbose
))
{
Universe
::
print_compressed_oops_mode
();
}
}
// Universe::narrow_oop_base() is one page below the heap.
assert
((
intptr_t
)
Universe
::
narrow_oop_base
()
<=
(
intptr_t
)(
Universe
::
heap
()
->
base
()
-
...
...
@@ -915,6 +898,24 @@ jint Universe::initialize_heap() {
return
JNI_OK
;
}
void
Universe
::
print_compressed_oops_mode
()
{
tty
->
cr
();
tty
->
print
(
"heap address: "
PTR_FORMAT
", size: "
SIZE_FORMAT
" MB"
,
Universe
::
heap
()
->
base
(),
Universe
::
heap
()
->
reserved_region
().
byte_size
()
/
M
);
tty
->
print
(
", Compressed Oops mode: %s"
,
narrow_oop_mode_to_string
(
narrow_oop_mode
()));
if
(
Universe
::
narrow_oop_base
()
!=
0
)
{
tty
->
print
(
":"
PTR_FORMAT
,
Universe
::
narrow_oop_base
());
}
if
(
Universe
::
narrow_oop_shift
()
!=
0
)
{
tty
->
print
(
", Oop shift amount: %d"
,
Universe
::
narrow_oop_shift
());
}
tty
->
cr
();
tty
->
cr
();
}
// Reserve the Java heap, which is now the same for all GCs.
ReservedSpace
Universe
::
reserve_heap
(
size_t
heap_size
,
size_t
alignment
)
{
...
...
@@ -984,11 +985,11 @@ void Universe::update_heap_info_at_gc() {
const
char
*
Universe
::
narrow_oop_mode_to_string
(
Universe
::
NARROW_OOP_MODE
mode
)
{
switch
(
mode
)
{
case
UnscaledNarrowOop
:
return
"32-bit
s Oops
"
;
return
"32-bit"
;
case
ZeroBasedNarrowOop
:
return
"
zero based Compressed Oops
"
;
return
"
Zero based
"
;
case
HeapBasedNarrowOop
:
return
"
Compressed Oops with base
"
;
return
"
Non-zero based
"
;
}
ShouldNotReachHere
();
...
...
src/share/vm/memory/universe.hpp
浏览文件 @
d6ea363e
...
...
@@ -376,6 +376,8 @@ class Universe: AllStatic {
static
void
set_narrow_ptrs_base
(
address
a
)
{
_narrow_ptrs_base
=
a
;
}
static
address
narrow_ptrs_base
()
{
return
_narrow_ptrs_base
;
}
static
void
print_compressed_oops_mode
();
// this is set in vm_version on sparc (and then reset in universe afaict)
static
void
set_narrow_oop_shift
(
int
shift
)
{
_narrow_oop
.
_shift
=
shift
;
...
...
test/testlibrary/com/oracle/java/testlibrary/OutputAnalyzer.java
浏览文件 @
d6ea363e
...
...
@@ -74,11 +74,12 @@ public final class OutputAnalyzer {
* @param expectedString String that buffer should contain
* @throws RuntimeException If the string was not found
*/
public
void
shouldContain
(
String
expectedString
)
{
public
OutputAnalyzer
shouldContain
(
String
expectedString
)
{
if
(!
stdout
.
contains
(
expectedString
)
&&
!
stderr
.
contains
(
expectedString
))
{
reportDiagnosticSummary
();
throw
new
RuntimeException
(
"'"
+
expectedString
+
"' missing from stdout/stderr \n"
);
}
return
this
;
}
/**
...
...
@@ -87,11 +88,12 @@ public final class OutputAnalyzer {
* @param expectedString String that buffer should contain
* @throws RuntimeException If the string was not found
*/
public
void
stdoutShouldContain
(
String
expectedString
)
{
public
OutputAnalyzer
stdoutShouldContain
(
String
expectedString
)
{
if
(!
stdout
.
contains
(
expectedString
))
{
reportDiagnosticSummary
();
throw
new
RuntimeException
(
"'"
+
expectedString
+
"' missing from stdout \n"
);
}
return
this
;
}
/**
...
...
@@ -100,11 +102,12 @@ public final class OutputAnalyzer {
* @param expectedString String that buffer should contain
* @throws RuntimeException If the string was not found
*/
public
void
stderrShouldContain
(
String
expectedString
)
{
public
OutputAnalyzer
stderrShouldContain
(
String
expectedString
)
{
if
(!
stderr
.
contains
(
expectedString
))
{
reportDiagnosticSummary
();
throw
new
RuntimeException
(
"'"
+
expectedString
+
"' missing from stderr \n"
);
}
return
this
;
}
/**
...
...
@@ -113,7 +116,7 @@ public final class OutputAnalyzer {
* @param expectedString String that the buffer should not contain
* @throws RuntimeException If the string was found
*/
public
void
shouldNotContain
(
String
notExpectedString
)
{
public
OutputAnalyzer
shouldNotContain
(
String
notExpectedString
)
{
if
(
stdout
.
contains
(
notExpectedString
))
{
reportDiagnosticSummary
();
throw
new
RuntimeException
(
"'"
+
notExpectedString
+
"' found in stdout \n"
);
...
...
@@ -122,6 +125,7 @@ public final class OutputAnalyzer {
reportDiagnosticSummary
();
throw
new
RuntimeException
(
"'"
+
notExpectedString
+
"' found in stderr \n"
);
}
return
this
;
}
/**
...
...
@@ -130,11 +134,12 @@ public final class OutputAnalyzer {
* @param expectedString String that the buffer should not contain
* @throws RuntimeException If the string was found
*/
public
void
stdoutShouldNotContain
(
String
notExpectedString
)
{
public
OutputAnalyzer
stdoutShouldNotContain
(
String
notExpectedString
)
{
if
(
stdout
.
contains
(
notExpectedString
))
{
reportDiagnosticSummary
();
throw
new
RuntimeException
(
"'"
+
notExpectedString
+
"' found in stdout \n"
);
}
return
this
;
}
/**
...
...
@@ -143,11 +148,12 @@ public final class OutputAnalyzer {
* @param expectedString String that the buffer should not contain
* @throws RuntimeException If the string was found
*/
public
void
stderrShouldNotContain
(
String
notExpectedString
)
{
public
OutputAnalyzer
stderrShouldNotContain
(
String
notExpectedString
)
{
if
(
stderr
.
contains
(
notExpectedString
))
{
reportDiagnosticSummary
();
throw
new
RuntimeException
(
"'"
+
notExpectedString
+
"' found in stderr \n"
);
}
return
this
;
}
/**
...
...
@@ -157,7 +163,7 @@ public final class OutputAnalyzer {
* @param pattern
* @throws RuntimeException If the pattern was not found
*/
public
void
shouldMatch
(
String
pattern
)
{
public
OutputAnalyzer
shouldMatch
(
String
pattern
)
{
Matcher
stdoutMatcher
=
Pattern
.
compile
(
pattern
,
Pattern
.
MULTILINE
).
matcher
(
stdout
);
Matcher
stderrMatcher
=
Pattern
.
compile
(
pattern
,
Pattern
.
MULTILINE
).
matcher
(
stderr
);
if
(!
stdoutMatcher
.
find
()
&&
!
stderrMatcher
.
find
())
{
...
...
@@ -165,6 +171,7 @@ public final class OutputAnalyzer {
throw
new
RuntimeException
(
"'"
+
pattern
+
"' missing from stdout/stderr \n"
);
}
return
this
;
}
/**
...
...
@@ -174,13 +181,14 @@ public final class OutputAnalyzer {
* @param pattern
* @throws RuntimeException If the pattern was not found
*/
public
void
stdoutShouldMatch
(
String
pattern
)
{
public
OutputAnalyzer
stdoutShouldMatch
(
String
pattern
)
{
Matcher
matcher
=
Pattern
.
compile
(
pattern
,
Pattern
.
MULTILINE
).
matcher
(
stdout
);
if
(!
matcher
.
find
())
{
reportDiagnosticSummary
();
throw
new
RuntimeException
(
"'"
+
pattern
+
"' missing from stdout \n"
);
}
return
this
;
}
/**
...
...
@@ -190,13 +198,14 @@ public final class OutputAnalyzer {
* @param pattern
* @throws RuntimeException If the pattern was not found
*/
public
void
stderrShouldMatch
(
String
pattern
)
{
public
OutputAnalyzer
stderrShouldMatch
(
String
pattern
)
{
Matcher
matcher
=
Pattern
.
compile
(
pattern
,
Pattern
.
MULTILINE
).
matcher
(
stderr
);
if
(!
matcher
.
find
())
{
reportDiagnosticSummary
();
throw
new
RuntimeException
(
"'"
+
pattern
+
"' missing from stderr \n"
);
}
return
this
;
}
/**
...
...
@@ -206,7 +215,7 @@ public final class OutputAnalyzer {
* @param pattern
* @throws RuntimeException If the pattern was found
*/
public
void
shouldNotMatch
(
String
pattern
)
{
public
OutputAnalyzer
shouldNotMatch
(
String
pattern
)
{
Matcher
matcher
=
Pattern
.
compile
(
pattern
,
Pattern
.
MULTILINE
).
matcher
(
stdout
);
if
(
matcher
.
find
())
{
reportDiagnosticSummary
();
...
...
@@ -219,6 +228,7 @@ public final class OutputAnalyzer {
throw
new
RuntimeException
(
"'"
+
pattern
+
"' found in stderr: '"
+
matcher
.
group
()
+
"' \n"
);
}
return
this
;
}
/**
...
...
@@ -228,13 +238,14 @@ public final class OutputAnalyzer {
* @param pattern
* @throws RuntimeException If the pattern was found
*/
public
void
stdoutShouldNotMatch
(
String
pattern
)
{
public
OutputAnalyzer
stdoutShouldNotMatch
(
String
pattern
)
{
Matcher
matcher
=
Pattern
.
compile
(
pattern
,
Pattern
.
MULTILINE
).
matcher
(
stdout
);
if
(
matcher
.
find
())
{
reportDiagnosticSummary
();
throw
new
RuntimeException
(
"'"
+
pattern
+
"' found in stdout \n"
);
}
return
this
;
}
/**
...
...
@@ -244,13 +255,14 @@ public final class OutputAnalyzer {
* @param pattern
* @throws RuntimeException If the pattern was found
*/
public
void
stderrShouldNotMatch
(
String
pattern
)
{
public
OutputAnalyzer
stderrShouldNotMatch
(
String
pattern
)
{
Matcher
matcher
=
Pattern
.
compile
(
pattern
,
Pattern
.
MULTILINE
).
matcher
(
stderr
);
if
(
matcher
.
find
())
{
reportDiagnosticSummary
();
throw
new
RuntimeException
(
"'"
+
pattern
+
"' found in stderr \n"
);
}
return
this
;
}
/**
...
...
@@ -290,12 +302,13 @@ public final class OutputAnalyzer {
* @param expectedExitValue Expected exit value from process
* @throws RuntimeException If the exit value from the process did not match the expected value
*/
public
void
shouldHaveExitValue
(
int
expectedExitValue
)
{
public
OutputAnalyzer
shouldHaveExitValue
(
int
expectedExitValue
)
{
if
(
getExitValue
()
!=
expectedExitValue
)
{
reportDiagnosticSummary
();
throw
new
RuntimeException
(
"Expected to get exit value of ["
+
expectedExitValue
+
"]\n"
);
}
return
this
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录