Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
e1922b9a
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看板
提交
e1922b9a
编写于
3月 21, 2011
作者:
J
jcoomes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6962930: make the string table size configurable
Reviewed-by: never, phh, stefank, kamg, dholmes, coleenp
上级
86905dda
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
32 addition
and
29 deletion
+32
-29
agent/src/share/classes/sun/jvm/hotspot/memory/StringTable.java
...src/share/classes/sun/jvm/hotspot/memory/StringTable.java
+0
-6
src/share/vm/classfile/symbolTable.hpp
src/share/vm/classfile/symbolTable.hpp
+5
-9
src/share/vm/runtime/arguments.cpp
src/share/vm/runtime/arguments.cpp
+24
-8
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
-6
未找到文件。
agent/src/share/classes/sun/jvm/hotspot/memory/StringTable.java
浏览文件 @
e1922b9a
...
@@ -44,12 +44,10 @@ public class StringTable extends sun.jvm.hotspot.utilities.Hashtable {
...
@@ -44,12 +44,10 @@ public class StringTable extends sun.jvm.hotspot.utilities.Hashtable {
private
static
synchronized
void
initialize
(
TypeDataBase
db
)
{
private
static
synchronized
void
initialize
(
TypeDataBase
db
)
{
Type
type
=
db
.
lookupType
(
"StringTable"
);
Type
type
=
db
.
lookupType
(
"StringTable"
);
theTableField
=
type
.
getAddressField
(
"_the_table"
);
theTableField
=
type
.
getAddressField
(
"_the_table"
);
stringTableSize
=
db
.
lookupIntConstant
(
"StringTable::string_table_size"
).
intValue
();
}
}
// Fields
// Fields
private
static
AddressField
theTableField
;
private
static
AddressField
theTableField
;
private
static
int
stringTableSize
;
// Accessors
// Accessors
public
static
StringTable
getTheTable
()
{
public
static
StringTable
getTheTable
()
{
...
@@ -57,10 +55,6 @@ public class StringTable extends sun.jvm.hotspot.utilities.Hashtable {
...
@@ -57,10 +55,6 @@ public class StringTable extends sun.jvm.hotspot.utilities.Hashtable {
return
(
StringTable
)
VMObjectFactory
.
newObject
(
StringTable
.
class
,
tmp
);
return
(
StringTable
)
VMObjectFactory
.
newObject
(
StringTable
.
class
,
tmp
);
}
}
public
static
int
getStringTableSize
()
{
return
stringTableSize
;
}
public
StringTable
(
Address
addr
)
{
public
StringTable
(
Address
addr
)
{
super
(
addr
);
super
(
addr
);
}
}
...
...
src/share/vm/classfile/symbolTable.hpp
浏览文件 @
e1922b9a
...
@@ -216,18 +216,14 @@ private:
...
@@ -216,18 +216,14 @@ private:
oop
basic_add
(
int
index
,
Handle
string_or_null
,
jchar
*
name
,
int
len
,
oop
basic_add
(
int
index
,
Handle
string_or_null
,
jchar
*
name
,
int
len
,
unsigned
int
hashValue
,
TRAPS
);
unsigned
int
hashValue
,
TRAPS
);
// Table size
enum
{
string_table_size
=
1009
};
oop
lookup
(
int
index
,
jchar
*
chars
,
int
length
,
unsigned
int
hashValue
);
oop
lookup
(
int
index
,
jchar
*
chars
,
int
length
,
unsigned
int
hashValue
);
StringTable
()
:
Hashtable
<
oop
>
(
string_table_size
,
sizeof
(
HashtableEntry
<
oop
>
))
{}
StringTable
()
:
Hashtable
<
oop
>
((
int
)
StringTableSize
,
sizeof
(
HashtableEntry
<
oop
>
))
{}
StringTable
(
HashtableBucket
*
t
,
int
number_of_entries
)
StringTable
(
HashtableBucket
*
t
,
int
number_of_entries
)
:
Hashtable
<
oop
>
(
string_table_s
ize
,
sizeof
(
HashtableEntry
<
oop
>
),
t
,
:
Hashtable
<
oop
>
(
(
int
)
StringTableS
ize
,
sizeof
(
HashtableEntry
<
oop
>
),
t
,
number_of_entries
)
{}
number_of_entries
)
{}
public:
public:
// The string table
// The string table
...
@@ -241,7 +237,7 @@ public:
...
@@ -241,7 +237,7 @@ public:
static
void
create_table
(
HashtableBucket
*
t
,
int
length
,
static
void
create_table
(
HashtableBucket
*
t
,
int
length
,
int
number_of_entries
)
{
int
number_of_entries
)
{
assert
(
_the_table
==
NULL
,
"One string table allowed."
);
assert
(
_the_table
==
NULL
,
"One string table allowed."
);
assert
(
length
==
string_table_s
ize
*
sizeof
(
HashtableBucket
),
assert
(
(
size_t
)
length
==
StringTableS
ize
*
sizeof
(
HashtableBucket
),
"bad shared string size."
);
"bad shared string size."
);
_the_table
=
new
StringTable
(
t
,
number_of_entries
);
_the_table
=
new
StringTable
(
t
,
number_of_entries
);
}
}
...
...
src/share/vm/runtime/arguments.cpp
浏览文件 @
e1922b9a
...
@@ -2819,22 +2819,38 @@ jint Arguments::parse_options_environment_variable(const char* name, SysClassPat
...
@@ -2819,22 +2819,38 @@ jint Arguments::parse_options_environment_variable(const char* name, SysClassPat
}
}
void
Arguments
::
set_shared_spaces_flags
()
{
void
Arguments
::
set_shared_spaces_flags
()
{
const
bool
must_share
=
DumpSharedSpaces
||
RequireSharedSpaces
;
const
bool
might_share
=
must_share
||
UseSharedSpaces
;
// The string table is part of the shared archive so the size must match.
if
(
!
FLAG_IS_DEFAULT
(
StringTableSize
))
{
// Disable sharing.
if
(
must_share
)
{
warning
(
"disabling shared archive %s because of non-default "
"StringTableSize"
,
DumpSharedSpaces
?
"creation"
:
"use"
);
}
if
(
might_share
)
{
FLAG_SET_DEFAULT
(
DumpSharedSpaces
,
false
);
FLAG_SET_DEFAULT
(
RequireSharedSpaces
,
false
);
FLAG_SET_DEFAULT
(
UseSharedSpaces
,
false
);
}
return
;
}
// Check whether class data sharing settings conflict with GC, compressed oops
// Check whether class data sharing settings conflict with GC, compressed oops
// or page size, and fix them up. Explicit sharing options override other
// or page size, and fix them up. Explicit sharing options override other
// settings.
// settings.
const
bool
cannot_share
=
UseConcMarkSweepGC
||
CMSIncrementalMode
||
const
bool
cannot_share
=
UseConcMarkSweepGC
||
CMSIncrementalMode
||
UseG1GC
||
UseParNewGC
||
UseParallelGC
||
UseParallelOldGC
||
UseG1GC
||
UseParNewGC
||
UseParallelGC
||
UseParallelOldGC
||
UseCompressedOops
||
UseLargePages
&&
FLAG_IS_CMDLINE
(
UseLargePages
);
UseCompressedOops
||
UseLargePages
&&
FLAG_IS_CMDLINE
(
UseLargePages
);
const
bool
must_share
=
DumpSharedSpaces
||
RequireSharedSpaces
;
const
bool
might_share
=
must_share
||
UseSharedSpaces
;
if
(
cannot_share
)
{
if
(
cannot_share
)
{
if
(
must_share
)
{
if
(
must_share
)
{
warning
(
"selecting serial gc and disabling large pages %s"
warning
(
"selecting serial gc and disabling large pages %s"
"because of %s"
,
""
LP64_ONLY
(
"and compressed oops "
),
"because of %s"
,
""
LP64_ONLY
(
"and compressed oops "
),
DumpSharedSpaces
?
"-Xshare:dump"
:
"-Xshare:on"
);
DumpSharedSpaces
?
"-Xshare:dump"
:
"-Xshare:on"
);
force_serial_gc
();
force_serial_gc
();
FLAG_SET_CMDLINE
(
bool
,
UseLargePages
,
false
);
FLAG_SET_CMDLINE
(
bool
,
UseLargePages
,
false
);
LP64_ONLY
(
FLAG_SET_CMDLINE
(
bool
,
UseCompressedOops
,
false
));
LP64_ONLY
(
FLAG_SET_CMDLINE
(
bool
,
UseCompressedOops
,
false
));
}
else
{
}
else
{
if
(
UseSharedSpaces
&&
Verbose
)
{
if
(
UseSharedSpaces
&&
Verbose
)
{
warning
(
"turning off use of shared archive because of "
warning
(
"turning off use of shared archive because of "
...
...
src/share/vm/runtime/globals.hpp
浏览文件 @
e1922b9a
...
@@ -3756,6 +3756,9 @@ class CommandLineFlags {
...
@@ -3756,6 +3756,9 @@ class CommandLineFlags {
diagnostic(bool, PrintDTraceDOF, false, \
diagnostic(bool, PrintDTraceDOF, false, \
"Print the DTrace DOF passed to the system for JSDT probes") \
"Print the DTrace DOF passed to the system for JSDT probes") \
\
\
product(uintx, StringTableSize, 1009, \
"Number of buckets in the interned String table") \
\
product(bool, UseVMInterruptibleIO, false, \
product(bool, UseVMInterruptibleIO, false, \
"(Unstable, Solaris-specific) Thread interrupt before or with " \
"(Unstable, Solaris-specific) Thread interrupt before or with " \
"EINTR for I/O operations results in OS_INTRPT. The default value"\
"EINTR for I/O operations results in OS_INTRPT. The default value"\
...
...
src/share/vm/runtime/vmStructs.cpp
浏览文件 @
e1922b9a
...
@@ -1553,12 +1553,6 @@ static inline uint64_t cast_uint64_t(size_t x)
...
@@ -1553,12 +1553,6 @@ static inline uint64_t cast_uint64_t(size_t x)
\
\
declare_constant(SymbolTable::symbol_table_size) \
declare_constant(SymbolTable::symbol_table_size) \
\
\
/***************/
\
/* StringTable */
\
/***************/
\
\
declare_constant(StringTable::string_table_size) \
\
/********************/
\
/********************/
\
/* SystemDictionary */
\
/* SystemDictionary */
\
/********************/
\
/********************/
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录