Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
c1b56ef0
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看板
提交
c1b56ef0
编写于
10月 29, 2008
作者:
J
jcoomes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6765804: GC "dead ratios" should be unsigned
Reviewed-by: ysr, tonyp
上级
98b4cb87
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
27 addition
and
26 deletion
+27
-26
src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.cpp
..._implementation/parallelScavenge/psMarkSweepDecorator.cpp
+7
-7
src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.hpp
..._implementation/parallelScavenge/psMarkSweepDecorator.hpp
+12
-10
src/share/vm/memory/space.cpp
src/share/vm/memory/space.cpp
+2
-2
src/share/vm/memory/space.hpp
src/share/vm/memory/space.hpp
+4
-4
src/share/vm/memory/tenuredGeneration.hpp
src/share/vm/memory/tenuredGeneration.hpp
+0
-1
src/share/vm/runtime/globals.hpp
src/share/vm/runtime/globals.hpp
+2
-2
未找到文件。
src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.cpp
浏览文件 @
c1b56ef0
...
...
@@ -90,10 +90,10 @@ void PSMarkSweepDecorator::precompact() {
*/
bool
skip_dead
=
((
PSMarkSweep
::
total_invocations
()
%
MarkSweepAlwaysCompactCount
)
!=
0
);
s
s
ize_t
allowed_deadspace
=
0
;
size_t
allowed_deadspace
=
0
;
if
(
skip_dead
)
{
in
t
ratio
=
allowed_dead_ratio
();
allowed_deadspace
=
(
space
()
->
capacity_in_bytes
()
*
ratio
/
100
)
/
HeapWordSize
;
const
size_
t
ratio
=
allowed_dead_ratio
();
allowed_deadspace
=
space
()
->
capacity_in_words
()
*
ratio
/
100
;
}
// Fetch the current destination decorator
...
...
@@ -271,10 +271,10 @@ void PSMarkSweepDecorator::precompact() {
dest
->
set_compaction_top
(
compact_top
);
}
bool
PSMarkSweepDecorator
::
insert_deadspace
(
s
s
ize_t
&
allowed_deadspace_words
,
bool
PSMarkSweepDecorator
::
insert_deadspace
(
size_t
&
allowed_deadspace_words
,
HeapWord
*
q
,
size_t
deadlength
)
{
if
(
allowed_deadspace_words
>=
deadlength
)
{
allowed_deadspace_words
-=
deadlength
;
if
(
allowed_deadspace_words
>=
0
)
{
oop
(
q
)
->
set_mark
(
markOopDesc
::
prototype
()
->
set_marked
());
const
size_t
aligned_min_int_array_size
=
align_object_size
(
typeArrayOopDesc
::
header_size
(
T_INT
));
...
...
src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.hpp
浏览文件 @
c1b56ef0
...
...
@@ -39,14 +39,16 @@ class PSMarkSweepDecorator: public CHeapObj {
HeapWord
*
_first_dead
;
HeapWord
*
_end_of_live
;
HeapWord
*
_compaction_top
;
unsigned
in
t
_allowed_dead_ratio
;
size_
t
_allowed_dead_ratio
;
bool
insert_deadspace
(
ssize_t
&
allowed_deadspace_words
,
HeapWord
*
q
,
size_t
word_len
);
bool
insert_deadspace
(
size_t
&
allowed_deadspace_words
,
HeapWord
*
q
,
size_t
word_len
);
public:
PSMarkSweepDecorator
(
MutableSpace
*
space
,
ObjectStartArray
*
start_array
,
unsigned
int
allowed_dead_ratio
)
:
_space
(
space
),
_start_array
(
start_array
),
_allowed_dead_ratio
(
allowed_dead_ratio
)
{
}
size_t
allowed_dead_ratio
)
:
_space
(
space
),
_start_array
(
start_array
),
_allowed_dead_ratio
(
allowed_dead_ratio
)
{
}
// During a compacting collection, we need to collapse objects into
// spaces in a given order. We want to fill space A, space B, and so
...
...
@@ -63,8 +65,8 @@ class PSMarkSweepDecorator: public CHeapObj {
HeapWord
*
compaction_top
()
{
return
_compaction_top
;
}
void
set_compaction_top
(
HeapWord
*
value
)
{
_compaction_top
=
value
;
}
unsigned
in
t
allowed_dead_ratio
()
{
return
_allowed_dead_ratio
;
}
void
set_allowed_dead_ratio
(
unsigned
in
t
value
)
{
_allowed_dead_ratio
=
value
;
}
size_
t
allowed_dead_ratio
()
{
return
_allowed_dead_ratio
;
}
void
set_allowed_dead_ratio
(
size_
t
value
)
{
_allowed_dead_ratio
=
value
;
}
// Work methods
void
adjust_pointers
();
...
...
src/share/vm/memory/space.cpp
浏览文件 @
c1b56ef0
...
...
@@ -997,11 +997,11 @@ void OffsetTableContigSpace::serialize_block_offset_array_offsets(
}
in
t
TenuredSpace
::
allowed_dead_ratio
()
const
{
size_
t
TenuredSpace
::
allowed_dead_ratio
()
const
{
return
MarkSweepDeadRatio
;
}
in
t
ContigPermSpace
::
allowed_dead_ratio
()
const
{
size_
t
ContigPermSpace
::
allowed_dead_ratio
()
const
{
return
PermMarkSweepDeadRatio
;
}
src/share/vm/memory/space.hpp
浏览文件 @
c1b56ef0
...
...
@@ -421,7 +421,7 @@ public:
// The maximum percentage of objects that can be dead in the compacted
// live part of a compacted space ("deadwood" support.)
virtual
in
t
allowed_dead_ratio
()
const
{
return
0
;
};
virtual
size_
t
allowed_dead_ratio
()
const
{
return
0
;
};
// Some contiguous spaces may maintain some data structures that should
// be updated whenever an allocation crosses a boundary. This function
...
...
@@ -507,7 +507,7 @@ protected:
\
size_t allowed_deadspace = 0; \
if (skip_dead) { \
int ratio = allowed_dead_ratio();
\
const size_t ratio = allowed_dead_ratio();
\
allowed_deadspace = (capacity() * ratio / 100) / HeapWordSize; \
} \
\
...
...
@@ -1079,7 +1079,7 @@ class TenuredSpace: public OffsetTableContigSpace {
friend
class
VMStructs
;
protected:
// Mark sweep support
in
t
allowed_dead_ratio
()
const
;
size_
t
allowed_dead_ratio
()
const
;
public:
// Constructor
TenuredSpace
(
BlockOffsetSharedArray
*
sharedOffsetArray
,
...
...
@@ -1094,7 +1094,7 @@ class ContigPermSpace: public OffsetTableContigSpace {
friend
class
VMStructs
;
protected:
// Mark sweep support
in
t
allowed_dead_ratio
()
const
;
size_
t
allowed_dead_ratio
()
const
;
public:
// Constructor
ContigPermSpace
(
BlockOffsetSharedArray
*
sharedOffsetArray
,
MemRegion
mr
)
:
...
...
src/share/vm/memory/tenuredGeneration.hpp
浏览文件 @
c1b56ef0
...
...
@@ -73,7 +73,6 @@ class TenuredGeneration: public OneContigSpaceCardGeneration {
// Mark sweep support
void
compute_new_size
();
int
allowed_dead_ratio
()
const
;
virtual
void
gc_prologue
(
bool
full
);
virtual
void
gc_epilogue
(
bool
full
);
...
...
src/share/vm/runtime/globals.hpp
浏览文件 @
c1b56ef0
...
...
@@ -2792,7 +2792,7 @@ class CommandLineFlags {
product(intx, TargetSurvivorRatio, 50, \
"Desired percentage of survivor space used after scavenge") \
\
product(
intx, MarkSweepDeadRatio, 5,
\
product(
uintx, MarkSweepDeadRatio, 5,
\
"Percentage (0-100) of the old gen allowed as dead wood." \
"Serial mark sweep treats this as both the min and max value." \
"CMS uses this value only if it falls back to mark sweep." \
...
...
@@ -2801,7 +2801,7 @@ class CommandLineFlags {
"either completely full or completely empty. Par compact also" \
"has a smaller default value; see arguments.cpp.") \
\
product(
intx, PermMarkSweepDeadRatio, 20,
\
product(
uintx, PermMarkSweepDeadRatio, 20,
\
"Percentage (0-100) of the perm gen allowed as dead wood." \
"See MarkSweepDeadRatio for collector-specific comments.") \
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录