Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
5418c529
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看板
提交
5418c529
编写于
3月 24, 2016
作者:
I
iklam
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8150752: Share Class Data
Reviewed-by: acorn, hseigel, mschoene
上级
0ed6766a
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
97 addition
and
15 deletion
+97
-15
src/share/vm/classfile/dictionary.cpp
src/share/vm/classfile/dictionary.cpp
+14
-3
src/share/vm/classfile/dictionary.hpp
src/share/vm/classfile/dictionary.hpp
+4
-1
src/share/vm/classfile/systemDictionary.cpp
src/share/vm/classfile/systemDictionary.cpp
+14
-4
src/share/vm/classfile/systemDictionaryShared.hpp
src/share/vm/classfile/systemDictionaryShared.hpp
+18
-1
src/share/vm/classfile/verificationType.cpp
src/share/vm/classfile/verificationType.cpp
+19
-2
src/share/vm/memory/metaspaceShared.cpp
src/share/vm/memory/metaspaceShared.cpp
+6
-1
src/share/vm/oops/instanceKlass.cpp
src/share/vm/oops/instanceKlass.cpp
+12
-1
src/share/vm/prims/whitebox.cpp
src/share/vm/prims/whitebox.cpp
+7
-1
test/testlibrary/whitebox/sun/hotspot/WhiteBox.java
test/testlibrary/whitebox/sun/hotspot/WhiteBox.java
+3
-1
未找到文件。
src/share/vm/classfile/dictionary.cpp
浏览文件 @
5418c529
/*
/*
* Copyright (c) 2003, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
6
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "precompiled.hpp"
#include "classfile/dictionary.hpp"
#include "classfile/dictionary.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/systemDictionaryShared.hpp"
#include "memory/iterator.hpp"
#include "memory/iterator.hpp"
#include "oops/oop.inline.hpp"
#include "oops/oop.inline.hpp"
#include "prims/jvmtiRedefineClassesTrace.hpp"
#include "prims/jvmtiRedefineClassesTrace.hpp"
...
@@ -36,9 +37,16 @@ PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
...
@@ -36,9 +37,16 @@ PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
DictionaryEntry
*
Dictionary
::
_current_class_entry
=
NULL
;
DictionaryEntry
*
Dictionary
::
_current_class_entry
=
NULL
;
int
Dictionary
::
_current_class_index
=
0
;
int
Dictionary
::
_current_class_index
=
0
;
size_t
Dictionary
::
entry_size
()
{
if
(
DumpSharedSpaces
)
{
return
SystemDictionaryShared
::
dictionary_entry_size
();
}
else
{
return
sizeof
(
DictionaryEntry
);
}
}
Dictionary
::
Dictionary
(
int
table_size
)
Dictionary
::
Dictionary
(
int
table_size
)
:
TwoOopHashtable
<
Klass
*
,
mtClass
>
(
table_size
,
sizeof
(
DictionaryEntry
))
{
:
TwoOopHashtable
<
Klass
*
,
mtClass
>
(
table_size
,
(
int
)
entry_size
(
))
{
_current_class_index
=
0
;
_current_class_index
=
0
;
_current_class_entry
=
NULL
;
_current_class_entry
=
NULL
;
_pd_cache_table
=
new
ProtectionDomainCacheTable
(
defaultProtectionDomainCacheSize
);
_pd_cache_table
=
new
ProtectionDomainCacheTable
(
defaultProtectionDomainCacheSize
);
...
@@ -47,7 +55,7 @@ Dictionary::Dictionary(int table_size)
...
@@ -47,7 +55,7 @@ Dictionary::Dictionary(int table_size)
Dictionary
::
Dictionary
(
int
table_size
,
HashtableBucket
<
mtClass
>*
t
,
Dictionary
::
Dictionary
(
int
table_size
,
HashtableBucket
<
mtClass
>*
t
,
int
number_of_entries
)
int
number_of_entries
)
:
TwoOopHashtable
<
Klass
*
,
mtClass
>
(
table_size
,
sizeof
(
DictionaryEntry
),
t
,
number_of_entries
)
{
:
TwoOopHashtable
<
Klass
*
,
mtClass
>
(
table_size
,
(
int
)
entry_size
(
),
t
,
number_of_entries
)
{
_current_class_index
=
0
;
_current_class_index
=
0
;
_current_class_entry
=
NULL
;
_current_class_entry
=
NULL
;
_pd_cache_table
=
new
ProtectionDomainCacheTable
(
defaultProtectionDomainCacheSize
);
_pd_cache_table
=
new
ProtectionDomainCacheTable
(
defaultProtectionDomainCacheSize
);
...
@@ -63,6 +71,9 @@ DictionaryEntry* Dictionary::new_entry(unsigned int hash, Klass* klass,
...
@@ -63,6 +71,9 @@ DictionaryEntry* Dictionary::new_entry(unsigned int hash, Klass* klass,
entry
->
set_loader_data
(
loader_data
);
entry
->
set_loader_data
(
loader_data
);
entry
->
set_pd_set
(
NULL
);
entry
->
set_pd_set
(
NULL
);
assert
(
klass
->
oop_is_instance
(),
"Must be"
);
assert
(
klass
->
oop_is_instance
(),
"Must be"
);
if
(
DumpSharedSpaces
)
{
SystemDictionaryShared
::
init_shared_dictionary_entry
(
klass
,
entry
);
}
return
entry
;
return
entry
;
}
}
...
...
src/share/vm/classfile/dictionary.hpp
浏览文件 @
5418c529
/*
/*
* Copyright (c) 2003, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
6
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -53,6 +53,7 @@ private:
...
@@ -53,6 +53,7 @@ private:
DictionaryEntry
*
get_entry
(
int
index
,
unsigned
int
hash
,
DictionaryEntry
*
get_entry
(
int
index
,
unsigned
int
hash
,
Symbol
*
name
,
ClassLoaderData
*
loader_data
);
Symbol
*
name
,
ClassLoaderData
*
loader_data
);
protected:
DictionaryEntry
*
bucket
(
int
i
)
{
DictionaryEntry
*
bucket
(
int
i
)
{
return
(
DictionaryEntry
*
)
Hashtable
<
Klass
*
,
mtClass
>::
bucket
(
i
);
return
(
DictionaryEntry
*
)
Hashtable
<
Klass
*
,
mtClass
>::
bucket
(
i
);
}
}
...
@@ -66,6 +67,8 @@ private:
...
@@ -66,6 +67,8 @@ private:
Hashtable
<
Klass
*
,
mtClass
>::
add_entry
(
index
,
(
HashtableEntry
<
Klass
*
,
mtClass
>*
)
new_entry
);
Hashtable
<
Klass
*
,
mtClass
>::
add_entry
(
index
,
(
HashtableEntry
<
Klass
*
,
mtClass
>*
)
new_entry
);
}
}
static
size_t
entry_size
();
public:
public:
Dictionary
(
int
table_size
);
Dictionary
(
int
table_size
);
Dictionary
(
int
table_size
,
HashtableBucket
<
mtClass
>*
t
,
int
number_of_entries
);
Dictionary
(
int
table_size
,
HashtableBucket
<
mtClass
>*
t
,
int
number_of_entries
);
...
...
src/share/vm/classfile/systemDictionary.cpp
浏览文件 @
5418c529
/*
/*
* Copyright (c) 1997, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
6
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -1198,8 +1198,13 @@ instanceKlassHandle SystemDictionary::load_shared_class(instanceKlassHandle ik,
...
@@ -1198,8 +1198,13 @@ instanceKlassHandle SystemDictionary::load_shared_class(instanceKlassHandle ik,
if
(
ik
->
super
()
!=
NULL
)
{
if
(
ik
->
super
()
!=
NULL
)
{
Symbol
*
cn
=
ik
->
super
()
->
name
();
Symbol
*
cn
=
ik
->
super
()
->
name
();
resolve_super_or_fail
(
class_name
,
cn
,
Klass
*
s
=
resolve_super_or_fail
(
class_name
,
cn
,
class_loader
,
protection_domain
,
true
,
CHECK_
(
nh
));
class_loader
,
protection_domain
,
true
,
CHECK_
(
nh
));
if
(
s
!=
ik
->
super
())
{
// The dynamically resolved super class is not the same as the one we used during dump time,
// so we cannot use ik.
return
nh
;
}
}
}
Array
<
Klass
*>*
interfaces
=
ik
->
local_interfaces
();
Array
<
Klass
*>*
interfaces
=
ik
->
local_interfaces
();
...
@@ -1212,7 +1217,12 @@ instanceKlassHandle SystemDictionary::load_shared_class(instanceKlassHandle ik,
...
@@ -1212,7 +1217,12 @@ instanceKlassHandle SystemDictionary::load_shared_class(instanceKlassHandle ik,
// reinitialized yet (they will be once the interface classes
// reinitialized yet (they will be once the interface classes
// are loaded)
// are loaded)
Symbol
*
name
=
k
->
name
();
Symbol
*
name
=
k
->
name
();
resolve_super_or_fail
(
class_name
,
name
,
class_loader
,
protection_domain
,
false
,
CHECK_
(
nh
));
Klass
*
i
=
resolve_super_or_fail
(
class_name
,
name
,
class_loader
,
protection_domain
,
false
,
CHECK_
(
nh
));
if
(
k
!=
i
)
{
// The dynamically resolved interface class is not the same as the one we used during dump time,
// so we cannot use ik.
return
nh
;
}
}
}
// Adjust methods to recover missing data. They need addresses for
// Adjust methods to recover missing data. They need addresses for
...
...
src/share/vm/classfile/systemDictionaryShared.hpp
浏览文件 @
5418c529
/*
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014,
2016,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#ifndef SHARE_VM_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP
#ifndef SHARE_VM_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP
#define SHARE_VM_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP
#define SHARE_VM_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP
#include "classfile/dictionary.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/systemDictionary.hpp"
class
SystemDictionaryShared
:
public
SystemDictionary
{
class
SystemDictionaryShared
:
public
SystemDictionary
{
...
@@ -42,6 +43,22 @@ public:
...
@@ -42,6 +43,22 @@ public:
oop
class_loader
=
loader_data
->
class_loader
();
oop
class_loader
=
loader_data
->
class_loader
();
return
(
class_loader
==
NULL
);
return
(
class_loader
==
NULL
);
}
}
static
size_t
dictionary_entry_size
()
{
return
sizeof
(
DictionaryEntry
);
}
static
void
init_shared_dictionary_entry
(
Klass
*
k
,
DictionaryEntry
*
entry
)
{}
// The (non-application) CDS implementation supports only classes in the boot
// class loader, which ensures that the verification dependencies are the same
// during archive creation time and runtime. Thus we can do the dependency checks
// entirely during archive creation time.
static
void
add_verification_dependency
(
Klass
*
k
,
Symbol
*
accessor_clsname
,
Symbol
*
target_clsname
)
{}
static
void
finalize_verification_dependencies
()
{}
static
bool
check_verification_dependencies
(
Klass
*
k
,
Handle
class_loader
,
Handle
protection_domain
,
char
**
message_buffer
,
TRAPS
)
{
return
true
;}
};
};
#endif // SHARE_VM_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP
#endif // SHARE_VM_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP
src/share/vm/classfile/verificationType.cpp
浏览文件 @
5418c529
/*
/*
* Copyright (c) 2003, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
6
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include "precompiled.hpp"
#include "precompiled.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/systemDictionaryShared.hpp"
#include "classfile/verificationType.hpp"
#include "classfile/verificationType.hpp"
#include "classfile/verifier.hpp"
#include "classfile/verifier.hpp"
...
@@ -73,7 +74,23 @@ bool VerificationType::is_reference_assignable_from(
...
@@ -73,7 +74,23 @@ bool VerificationType::is_reference_assignable_from(
Klass
*
from_class
=
SystemDictionary
::
resolve_or_fail
(
Klass
*
from_class
=
SystemDictionary
::
resolve_or_fail
(
from
.
name
(),
Handle
(
THREAD
,
klass
->
class_loader
()),
from
.
name
(),
Handle
(
THREAD
,
klass
->
class_loader
()),
Handle
(
THREAD
,
klass
->
protection_domain
()),
true
,
CHECK_false
);
Handle
(
THREAD
,
klass
->
protection_domain
()),
true
,
CHECK_false
);
return
InstanceKlass
::
cast
(
from_class
)
->
is_subclass_of
(
this_class
());
bool
result
=
InstanceKlass
::
cast
(
from_class
)
->
is_subclass_of
(
this_class
());
if
(
result
&&
DumpSharedSpaces
)
{
if
(
klass
()
->
is_subclass_of
(
from_class
)
&&
klass
()
->
is_subclass_of
(
this_class
()))
{
// No need to save verification dependency. At run time, <klass> will be
// loaded from the archived only if <from_class> and <this_class> are
// also loaded from the archive. I.e., all 3 classes are exactly the same
// as we saw at archive creation time.
}
else
{
// Save the dependency. At run time, we need to check that the condition
// from_class->is_subclass_of(this_class() is still true.
Symbol
*
accessor_clsname
=
from
.
name
();
Symbol
*
target_clsname
=
this_class
()
->
name
();
SystemDictionaryShared
::
add_verification_dependency
(
klass
(),
accessor_clsname
,
target_clsname
);
}
}
return
result
;
}
}
}
else
if
(
is_array
()
&&
from
.
is_array
())
{
}
else
if
(
is_array
()
&&
from
.
is_array
())
{
VerificationType
comp_this
=
get_component
(
context
,
CHECK_false
);
VerificationType
comp_this
=
get_component
(
context
,
CHECK_false
);
...
...
src/share/vm/memory/metaspaceShared.cpp
浏览文件 @
5418c529
/*
/*
* Copyright (c) 2012, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 201
6
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include "classfile/sharedClassUtil.hpp"
#include "classfile/sharedClassUtil.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/systemDictionaryShared.hpp"
#include "code/codeCache.hpp"
#include "code/codeCache.hpp"
#include "memory/filemap.hpp"
#include "memory/filemap.hpp"
#include "memory/gcLocker.hpp"
#include "memory/gcLocker.hpp"
...
@@ -684,6 +685,10 @@ void MetaspaceShared::link_and_cleanup_shared_classes(TRAPS) {
...
@@ -684,6 +685,10 @@ void MetaspaceShared::link_and_cleanup_shared_classes(TRAPS) {
exit
(
1
);
exit
(
1
);
}
}
}
}
// Copy the dependencies from C_HEAP-alloced GrowableArrays to RO-alloced
// Arrays
SystemDictionaryShared
::
finalize_verification_dependencies
();
}
}
void
MetaspaceShared
::
prepare_for_dumping
()
{
void
MetaspaceShared
::
prepare_for_dumping
()
{
...
...
src/share/vm/oops/instanceKlass.cpp
浏览文件 @
5418c529
/*
/*
* Copyright (c) 1997, 201
5
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
6
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "precompiled.hpp"
#include "classfile/javaClasses.hpp"
#include "classfile/javaClasses.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/systemDictionaryShared.hpp"
#include "classfile/verifier.hpp"
#include "classfile/verifier.hpp"
#include "classfile/vmSymbols.hpp"
#include "classfile/vmSymbols.hpp"
#include "compiler/compileBroker.hpp"
#include "compiler/compileBroker.hpp"
...
@@ -706,6 +707,16 @@ bool InstanceKlass::link_class_impl(
...
@@ -706,6 +707,16 @@ bool InstanceKlass::link_class_impl(
// also sets rewritten
// also sets rewritten
this_oop
->
rewrite_class
(
CHECK_false
);
this_oop
->
rewrite_class
(
CHECK_false
);
}
else
if
(
this_oop
()
->
is_shared
())
{
ResourceMark
rm
(
THREAD
);
char
*
message_buffer
;
// res-allocated by check_verification_dependencies
Handle
loader
=
this_oop
()
->
class_loader
();
Handle
pd
=
this_oop
()
->
protection_domain
();
bool
verified
=
SystemDictionaryShared
::
check_verification_dependencies
(
this_oop
(),
loader
,
pd
,
&
message_buffer
,
THREAD
);
if
(
!
verified
)
{
THROW_MSG_
(
vmSymbols
::
java_lang_VerifyError
(),
message_buffer
,
false
);
}
}
}
// relocate jsrs and link methods after they are all rewritten
// relocate jsrs and link methods after they are all rewritten
...
...
src/share/vm/prims/whitebox.cpp
浏览文件 @
5418c529
/*
/*
* Copyright (c) 2012, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 201
6
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "precompiled.hpp"
#include "memory/metadataFactory.hpp"
#include "memory/metadataFactory.hpp"
#include "memory/metaspaceShared.hpp"
#include "memory/universe.hpp"
#include "memory/universe.hpp"
#include "oops/oop.inline.hpp"
#include "oops/oop.inline.hpp"
...
@@ -914,6 +915,10 @@ WB_ENTRY(jlong, WB_MetaspaceCapacityUntilGC(JNIEnv* env, jobject wb))
...
@@ -914,6 +915,10 @@ WB_ENTRY(jlong, WB_MetaspaceCapacityUntilGC(JNIEnv* env, jobject wb))
return
(
jlong
)
MetaspaceGC
::
capacity_until_GC
();
return
(
jlong
)
MetaspaceGC
::
capacity_until_GC
();
WB_END
WB_END
WB_ENTRY
(
jboolean
,
WB_IsSharedClass
(
JNIEnv
*
env
,
jobject
wb
,
jclass
clazz
))
return
(
jboolean
)
MetaspaceShared
::
is_in_shared_space
(
java_lang_Class
::
as_Klass
(
JNIHandles
::
resolve_non_null
(
clazz
)));
WB_END
WB_ENTRY
(
jboolean
,
WB_IsMonitorInflated
(
JNIEnv
*
env
,
jobject
wb
,
jobject
obj
))
WB_ENTRY
(
jboolean
,
WB_IsMonitorInflated
(
JNIEnv
*
env
,
jobject
wb
,
jobject
obj
))
oop
obj_oop
=
JNIHandles
::
resolve
(
obj
);
oop
obj_oop
=
JNIHandles
::
resolve
(
obj
);
return
(
jboolean
)
obj_oop
->
mark
()
->
has_monitor
();
return
(
jboolean
)
obj_oop
->
mark
()
->
has_monitor
();
...
@@ -1034,6 +1039,7 @@ static JNINativeMethod methods[] = {
...
@@ -1034,6 +1039,7 @@ static JNINativeMethod methods[] = {
{
CC
"runMemoryUnitTests"
,
CC
"()V"
,
(
void
*
)
&
WB_RunMemoryUnitTests
},
{
CC
"runMemoryUnitTests"
,
CC
"()V"
,
(
void
*
)
&
WB_RunMemoryUnitTests
},
{
CC
"readFromNoaccessArea"
,
CC
"()V"
,
(
void
*
)
&
WB_ReadFromNoaccessArea
},
{
CC
"readFromNoaccessArea"
,
CC
"()V"
,
(
void
*
)
&
WB_ReadFromNoaccessArea
},
{
CC
"stressVirtualSpaceResize"
,
CC
"(JJJ)I"
,
(
void
*
)
&
WB_StressVirtualSpaceResize
},
{
CC
"stressVirtualSpaceResize"
,
CC
"(JJJ)I"
,
(
void
*
)
&
WB_StressVirtualSpaceResize
},
{
CC
"isSharedClass"
,
CC
"(Ljava/lang/Class;)Z"
,
(
void
*
)
&
WB_IsSharedClass
},
#if INCLUDE_ALL_GCS
#if INCLUDE_ALL_GCS
{
CC
"g1InConcurrentMark"
,
CC
"()Z"
,
(
void
*
)
&
WB_G1InConcurrentMark
},
{
CC
"g1InConcurrentMark"
,
CC
"()Z"
,
(
void
*
)
&
WB_G1InConcurrentMark
},
{
CC
"g1IsHumongous"
,
CC
"(Ljava/lang/Object;)Z"
,
(
void
*
)
&
WB_G1IsHumongous
},
{
CC
"g1IsHumongous"
,
CC
"(Ljava/lang/Object;)Z"
,
(
void
*
)
&
WB_G1IsHumongous
},
...
...
test/testlibrary/whitebox/sun/hotspot/WhiteBox.java
浏览文件 @
5418c529
/*
/*
* Copyright (c) 2012, 201
5
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 201
6
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -233,4 +233,6 @@ public class WhiteBox {
...
@@ -233,4 +233,6 @@ public class WhiteBox {
return
offset
;
return
offset
;
}
}
// Class Data Sharing
public
native
boolean
isSharedClass
(
Class
<?>
c
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录