Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
a6cdba21
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a6cdba21
编写于
10月 14, 2013
作者:
L
lana
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
8a448e04
6ca2973a
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
62 addition
and
15 deletion
+62
-15
src/share/classes/java/lang/ClassLoader.java
src/share/classes/java/lang/ClassLoader.java
+11
-0
src/share/classes/java/util/ServiceLoader.java
src/share/classes/java/util/ServiceLoader.java
+6
-0
test/java/lang/management/MemoryMXBean/LowMemoryTest2.java
test/java/lang/management/MemoryMXBean/LowMemoryTest2.java
+19
-6
test/java/lang/management/MemoryMXBean/LowMemoryTest2.sh
test/java/lang/management/MemoryMXBean/LowMemoryTest2.sh
+9
-6
test/java/net/Socks/SocksProxyVersion.java
test/java/net/Socks/SocksProxyVersion.java
+4
-0
test/sun/security/ssl/com/sun/net/ssl/internal/ssl/DHKeyExchange/DHEKeySizing.java
.../sun/net/ssl/internal/ssl/DHKeyExchange/DHEKeySizing.java
+13
-3
未找到文件。
src/share/classes/java/lang/ClassLoader.java
浏览文件 @
a6cdba21
...
@@ -1061,6 +1061,10 @@ public abstract class ClassLoader {
...
@@ -1061,6 +1061,10 @@ public abstract class ClassLoader {
* built-in to the virtual machine is searched. That failing, this method
* built-in to the virtual machine is searched. That failing, this method
* will invoke {@link #findResource(String)} to find the resource. </p>
* will invoke {@link #findResource(String)} to find the resource. </p>
*
*
* @apiNote When overriding this method it is recommended that an
* implementation ensures that any delegation is consistent with the {@link
* #getResources(java.lang.String) getResources(String)} method.
*
* @param name
* @param name
* The resource name
* The resource name
*
*
...
@@ -1094,6 +1098,13 @@ public abstract class ClassLoader {
...
@@ -1094,6 +1098,13 @@ public abstract class ClassLoader {
* <p> The search order is described in the documentation for {@link
* <p> The search order is described in the documentation for {@link
* #getResource(String)}. </p>
* #getResource(String)}. </p>
*
*
* @apiNote When overriding this method it is recommended that an
* implementation ensures that any delegation is consistent with the {@link
* #getResource(java.lang.String) getResource(String)} method. This should
* ensure that the first element returned by the Enumeration's
* {@code nextElement} method is the same resource that the
* {@code getResource(String)} method would return.
*
* @param name
* @param name
* The resource name
* The resource name
*
*
...
...
src/share/classes/java/util/ServiceLoader.java
浏览文件 @
a6cdba21
...
@@ -453,6 +453,12 @@ public final class ServiceLoader<S>
...
@@ -453,6 +453,12 @@ public final class ServiceLoader<S>
* Invoking its {@link java.util.Iterator#remove() remove} method will
* Invoking its {@link java.util.Iterator#remove() remove} method will
* cause an {@link UnsupportedOperationException} to be thrown.
* cause an {@link UnsupportedOperationException} to be thrown.
*
*
* @implNote When adding providers to the cache, the {@link #iterator
* Iterator} processes resources in the order that the {@link
* java.lang.ClassLoader#getResources(java.lang.String)
* ClassLoader.getResources(String)} method finds the service configuration
* files.
*
* @return An iterator that lazily loads providers for this loader's
* @return An iterator that lazily loads providers for this loader's
* service
* service
*/
*/
...
...
test/java/lang/management/MemoryMXBean/LowMemoryTest2.java
浏览文件 @
a6cdba21
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
*
*
* The test set a listener to be notified when any of the non-heap pools
* The test set a listener to be notified when any of the non-heap pools
* exceed 80%. It then starts a thread that continuously loads classes.
* exceed 80%. It then starts a thread that continuously loads classes.
* In the HotSpot implementation this causes
perm
space to be consumed.
* In the HotSpot implementation this causes
meta
space to be consumed.
* Test completes when we the notification is received or an OutOfMemory
* Test completes when we the notification is received or an OutOfMemory
* is generated.
* is generated.
*/
*/
...
@@ -100,7 +100,14 @@ public class LowMemoryTest2 {
...
@@ -100,7 +100,14 @@ public class LowMemoryTest2 {
// TestNNNNNN
// TestNNNNNN
String
name
=
"Test"
+
Integer
.
toString
(
count
++);
int
load_count
=
count
++;
if
(
load_count
>
999999
)
{
// The test will create a corrupt class file if the count
// exceeds 999999. Fix the test if this exception is thrown.
throw
new
RuntimeException
(
"Load count exceeded"
);
}
String
name
=
"Test"
+
Integer
.
toString
(
load_count
);
byte
value
[];
byte
value
[];
try
{
try
{
...
@@ -133,8 +140,9 @@ public class LowMemoryTest2 {
...
@@ -133,8 +140,9 @@ public class LowMemoryTest2 {
* Note: Once the usage threshold has been exceeded the low memory
* Note: Once the usage threshold has been exceeded the low memory
* detector thread will attempt to deliver its notification - this can
* detector thread will attempt to deliver its notification - this can
* potentially create a race condition with this thread contining to
* potentially create a race condition with this thread contining to
* fill up perm space. To avoid the low memory detector getting an OutOfMemory
* fill up metaspace. To avoid the low memory detector getting an
* we throttle this thread once the threshold has been exceeded.
* OutOfMemory we throttle this thread once the threshold has been
* exceeded.
*/
*/
public
void
run
()
{
public
void
run
()
{
List
pools
=
ManagementFactory
.
getMemoryPoolMXBeans
();
List
pools
=
ManagementFactory
.
getMemoryPoolMXBeans
();
...
@@ -180,7 +188,7 @@ public class LowMemoryTest2 {
...
@@ -180,7 +188,7 @@ public class LowMemoryTest2 {
// Set threshold of 80% of all NON_HEAP memory pools
// Set threshold of 80% of all NON_HEAP memory pools
// In the Hotspot implementation this means we should get a notification
// In the Hotspot implementation this means we should get a notification
// if the CodeCache or
perm generation
fills up.
// if the CodeCache or
metaspace
fills up.
while
(
iter
.
hasNext
())
{
while
(
iter
.
hasNext
())
{
MemoryPoolMXBean
p
=
(
MemoryPoolMXBean
)
iter
.
next
();
MemoryPoolMXBean
p
=
(
MemoryPoolMXBean
)
iter
.
next
();
...
@@ -188,7 +196,12 @@ public class LowMemoryTest2 {
...
@@ -188,7 +196,12 @@ public class LowMemoryTest2 {
// set threshold
// set threshold
MemoryUsage
mu
=
p
.
getUsage
();
MemoryUsage
mu
=
p
.
getUsage
();
long
threshold
=
(
mu
.
getMax
()
*
80
)
/
100
;
long
max
=
mu
.
getMax
();
if
(
max
<
0
)
{
throw
new
RuntimeException
(
"There is no maximum set for "
+
p
.
getName
()
+
" memory pool so the test is invalid"
);
}
long
threshold
=
(
max
*
80
)
/
100
;
p
.
setUsageThreshold
(
threshold
);
p
.
setUsageThreshold
(
threshold
);
...
...
test/java/lang/management/MemoryMXBean/LowMemoryTest2.sh
浏览文件 @
a6cdba21
...
@@ -51,14 +51,17 @@ go() {
...
@@ -51,14 +51,17 @@ go() {
# Run test with each GC configuration
# Run test with each GC configuration
#
#
# Notes: To ensure that
perm gen
fills up we disable class unloading.
# Notes: To ensure that
metaspace
fills up we disable class unloading.
# Also we set the max
perm
space to 8MB - otherwise the test takes too
# Also we set the max
meta
space to 8MB - otherwise the test takes too
# long to run.
# long to run.
go
-noclassgc
-XX
:PermSize
=
8m
-XX
:MaxPermSize
=
8m
-XX
:+UseSerialGC LowMemoryTest2
go
-noclassgc
-XX
:MaxMetaspaceSize
=
16m
-XX
:+UseSerialGC LowMemoryTest2
go
-noclassgc
-XX
:PermSize
=
8m
-XX
:MaxPermSize
=
8m
-XX
:+UseParallelGC LowMemoryTest2
go
-noclassgc
-XX
:MaxMetaspaceSize
=
16m
-XX
:+UseParallelGC LowMemoryTest2
go
-noclassgc
-XX
:PermSize
=
8m
-XX
:MaxPermSize
=
8m
-XX
:+UseParNewGC
-XX
:+UseConcMarkSweepGC
\
go
-noclassgc
-XX
:MaxMetaspaceSize
=
16m
-XX
:+UseParNewGC
-XX
:+UseConcMarkSweepGC LowMemoryTest2
LowMemoryTest2
# Test class metaspace - might hit MaxMetaspaceSize instead if
# UseCompressedClassPointers is off or if 32 bit.
go
-noclassgc
-XX
:MaxMetaspaceSize
=
16m
-XX
:CompressedClassSpaceSize
=
4m LowMemoryTest2
echo
''
echo
''
if
[
$failures
-gt
0
]
;
if
[
$failures
-gt
0
]
;
...
...
test/java/net/Socks/SocksProxyVersion.java
浏览文件 @
a6cdba21
...
@@ -41,6 +41,10 @@ public class SocksProxyVersion implements Runnable {
...
@@ -41,6 +41,10 @@ public class SocksProxyVersion implements Runnable {
volatile
boolean
failed
;
volatile
boolean
failed
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
if
(
InetAddress
.
getLocalHost
().
isLoopbackAddress
())
{
System
.
out
.
println
(
"Test cannot run. getLocalHost returns a loopback address"
);
return
;
}
new
SocksProxyVersion
();
new
SocksProxyVersion
();
}
}
...
...
test/sun/security/ssl/com/sun/net/ssl/internal/ssl/DHKeyExchange/DHEKeySizing.java
浏览文件 @
a6cdba21
...
@@ -111,7 +111,15 @@ import java.util.Base64;
...
@@ -111,7 +111,15 @@ import java.util.Base64;
public
class
DHEKeySizing
{
public
class
DHEKeySizing
{
private
static
boolean
debug
=
true
;
private
final
static
boolean
debug
=
true
;
// key length bias because of the stripping of leading zero bytes of
// negotiated DH keys.
//
// This is an effort to mimum intermittent failure when we cannot
// estimate what's the exact number of leading zero bytes of
// negotiated DH keys.
private
final
static
int
KEY_LEN_BIAS
=
6
;
private
SSLContext
sslc
;
private
SSLContext
sslc
;
private
SSLEngine
ssle1
;
// client
private
SSLEngine
ssle1
;
// client
...
@@ -269,7 +277,8 @@ public class DHEKeySizing {
...
@@ -269,7 +277,8 @@ public class DHEKeySizing {
twoToOne
.
flip
();
twoToOne
.
flip
();
log
(
"Message length of ServerHello series: "
+
twoToOne
.
remaining
());
log
(
"Message length of ServerHello series: "
+
twoToOne
.
remaining
());
if
(
lenServerKeyEx
!=
twoToOne
.
remaining
())
{
if
(
twoToOne
.
remaining
()
<
(
lenServerKeyEx
-
KEY_LEN_BIAS
)
||
twoToOne
.
remaining
()
>
lenServerKeyEx
)
{
throw
new
Exception
(
throw
new
Exception
(
"Expected to generate ServerHello series messages of "
+
"Expected to generate ServerHello series messages of "
+
lenServerKeyEx
+
" bytes, but not "
+
twoToOne
.
remaining
());
lenServerKeyEx
+
" bytes, but not "
+
twoToOne
.
remaining
());
...
@@ -289,7 +298,8 @@ public class DHEKeySizing {
...
@@ -289,7 +298,8 @@ public class DHEKeySizing {
oneToTwo
.
flip
();
oneToTwo
.
flip
();
log
(
"Message length of ClientKeyExchange: "
+
oneToTwo
.
remaining
());
log
(
"Message length of ClientKeyExchange: "
+
oneToTwo
.
remaining
());
if
(
lenClientKeyEx
!=
oneToTwo
.
remaining
())
{
if
(
oneToTwo
.
remaining
()
<
(
lenClientKeyEx
-
KEY_LEN_BIAS
)
||
oneToTwo
.
remaining
()
>
lenClientKeyEx
)
{
throw
new
Exception
(
throw
new
Exception
(
"Expected to generate ClientKeyExchange message of "
+
"Expected to generate ClientKeyExchange message of "
+
lenClientKeyEx
+
" bytes, but not "
+
oneToTwo
.
remaining
());
lenClientKeyEx
+
" bytes, but not "
+
oneToTwo
.
remaining
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录