Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
7830f2dd
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看板
提交
7830f2dd
编写于
2月 16, 2012
作者:
J
jcoomes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7146343: PS invoke methods should indicate the type of gc done
Reviewed-by: stefank, jmasa
上级
33a49849
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
32 addition
and
24 deletion
+32
-24
src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp
...are/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp
+4
-2
src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.hpp
...are/vm/gc_implementation/parallelScavenge/psMarkSweep.hpp
+2
-2
src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
.../gc_implementation/parallelScavenge/psParallelCompact.cpp
+4
-2
src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp
.../gc_implementation/parallelScavenge/psParallelCompact.hpp
+2
-2
src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp
...hare/vm/gc_implementation/parallelScavenge/psScavenge.cpp
+17
-12
src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp
...hare/vm/gc_implementation/parallelScavenge/psScavenge.hpp
+3
-4
未找到文件。
src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp
浏览文件 @
7830f2dd
...
...
@@ -100,12 +100,12 @@ void PSMarkSweep::invoke(bool maximum_heap_compaction) {
// This method contains no policy. You should probably
// be calling invoke() instead.
void
PSMarkSweep
::
invoke_no_policy
(
bool
clear_all_softrefs
)
{
bool
PSMarkSweep
::
invoke_no_policy
(
bool
clear_all_softrefs
)
{
assert
(
SafepointSynchronize
::
is_at_safepoint
(),
"must be at a safepoint"
);
assert
(
ref_processor
()
!=
NULL
,
"Sanity"
);
if
(
GC_locker
::
check_active_before_gc
())
{
return
;
return
false
;
}
ParallelScavengeHeap
*
heap
=
(
ParallelScavengeHeap
*
)
Universe
::
heap
();
...
...
@@ -382,6 +382,8 @@ void PSMarkSweep::invoke_no_policy(bool clear_all_softrefs) {
#ifdef TRACESPINNING
ParallelTaskTerminator
::
print_termination_counts
();
#endif
return
true
;
}
bool
PSMarkSweep
::
absorb_live_data_from_eden
(
PSAdaptiveSizePolicy
*
size_policy
,
...
...
src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.hpp
浏览文件 @
7830f2dd
/*
* Copyright (c) 2001, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -78,7 +78,7 @@ class PSMarkSweep : public MarkSweep {
public:
static
void
invoke
(
bool
clear_all_softrefs
);
static
void
invoke_no_policy
(
bool
clear_all_softrefs
);
static
bool
invoke_no_policy
(
bool
clear_all_softrefs
);
static
void
initialize
();
...
...
src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
浏览文件 @
7830f2dd
...
...
@@ -1993,12 +1993,12 @@ bool ParallelCompactData::region_contains(size_t region_index, HeapWord* addr) {
// This method contains no policy. You should probably
// be calling invoke() instead.
void
PSParallelCompact
::
invoke_no_policy
(
bool
maximum_heap_compaction
)
{
bool
PSParallelCompact
::
invoke_no_policy
(
bool
maximum_heap_compaction
)
{
assert
(
SafepointSynchronize
::
is_at_safepoint
(),
"must be at a safepoint"
);
assert
(
ref_processor
()
!=
NULL
,
"Sanity"
);
if
(
GC_locker
::
check_active_before_gc
())
{
return
;
return
false
;
}
TimeStamp
marking_start
;
...
...
@@ -2248,6 +2248,8 @@ void PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
#ifdef TRACESPINNING
ParallelTaskTerminator
::
print_termination_counts
();
#endif
return
true
;
}
bool
PSParallelCompact
::
absorb_live_data_from_eden
(
PSAdaptiveSizePolicy
*
size_policy
,
...
...
src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp
浏览文件 @
7830f2dd
/*
* Copyright (c) 2005, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -1057,7 +1057,7 @@ class PSParallelCompact : AllStatic {
}
static
void
invoke
(
bool
maximum_heap_compaction
);
static
void
invoke_no_policy
(
bool
maximum_heap_compaction
);
static
bool
invoke_no_policy
(
bool
maximum_heap_compaction
);
static
void
post_initialize
();
// Perform initialization for PSParallelCompact that requires
...
...
src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp
浏览文件 @
7830f2dd
...
...
@@ -215,36 +215,41 @@ void PSRefProcTaskExecutor::execute(EnqueueTask& task)
//
// Note that this method should only be called from the vm_thread while
// at a safepoint!
void
PSScavenge
::
invoke
()
{
bool
PSScavenge
::
invoke
()
{
assert
(
SafepointSynchronize
::
is_at_safepoint
(),
"should be at safepoint"
);
assert
(
Thread
::
current
()
==
(
Thread
*
)
VMThread
::
vm_thread
(),
"should be in vm thread"
);
assert
(
!
Universe
::
heap
()
->
is_gc_active
(),
"not reentrant"
);
ParallelScavengeHeap
*
heap
=
(
ParallelScavengeHeap
*
)
Universe
::
heap
();
ParallelScavengeHeap
*
const
heap
=
(
ParallelScavengeHeap
*
)
Universe
::
heap
();
assert
(
heap
->
kind
()
==
CollectedHeap
::
ParallelScavengeHeap
,
"Sanity"
);
PSAdaptiveSizePolicy
*
policy
=
heap
->
size_policy
();
IsGCActiveMark
mark
;
bool
scavenge_was_done
=
PSScavenge
::
invoke_no_policy
();
const
bool
scavenge_done
=
PSScavenge
::
invoke_no_policy
();
const
bool
need_full_gc
=
!
scavenge_done
||
policy
->
should_full_GC
(
heap
->
old_gen
()
->
free_in_bytes
());
bool
full_gc_done
=
false
;
PSGCAdaptivePolicyCounters
*
counters
=
heap
->
gc_policy_counters
();
if
(
UsePerfData
)
co
unters
->
update_full_follows_scavenge
(
0
)
;
if
(
!
scavenge_was_done
||
policy
->
should_full_GC
(
heap
->
old_gen
()
->
free_in_bytes
()))
{
if
(
UsePerfData
)
counters
->
update_full_follows_scavenge
(
full_follows_scavenge
);
if
(
UsePerfData
)
{
PSGCAdaptivePolicyCounters
*
const
counters
=
heap
->
gc_policy_counters
();
co
nst
int
ffs_val
=
need_full_gc
?
full_follows_scavenge
:
not_skipped
;
counters
->
update_full_follows_scavenge
(
ffs_val
);
}
if
(
need_full_gc
)
{
GCCauseSetter
gccs
(
heap
,
GCCause
::
_adaptive_size_policy
);
CollectorPolicy
*
cp
=
heap
->
collector_policy
();
const
bool
clear_all_softrefs
=
cp
->
should_clear_all_soft_refs
();
if
(
UseParallelOldGC
)
{
PSParallelCompact
::
invoke_no_policy
(
clear_all_softrefs
);
full_gc_done
=
PSParallelCompact
::
invoke_no_policy
(
clear_all_softrefs
);
}
else
{
PSMarkSweep
::
invoke_no_policy
(
clear_all_softrefs
);
full_gc_done
=
PSMarkSweep
::
invoke_no_policy
(
clear_all_softrefs
);
}
}
return
full_gc_done
;
}
// This method contains no policy. You should probably
...
...
src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp
浏览文件 @
7830f2dd
...
...
@@ -117,10 +117,9 @@ class PSScavenge: AllStatic {
// Called by parallelScavengeHeap to init the tenuring threshold
static
void
initialize
();
// Scavenge entry point
static
void
invoke
();
// Return true is a collection was done. Return
// false if the collection was skipped.
// Scavenge entry point. This may invoke a full gc; return true if so.
static
bool
invoke
();
// Return true if a collection was done; false otherwise.
static
bool
invoke_no_policy
();
// If an attempt to promote fails, this method is invoked
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录