Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
e8a3fda0
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看板
提交
e8a3fda0
编写于
10月 08, 2013
作者:
K
kevinw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8019375: Internal symbol table size should be tunable.
Reviewed-by: coleenp, kamg
上级
f27d8d8b
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
19 addition
and
22 deletion
+19
-22
agent/src/share/classes/sun/jvm/hotspot/memory/SymbolTable.java
...src/share/classes/sun/jvm/hotspot/memory/SymbolTable.java
+0
-6
src/share/vm/classfile/symbolTable.hpp
src/share/vm/classfile/symbolTable.hpp
+10
-9
src/share/vm/runtime/arguments.cpp
src/share/vm/runtime/arguments.cpp
+3
-0
src/share/vm/runtime/globals.hpp
src/share/vm/runtime/globals.hpp
+3
-0
src/share/vm/runtime/vmStructs.cpp
src/share/vm/runtime/vmStructs.cpp
+0
-7
src/share/vm/utilities/globalDefinitions.hpp
src/share/vm/utilities/globalDefinitions.hpp
+3
-0
未找到文件。
agent/src/share/classes/sun/jvm/hotspot/memory/SymbolTable.java
浏览文件 @
e8a3fda0
...
@@ -44,12 +44,10 @@ public class SymbolTable extends sun.jvm.hotspot.utilities.Hashtable {
...
@@ -44,12 +44,10 @@ public class SymbolTable extends sun.jvm.hotspot.utilities.Hashtable {
private
static
synchronized
void
initialize
(
TypeDataBase
db
)
{
private
static
synchronized
void
initialize
(
TypeDataBase
db
)
{
Type
type
=
db
.
lookupType
(
"SymbolTable"
);
Type
type
=
db
.
lookupType
(
"SymbolTable"
);
theTableField
=
type
.
getAddressField
(
"_the_table"
);
theTableField
=
type
.
getAddressField
(
"_the_table"
);
symbolTableSize
=
db
.
lookupIntConstant
(
"SymbolTable::symbol_table_size"
).
intValue
();
}
}
// Fields
// Fields
private
static
AddressField
theTableField
;
private
static
AddressField
theTableField
;
private
static
int
symbolTableSize
;
// Accessors
// Accessors
public
static
SymbolTable
getTheTable
()
{
public
static
SymbolTable
getTheTable
()
{
...
@@ -57,10 +55,6 @@ public class SymbolTable extends sun.jvm.hotspot.utilities.Hashtable {
...
@@ -57,10 +55,6 @@ public class SymbolTable extends sun.jvm.hotspot.utilities.Hashtable {
return
(
SymbolTable
)
VMObjectFactory
.
newObject
(
SymbolTable
.
class
,
tmp
);
return
(
SymbolTable
)
VMObjectFactory
.
newObject
(
SymbolTable
.
class
,
tmp
);
}
}
public
static
int
getSymbolTableSize
()
{
return
symbolTableSize
;
}
public
SymbolTable
(
Address
addr
)
{
public
SymbolTable
(
Address
addr
)
{
super
(
addr
);
super
(
addr
);
}
}
...
...
src/share/vm/classfile/symbolTable.hpp
浏览文件 @
e8a3fda0
...
@@ -107,18 +107,13 @@ private:
...
@@ -107,18 +107,13 @@ private:
add
(
loader_data
,
cp
,
names_count
,
name
,
lengths
,
cp_indices
,
hashValues
,
THREAD
);
add
(
loader_data
,
cp
,
names_count
,
name
,
lengths
,
cp_indices
,
hashValues
,
THREAD
);
}
}
// Table size
enum
{
symbol_table_size
=
20011
};
Symbol
*
lookup
(
int
index
,
const
char
*
name
,
int
len
,
unsigned
int
hash
);
Symbol
*
lookup
(
int
index
,
const
char
*
name
,
int
len
,
unsigned
int
hash
);
SymbolTable
()
SymbolTable
()
:
Hashtable
<
Symbol
*
,
mtSymbol
>
(
symbol_table_s
ize
,
sizeof
(
HashtableEntry
<
Symbol
*
,
mtSymbol
>
))
{}
:
Hashtable
<
Symbol
*
,
mtSymbol
>
(
SymbolTableS
ize
,
sizeof
(
HashtableEntry
<
Symbol
*
,
mtSymbol
>
))
{}
SymbolTable
(
HashtableBucket
<
mtSymbol
>*
t
,
int
number_of_entries
)
SymbolTable
(
HashtableBucket
<
mtSymbol
>*
t
,
int
number_of_entries
)
:
Hashtable
<
Symbol
*
,
mtSymbol
>
(
symbol_table_s
ize
,
sizeof
(
HashtableEntry
<
Symbol
*
,
mtSymbol
>
),
t
,
:
Hashtable
<
Symbol
*
,
mtSymbol
>
(
SymbolTableS
ize
,
sizeof
(
HashtableEntry
<
Symbol
*
,
mtSymbol
>
),
t
,
number_of_entries
)
{}
number_of_entries
)
{}
// Arena for permanent symbols (null class loader) that are never unloaded
// Arena for permanent symbols (null class loader) that are never unloaded
...
@@ -136,6 +131,9 @@ public:
...
@@ -136,6 +131,9 @@ public:
// The symbol table
// The symbol table
static
SymbolTable
*
the_table
()
{
return
_the_table
;
}
static
SymbolTable
*
the_table
()
{
return
_the_table
;
}
// Size of one bucket in the string table. Used when checking for rollover.
static
uint
bucket_size
()
{
return
sizeof
(
HashtableBucket
<
mtSymbol
>
);
}
static
void
create_table
()
{
static
void
create_table
()
{
assert
(
_the_table
==
NULL
,
"One symbol table allowed."
);
assert
(
_the_table
==
NULL
,
"One symbol table allowed."
);
_the_table
=
new
SymbolTable
();
_the_table
=
new
SymbolTable
();
...
@@ -145,8 +143,11 @@ public:
...
@@ -145,8 +143,11 @@ public:
static
void
create_table
(
HashtableBucket
<
mtSymbol
>*
t
,
int
length
,
static
void
create_table
(
HashtableBucket
<
mtSymbol
>*
t
,
int
length
,
int
number_of_entries
)
{
int
number_of_entries
)
{
assert
(
_the_table
==
NULL
,
"One symbol table allowed."
);
assert
(
_the_table
==
NULL
,
"One symbol table allowed."
);
assert
(
length
==
symbol_table_size
*
sizeof
(
HashtableBucket
<
mtSymbol
>
),
"bad shared symbol size."
);
// If CDS archive used a different symbol table size, use that size instead
// which is better than giving an error.
SymbolTableSize
=
length
/
bucket_size
();
_the_table
=
new
SymbolTable
(
t
,
number_of_entries
);
_the_table
=
new
SymbolTable
(
t
,
number_of_entries
);
// if CDS give symbol table a default arena size since most symbols
// if CDS give symbol table a default arena size since most symbols
// are already allocated in the shared misc section.
// are already allocated in the shared misc section.
...
...
src/share/vm/runtime/arguments.cpp
浏览文件 @
e8a3fda0
...
@@ -2045,6 +2045,9 @@ bool Arguments::check_vm_args_consistency() {
...
@@ -2045,6 +2045,9 @@ bool Arguments::check_vm_args_consistency() {
status
=
status
&&
verify_interval
(
StringTableSize
,
minimumStringTableSize
,
status
=
status
&&
verify_interval
(
StringTableSize
,
minimumStringTableSize
,
(
max_uintx
/
StringTable
::
bucket_size
()),
"StringTable size"
);
(
max_uintx
/
StringTable
::
bucket_size
()),
"StringTable size"
);
status
=
status
&&
verify_interval
(
SymbolTableSize
,
minimumSymbolTableSize
,
(
max_uintx
/
SymbolTable
::
bucket_size
()),
"SymbolTable size"
);
if
(
MinHeapFreeRatio
>
MaxHeapFreeRatio
)
{
if
(
MinHeapFreeRatio
>
MaxHeapFreeRatio
)
{
jio_fprintf
(
defaultStream
::
error_stream
(),
jio_fprintf
(
defaultStream
::
error_stream
(),
"MinHeapFreeRatio ("
UINTX_FORMAT
") must be less than or "
"MinHeapFreeRatio ("
UINTX_FORMAT
") must be less than or "
...
...
src/share/vm/runtime/globals.hpp
浏览文件 @
e8a3fda0
...
@@ -3727,6 +3727,9 @@ class CommandLineFlags {
...
@@ -3727,6 +3727,9 @@ class CommandLineFlags {
product(uintx, StringTableSize, defaultStringTableSize, \
product(uintx, StringTableSize, defaultStringTableSize, \
"Number of buckets in the interned String table") \
"Number of buckets in the interned String table") \
\
\
experimental(uintx, SymbolTableSize, defaultSymbolTableSize, \
"Number of buckets in the JVM internal Symbol table") \
\
develop(bool, TraceDefaultMethods, false, \
develop(bool, TraceDefaultMethods, false, \
"Trace the default method processing steps") \
"Trace the default method processing steps") \
\
\
...
...
src/share/vm/runtime/vmStructs.cpp
浏览文件 @
e8a3fda0
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
#include "classfile/javaClasses.hpp"
#include "classfile/javaClasses.hpp"
#include "classfile/loaderConstraints.hpp"
#include "classfile/loaderConstraints.hpp"
#include "classfile/placeholders.hpp"
#include "classfile/placeholders.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/systemDictionary.hpp"
#include "ci/ciField.hpp"
#include "ci/ciField.hpp"
#include "ci/ciInstance.hpp"
#include "ci/ciInstance.hpp"
...
@@ -2249,12 +2248,6 @@ typedef BinaryTreeDictionary<Metablock, FreeList> MetablockTreeDictionary;
...
@@ -2249,12 +2248,6 @@ typedef BinaryTreeDictionary<Metablock, FreeList> MetablockTreeDictionary;
declare_preprocessor_constant("PERFDATA_BIG_ENDIAN", PERFDATA_BIG_ENDIAN) \
declare_preprocessor_constant("PERFDATA_BIG_ENDIAN", PERFDATA_BIG_ENDIAN) \
declare_preprocessor_constant("PERFDATA_LITTLE_ENDIAN", PERFDATA_LITTLE_ENDIAN) \
declare_preprocessor_constant("PERFDATA_LITTLE_ENDIAN", PERFDATA_LITTLE_ENDIAN) \
\
\
/***************/
\
/* SymbolTable */
\
/***************/
\
\
declare_constant(SymbolTable::symbol_table_size) \
\
/***********************************/
\
/***********************************/
\
/* LoaderConstraintTable constants */
\
/* LoaderConstraintTable constants */
\
/***********************************/
\
/***********************************/
\
...
...
src/share/vm/utilities/globalDefinitions.hpp
浏览文件 @
e8a3fda0
...
@@ -333,6 +333,9 @@ const int max_method_code_size = 64*K - 1; // JVM spec, 2nd ed. section 4.8.1 (
...
@@ -333,6 +333,9 @@ const int max_method_code_size = 64*K - 1; // JVM spec, 2nd ed. section 4.8.1 (
const
int
defaultStringTableSize
=
NOT_LP64
(
1009
)
LP64_ONLY
(
60013
);
const
int
defaultStringTableSize
=
NOT_LP64
(
1009
)
LP64_ONLY
(
60013
);
const
int
minimumStringTableSize
=
1009
;
const
int
minimumStringTableSize
=
1009
;
const
int
defaultSymbolTableSize
=
20011
;
const
int
minimumSymbolTableSize
=
1009
;
//----------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------
// HotSwap - for JVMTI aka Class File Replacement and PopFrame
// HotSwap - for JVMTI aka Class File Replacement and PopFrame
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录