Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
23c9c5d4
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看板
提交
23c9c5d4
编写于
10月 07, 2010
作者:
B
bobv
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
da458520
10fd53a4
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
56 addition
and
19 deletion
+56
-19
src/os/linux/vm/os_linux.cpp
src/os/linux/vm/os_linux.cpp
+17
-6
src/os/solaris/vm/os_solaris.cpp
src/os/solaris/vm/os_solaris.cpp
+8
-9
src/os/windows/vm/os_windows.cpp
src/os/windows/vm/os_windows.cpp
+16
-2
src/share/vm/runtime/arguments.cpp
src/share/vm/runtime/arguments.cpp
+2
-1
src/share/vm/utilities/exceptions.cpp
src/share/vm/utilities/exceptions.cpp
+13
-1
未找到文件。
src/os/linux/vm/os_linux.cpp
浏览文件 @
23c9c5d4
/*
* Copyright (c) 1999, 20
09
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 20
10
, 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
...
...
@@ -827,8 +827,10 @@ bool os::create_thread(Thread* thread, ThreadType thr_type, size_t stack_size) {
switch
(
thr_type
)
{
case
os
::
java_thread
:
// Java threads use ThreadStackSize which default value can be changed with the flag -Xss
if
(
JavaThread
::
stack_size_at_create
()
>
0
)
stack_size
=
JavaThread
::
stack_size_at_create
();
// Java threads use ThreadStackSize which default value can be
// changed with the flag -Xss
assert
(
JavaThread
::
stack_size_at_create
()
>
0
,
"this should be set"
);
stack_size
=
JavaThread
::
stack_size_at_create
();
break
;
case
os
::
compiler_thread
:
if
(
CompilerThreadStackSize
>
0
)
{
...
...
@@ -3922,12 +3924,21 @@ jint os::init_2(void)
Linux
::
signal_sets_init
();
Linux
::
install_signal_handlers
();
// Check minimum allowable stack size for thread creation and to initialize
// the java system classes, including StackOverflowError - depends on page
// size. Add a page for compiler2 recursion in main thread.
// Add in 2*BytesPerWord times page size to account for VM stack during
// class initialization depending on 32 or 64 bit VM.
os
::
Linux
::
min_stack_allowed
=
MAX2
(
os
::
Linux
::
min_stack_allowed
,
(
size_t
)(
StackYellowPages
+
StackRedPages
+
StackShadowPages
+
2
*
BytesPerWord
COMPILER2_PRESENT
(
+
1
))
*
Linux
::
page_size
());
size_t
threadStackSizeInBytes
=
ThreadStackSize
*
K
;
if
(
threadStackSizeInBytes
!=
0
&&
threadStackSizeInBytes
<
Linux
::
min_stack_allowed
)
{
threadStackSizeInBytes
<
os
::
Linux
::
min_stack_allowed
)
{
tty
->
print_cr
(
"
\n
The stack size specified is too small, "
"Specify at least %dk"
,
Linux
::
min_stack_allowed
/
K
);
os
::
Linux
::
min_stack_allowed
/
K
);
return
JNI_ERR
;
}
...
...
@@ -4839,7 +4850,7 @@ void Parker::park(bool isAbsolute, jlong time) {
// Next, demultiplex/decode time arguments
timespec
absTime
;
if
(
time
<
0
)
{
// don't wait at all
if
(
time
<
0
||
(
isAbsolute
&&
time
==
0
)
)
{
// don't wait at all
return
;
}
if
(
time
>
0
)
{
...
...
src/os/solaris/vm/os_solaris.cpp
浏览文件 @
23c9c5d4
/*
* Copyright (c) 1997, 20
09
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 20
10
, 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
...
...
@@ -4878,18 +4878,17 @@ jint os::init_2(void) {
// Check minimum allowable stack size for thread creation and to initialize
// the java system classes, including StackOverflowError - depends on page
// size. Add a page for compiler2 recursion in main thread.
// Add in BytesPerWord times page size to account for VM stack during
// Add in
2*
BytesPerWord times page size to account for VM stack during
// class initialization depending on 32 or 64 bit VM.
guarantee
((
Solaris
::
min_stack_allowed
>=
(
StackYellowPages
+
StackRedPages
+
StackShadowPages
+
BytesPerWord
COMPILER2_PRESENT
(
+
1
))
*
page_size
),
"need to increase Solaris::min_stack_allowed on this platform"
);
os
::
Solaris
::
min_stack_allowed
=
MAX2
(
os
::
Solaris
::
min_stack_allowed
,
(
size_t
)(
StackYellowPages
+
StackRedPages
+
StackShadowPages
+
2
*
BytesPerWord
COMPILER2_PRESENT
(
+
1
))
*
page_size
);
size_t
threadStackSizeInBytes
=
ThreadStackSize
*
K
;
if
(
threadStackSizeInBytes
!=
0
&&
threadStackSizeInBytes
<
Solaris
::
min_stack_allowed
)
{
threadStackSizeInBytes
<
os
::
Solaris
::
min_stack_allowed
)
{
tty
->
print_cr
(
"
\n
The stack size specified is too small, Specify at least %dk"
,
Solaris
::
min_stack_allowed
/
K
);
os
::
Solaris
::
min_stack_allowed
/
K
);
return
JNI_ERR
;
}
...
...
@@ -5837,7 +5836,7 @@ void Parker::park(bool isAbsolute, jlong time) {
// First, demultiplex/decode time arguments
timespec
absTime
;
if
(
time
<
0
)
{
// don't wait at all
if
(
time
<
0
||
(
isAbsolute
&&
time
==
0
)
)
{
// don't wait at all
return
;
}
if
(
time
>
0
)
{
...
...
src/os/windows/vm/os_windows.cpp
浏览文件 @
23c9c5d4
...
...
@@ -3311,7 +3311,6 @@ extern "C" {
}
}
// this is called _after_ the global arguments have been parsed
jint
os
::
init_2
(
void
)
{
// Allocate a single page and mark it as readable for safepoint polling
...
...
@@ -3390,6 +3389,21 @@ jint os::init_2(void) {
actual_reserve_size
=
default_reserve_size
;
}
// Check minimum allowable stack size for thread creation and to initialize
// the java system classes, including StackOverflowError - depends on page
// size. Add a page for compiler2 recursion in main thread.
// Add in 2*BytesPerWord times page size to account for VM stack during
// class initialization depending on 32 or 64 bit VM.
size_t
min_stack_allowed
=
(
size_t
)(
StackYellowPages
+
StackRedPages
+
StackShadowPages
+
2
*
BytesPerWord
COMPILER2_PRESENT
(
+
1
))
*
os
::
vm_page_size
();
if
(
actual_reserve_size
<
min_stack_allowed
)
{
tty
->
print_cr
(
"
\n
The stack size specified is too small, "
"Specify at least %dk"
,
min_stack_allowed
/
K
);
return
JNI_ERR
;
}
JavaThread
::
set_stack_size_at_create
(
stack_commit_size
);
// Calculate theoretical max. size of Threads to guard gainst artifical
...
...
@@ -3992,7 +4006,7 @@ void Parker::park(bool isAbsolute, jlong time) {
if
(
time
<
0
)
{
// don't wait
return
;
}
else
if
(
time
==
0
)
{
else
if
(
time
==
0
&&
!
isAbsolute
)
{
time
=
INFINITE
;
}
else
if
(
isAbsolute
)
{
...
...
src/share/vm/runtime/arguments.cpp
浏览文件 @
23c9c5d4
...
...
@@ -1663,7 +1663,8 @@ bool Arguments::check_stack_pages()
bool
status
=
true
;
status
=
status
&&
verify_min_value
(
StackYellowPages
,
1
,
"StackYellowPages"
);
status
=
status
&&
verify_min_value
(
StackRedPages
,
1
,
"StackRedPages"
);
status
=
status
&&
verify_min_value
(
StackShadowPages
,
1
,
"StackShadowPages"
);
// greater stack shadow pages can't generate instruction to bang stack
status
=
status
&&
verify_interval
(
StackShadowPages
,
1
,
50
,
"StackShadowPages"
);
return
status
;
}
...
...
src/share/vm/utilities/exceptions.cpp
浏览文件 @
23c9c5d4
...
...
@@ -61,6 +61,18 @@ bool Exceptions::special_exception(Thread* thread, const char* file, int line, H
ShouldNotReachHere
();
}
#ifdef ASSERT
// Check for trying to throw stack overflow before initialization is complete
// to prevent infinite recursion trying to initialize stack overflow without
// adequate stack space.
// This can happen with stress testing a large value of StackShadowPages
if
(
h_exception
()
->
klass
()
==
SystemDictionary
::
StackOverflowError_klass
())
{
instanceKlass
*
ik
=
instanceKlass
::
cast
(
h_exception
->
klass
());
assert
(
ik
->
is_initialized
(),
"need to increase min_stack_allowed calculation"
);
}
#endif // ASSERT
if
(
thread
->
is_VM_thread
()
||
thread
->
is_Compiler_thread
()
)
{
// We do not care what kind of exception we get for the vm-thread or a thread which
...
...
@@ -91,7 +103,6 @@ bool Exceptions::special_exception(Thread* thread, const char* file, int line, s
thread
->
set_pending_exception
(
Universe
::
vm_exception
(),
file
,
line
);
return
true
;
}
return
false
;
}
...
...
@@ -193,6 +204,7 @@ void Exceptions::throw_stack_overflow_exception(Thread* THREAD, const char* file
klassOop
k
=
SystemDictionary
::
StackOverflowError_klass
();
oop
e
=
instanceKlass
::
cast
(
k
)
->
allocate_instance
(
CHECK
);
exception
=
Handle
(
THREAD
,
e
);
// fill_in_stack trace does gc
assert
(
instanceKlass
::
cast
(
k
)
->
is_initialized
(),
"need to increase min_stack_allowed calculation"
);
if
(
StackTraceInThrowable
)
{
java_lang_Throwable
::
fill_in_stack_trace
(
exception
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录