Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
ab5f5b5a
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ab5f5b5a
编写于
8月 04, 2008
作者:
J
jmasa
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
bd8d236a
98784c4c
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
87 addition
and
53 deletion
+87
-53
make/windows/makefiles/defs.make
make/windows/makefiles/defs.make
+1
-1
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
...ion/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
+6
-21
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp
...ion/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp
+6
-4
src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp
src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp
+17
-2
src/share/vm/gc_implementation/shared/spaceDecorator.cpp
src/share/vm/gc_implementation/shared/spaceDecorator.cpp
+2
-1
src/share/vm/memory/compactingPermGenGen.cpp
src/share/vm/memory/compactingPermGenGen.cpp
+4
-2
src/share/vm/memory/compactingPermGenGen.hpp
src/share/vm/memory/compactingPermGenGen.hpp
+1
-1
src/share/vm/memory/generation.cpp
src/share/vm/memory/generation.cpp
+37
-18
src/share/vm/memory/generation.hpp
src/share/vm/memory/generation.hpp
+13
-3
未找到文件。
make/windows/makefiles/defs.make
浏览文件 @
ab5f5b5a
...
...
@@ -107,7 +107,7 @@ ifeq ($(USING_CYGWIN), true)
ABS_OUTPUTDIR
:=
$(
subst
/,
\\
,
$(
shell
/bin/cygpath
-m
-a
"
$(OUTPUTDIR)
"
))
ABS_BOOTDIR
:=
$(
subst
/,
\\
,
$(
shell
/bin/cygpath
-m
-a
"
$(BOOTDIR)
"
))
ABS_GAMMADIR
:=
$(
subst
/,
\\
,
$(
shell
/bin/cygpath
-m
-a
"
$(GAMMADIR)
"
))
ABS_OS_MAKEFILE
:=
$(
shell
/bin/cygpath
-m
-a
"
$(HS_
BUILD
_DIR)
/
$(OSNAME)
"
)
/build.make
ABS_OS_MAKEFILE
:=
$(
shell
/bin/cygpath
-m
-a
"
$(HS_
MAKE
_DIR)
/
$(OSNAME)
"
)
/build.make
else
ABS_OUTPUTDIR
:=
$(
subst
/,
\\
,
$(
shell
$(CD)
$(OUTPUTDIR)
;
$(PWD)
))
ABS_BOOTDIR
:=
$(
subst
/,
\\
,
$(
shell
$(CD)
$(BOOTDIR)
;
$(PWD)
))
...
...
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
浏览文件 @
ab5f5b5a
...
...
@@ -3195,31 +3195,16 @@ ConcurrentMarkSweepGeneration::expand_and_allocate(size_t word_size,
// YSR: All of this generation expansion/shrinking stuff is an exact copy of
// OneContigSpaceCardGeneration, which makes me wonder if we should move this
// to CardGeneration and share it...
bool
ConcurrentMarkSweepGeneration
::
expand
(
size_t
bytes
,
size_t
expand_bytes
)
{
return
CardGeneration
::
expand
(
bytes
,
expand_bytes
);
}
void
ConcurrentMarkSweepGeneration
::
expand
(
size_t
bytes
,
size_t
expand_bytes
,
CMSExpansionCause
::
Cause
cause
)
{
assert_locked_or_safepoint
(
Heap_lock
);
size_t
aligned_bytes
=
ReservedSpace
::
page_align_size_up
(
bytes
);
size_t
aligned_expand_bytes
=
ReservedSpace
::
page_align_size_up
(
expand_bytes
);
bool
success
=
false
;
if
(
aligned_expand_bytes
>
aligned_bytes
)
{
success
=
grow_by
(
aligned_expand_bytes
);
}
if
(
!
success
)
{
success
=
grow_by
(
aligned_bytes
);
}
if
(
!
success
)
{
size_t
remaining_bytes
=
_virtual_space
.
uncommitted_size
();
if
(
remaining_bytes
>
0
)
{
success
=
grow_by
(
remaining_bytes
);
}
}
if
(
GC_locker
::
is_active
())
{
if
(
PrintGC
&&
Verbose
)
{
gclog_or_tty
->
print_cr
(
"Garbage collection disabled, expanded heap instead"
);
}
}
bool
success
=
expand
(
bytes
,
expand_bytes
);
// remember why we expanded; this information is used
// by shouldConcurrentCollect() when making decisions on whether to start
// a new CMS cycle.
...
...
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp
浏览文件 @
ab5f5b5a
...
...
@@ -1048,10 +1048,6 @@ class ConcurrentMarkSweepGeneration: public CardGeneration {
double
_initiating_occupancy
;
protected:
// Grow generation by specified size (returns false if unable to grow)
bool
grow_by
(
size_t
bytes
);
// Grow generation to reserved size.
bool
grow_to_reserved
();
// Shrink generation by specified size (returns false if unable to shrink)
virtual
void
shrink_by
(
size_t
bytes
);
...
...
@@ -1103,6 +1099,11 @@ class ConcurrentMarkSweepGeneration: public CardGeneration {
// Override
virtual
void
ref_processor_init
();
// Grow generation by specified size (returns false if unable to grow)
bool
grow_by
(
size_t
bytes
);
// Grow generation to reserved size.
bool
grow_to_reserved
();
void
clear_expansion_cause
()
{
_expansion_cause
=
CMSExpansionCause
::
_no_expansion
;
}
// Space enquiries
...
...
@@ -1193,6 +1194,7 @@ class ConcurrentMarkSweepGeneration: public CardGeneration {
// Allocation failure
void
expand
(
size_t
bytes
,
size_t
expand_bytes
,
CMSExpansionCause
::
Cause
cause
);
virtual
bool
expand
(
size_t
bytes
,
size_t
expand_bytes
);
void
shrink
(
size_t
bytes
);
HeapWord
*
expand_and_par_lab_allocate
(
CMSParGCThreadState
*
ps
,
size_t
word_sz
);
bool
expand_and_ensure_spooling_space
(
PromotionInfo
*
promo
);
...
...
src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp
浏览文件 @
ab5f5b5a
...
...
@@ -215,10 +215,22 @@ HeapWord* PSOldGen::expand_and_cas_allocate(size_t word_size) {
}
void
PSOldGen
::
expand
(
size_t
bytes
)
{
if
(
bytes
==
0
)
{
return
;
}
MutexLocker
x
(
ExpandHeap_lock
);
const
size_t
alignment
=
virtual_space
()
->
alignment
();
size_t
aligned_bytes
=
align_size_up
(
bytes
,
alignment
);
size_t
aligned_expand_bytes
=
align_size_up
(
MinHeapDeltaBytes
,
alignment
);
if
(
aligned_bytes
==
0
){
// The alignment caused the number of bytes to wrap. An expand_by(0) will
// return true with the implication that and expansion was done when it
// was not. A call to expand implies a best effort to expand by "bytes"
// but not a guarantee. Align down to give a best effort. This is likely
// the most that the generation can expand since it has some capacity to
// start with.
aligned_bytes
=
align_size_down
(
bytes
,
alignment
);
}
bool
success
=
false
;
if
(
aligned_expand_bytes
>
aligned_bytes
)
{
...
...
@@ -231,8 +243,8 @@ void PSOldGen::expand(size_t bytes) {
success
=
expand_to_reserved
();
}
if
(
GC_locker
::
is_active
()
)
{
if
(
PrintGC
&&
Verbose
)
{
if
(
PrintGC
&&
Verbose
)
{
if
(
success
&&
GC_locker
::
is_active
()
)
{
gclog_or_tty
->
print_cr
(
"Garbage collection disabled, expanded heap instead"
);
}
}
...
...
@@ -241,6 +253,9 @@ void PSOldGen::expand(size_t bytes) {
bool
PSOldGen
::
expand_by
(
size_t
bytes
)
{
assert_lock_strong
(
ExpandHeap_lock
);
assert_locked_or_safepoint
(
Heap_lock
);
if
(
bytes
==
0
)
{
return
true
;
// That's what virtual_space()->expand_by(0) would return
}
bool
result
=
virtual_space
()
->
expand_by
(
bytes
);
if
(
result
)
{
if
(
ZapUnusedHeapArea
)
{
...
...
src/share/vm/gc_implementation/shared/spaceDecorator.cpp
浏览文件 @
ab5f5b5a
...
...
@@ -39,7 +39,8 @@ bool SpaceMangler::is_mangled(HeapWord* q) {
void
SpaceMangler
::
set_top_for_allocations
(
HeapWord
*
v
)
{
if
(
v
<
end
())
{
assert
(
is_mangled
(
v
),
"The high water mark is not mangled"
);
assert
(
!
CheckZapUnusedHeapArea
||
is_mangled
(
v
),
"The high water mark is not mangled"
);
}
_top_for_allocations
=
v
;
}
...
...
src/share/vm/memory/compactingPermGenGen.cpp
浏览文件 @
ab5f5b5a
...
...
@@ -432,14 +432,16 @@ bool CompactingPermGenGen::grow_by(size_t bytes) {
}
void
CompactingPermGenGen
::
grow_to_reserved
()
{
bool
CompactingPermGenGen
::
grow_to_reserved
()
{
// Don't allow _virtual_size to expand into shared spaces.
bool
success
=
false
;
if
(
_virtual_space
.
uncommitted_size
()
>
_shared_space_size
)
{
size_t
remaining_bytes
=
_virtual_space
.
uncommitted_size
()
-
_shared_space_size
;
bool
success
=
OneContigSpaceCardGeneration
::
grow_by
(
remaining_bytes
);
success
=
OneContigSpaceCardGeneration
::
grow_by
(
remaining_bytes
);
DEBUG_ONLY
(
if
(
!
success
)
warning
(
"grow to reserved failed"
);)
}
return
success
;
}
...
...
src/share/vm/memory/compactingPermGenGen.hpp
浏览文件 @
ab5f5b5a
...
...
@@ -184,7 +184,7 @@ public:
void
post_compact
();
size_t
contiguous_available
()
const
;
bool
grow_by
(
size_t
bytes
);
v
oid
grow_to_reserved
();
v
irtual
bool
grow_to_reserved
();
void
clear_remembered_set
();
void
invalidate_remembered_set
();
...
...
src/share/vm/memory/generation.cpp
浏览文件 @
ab5f5b5a
...
...
@@ -379,6 +379,41 @@ CardGeneration::CardGeneration(ReservedSpace rs, size_t initial_byte_size,
}
}
bool
CardGeneration
::
expand
(
size_t
bytes
,
size_t
expand_bytes
)
{
assert_locked_or_safepoint
(
Heap_lock
);
if
(
bytes
==
0
)
{
return
true
;
// That's what grow_by(0) would return
}
size_t
aligned_bytes
=
ReservedSpace
::
page_align_size_up
(
bytes
);
if
(
aligned_bytes
==
0
){
// The alignment caused the number of bytes to wrap. An expand_by(0) will
// return true with the implication that an expansion was done when it
// was not. A call to expand implies a best effort to expand by "bytes"
// but not a guarantee. Align down to give a best effort. This is likely
// the most that the generation can expand since it has some capacity to
// start with.
aligned_bytes
=
ReservedSpace
::
page_align_size_down
(
bytes
);
}
size_t
aligned_expand_bytes
=
ReservedSpace
::
page_align_size_up
(
expand_bytes
);
bool
success
=
false
;
if
(
aligned_expand_bytes
>
aligned_bytes
)
{
success
=
grow_by
(
aligned_expand_bytes
);
}
if
(
!
success
)
{
success
=
grow_by
(
aligned_bytes
);
}
if
(
!
success
)
{
success
=
grow_to_reserved
();
}
if
(
PrintGC
&&
Verbose
)
{
if
(
success
&&
GC_locker
::
is_active
())
{
gclog_or_tty
->
print_cr
(
"Garbage collection disabled, expanded heap instead"
);
}
}
return
success
;
}
// No young generation references, clear this generation's cards.
void
CardGeneration
::
clear_remembered_set
()
{
...
...
@@ -441,25 +476,9 @@ OneContigSpaceCardGeneration::expand_and_allocate(size_t word_size,
}
}
void
OneContigSpaceCardGeneration
::
expand
(
size_t
bytes
,
size_t
expand_bytes
)
{
bool
OneContigSpaceCardGeneration
::
expand
(
size_t
bytes
,
size_t
expand_bytes
)
{
GCMutexLocker
x
(
ExpandHeap_lock
);
size_t
aligned_bytes
=
ReservedSpace
::
page_align_size_up
(
bytes
);
size_t
aligned_expand_bytes
=
ReservedSpace
::
page_align_size_up
(
expand_bytes
);
bool
success
=
false
;
if
(
aligned_expand_bytes
>
aligned_bytes
)
{
success
=
grow_by
(
aligned_expand_bytes
);
}
if
(
!
success
)
{
success
=
grow_by
(
aligned_bytes
);
}
if
(
!
success
)
{
grow_to_reserved
();
}
if
(
GC_locker
::
is_active
())
{
if
(
PrintGC
&&
Verbose
)
{
gclog_or_tty
->
print_cr
(
"Garbage collection disabled, expanded heap instead"
);
}
}
return
CardGeneration
::
expand
(
bytes
,
expand_bytes
);
}
...
...
src/share/vm/memory/generation.hpp
浏览文件 @
ab5f5b5a
...
...
@@ -606,11 +606,21 @@ class CardGeneration: public Generation {
public:
// Attempt to expand the generation by "bytes". Expand by at a
// minimum "expand_bytes". Return true if some amount (not
// necessarily the full "bytes") was done.
virtual
bool
expand
(
size_t
bytes
,
size_t
expand_bytes
);
virtual
void
clear_remembered_set
();
virtual
void
invalidate_remembered_set
();
virtual
void
prepare_for_verify
();
// Grow generation with specified size (returns false if unable to grow)
virtual
bool
grow_by
(
size_t
bytes
)
=
0
;
// Grow generation to reserved size.
virtual
bool
grow_to_reserved
()
=
0
;
};
// OneContigSpaceCardGeneration models a heap of old objects contained in a single
...
...
@@ -631,14 +641,14 @@ class OneContigSpaceCardGeneration: public CardGeneration {
// and after last GC.
// Grow generation with specified size (returns false if unable to grow)
bool
grow_by
(
size_t
bytes
);
virtual
bool
grow_by
(
size_t
bytes
);
// Grow generation to reserved size.
bool
grow_to_reserved
();
virtual
bool
grow_to_reserved
();
// Shrink generation with specified size (returns false if unable to shrink)
void
shrink_by
(
size_t
bytes
);
// Allocation failure
v
oid
expand
(
size_t
bytes
,
size_t
expand_bytes
);
v
irtual
bool
expand
(
size_t
bytes
,
size_t
expand_bytes
);
void
shrink
(
size_t
bytes
);
// Accessing spaces
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录