Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
76e1c94b
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看板
提交
76e1c94b
编写于
3月 30, 2012
作者:
J
jwilhelm
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
cf785293
b683d293
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
32 addition
and
49 deletion
+32
-49
src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp
src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp
+3
-4
src/share/vm/gc_interface/collectedHeap.cpp
src/share/vm/gc_interface/collectedHeap.cpp
+3
-4
src/share/vm/gc_interface/collectedHeap.hpp
src/share/vm/gc_interface/collectedHeap.hpp
+5
-14
src/share/vm/gc_interface/collectedHeap.inline.hpp
src/share/vm/gc_interface/collectedHeap.inline.hpp
+15
-20
src/share/vm/oops/klass.cpp
src/share/vm/oops/klass.cpp
+3
-4
src/share/vm/oops/klass.hpp
src/share/vm/oops/klass.hpp
+3
-3
未找到文件。
src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp
浏览文件 @
76e1c94b
...
...
@@ -940,10 +940,9 @@ public:
return
_bytes_copied_during_gc
;
}
// Determine whether the next GC should be mixed. Called to determine
// whether to start mixed GCs or whether to carry on doing mixed
// GCs. The two action strings are used in the ergo output when the
// method returns true or false.
// Determine whether there are candidate regions so that the
// next GC should be mixed. The two action strings are used
// in the ergo output when the method returns true or false.
bool
next_gc_should_be_mixed
(
const
char
*
true_action_str
,
const
char
*
false_action_str
);
...
...
src/share/vm/gc_interface/collectedHeap.cpp
浏览文件 @
76e1c94b
...
...
@@ -333,7 +333,7 @@ CollectedHeap::fill_with_array(HeapWord* start, size_t words, bool zap)
// Set the length first for concurrent GC.
((
arrayOop
)
start
)
->
set_length
((
int
)
len
);
post_allocation_setup_common
(
Universe
::
intArrayKlassObj
(),
start
,
words
);
post_allocation_setup_common
(
Universe
::
intArrayKlassObj
(),
start
);
DEBUG_ONLY
(
zap_filler_array
(
start
,
words
,
zap
);)
}
...
...
@@ -346,8 +346,7 @@ CollectedHeap::fill_with_object_impl(HeapWord* start, size_t words, bool zap)
fill_with_array
(
start
,
words
,
zap
);
}
else
if
(
words
>
0
)
{
assert
(
words
==
min_fill_size
(),
"unaligned size"
);
post_allocation_setup_common
(
SystemDictionary
::
Object_klass
(),
start
,
words
);
post_allocation_setup_common
(
SystemDictionary
::
Object_klass
(),
start
);
}
}
...
...
@@ -477,7 +476,7 @@ oop CollectedHeap::Class_obj_allocate(KlassHandle klass, int size, KlassHandle r
assert
(
ScavengeRootsInCode
>
0
,
"must be"
);
obj
=
common_mem_allocate_init
(
size
,
CHECK_NULL
);
}
post_allocation_setup_common
(
klass
,
obj
,
size
);
post_allocation_setup_common
(
klass
,
obj
);
assert
(
Universe
::
is_bootstrapping
()
||
!
((
oop
)
obj
)
->
blueprint
()
->
oop_is_array
(),
"must not be an array"
);
NOT_PRODUCT
(
Universe
::
heap
()
->
check_for_bad_heap_word_value
(
obj
,
size
));
...
...
src/share/vm/gc_interface/collectedHeap.hpp
浏览文件 @
76e1c94b
...
...
@@ -149,18 +149,14 @@ class CollectedHeap : public CHeapObj {
inline
static
HeapWord
*
common_permanent_mem_allocate_init
(
size_t
size
,
TRAPS
);
// Helper functions for (VM) allocation.
inline
static
void
post_allocation_setup_common
(
KlassHandle
klass
,
HeapWord
*
obj
,
size_t
size
);
inline
static
void
post_allocation_setup_common
(
KlassHandle
klass
,
HeapWord
*
obj
);
inline
static
void
post_allocation_setup_no_klass_install
(
KlassHandle
klass
,
HeapWord
*
objPtr
,
size_t
size
);
HeapWord
*
objPtr
);
inline
static
void
post_allocation_setup_obj
(
KlassHandle
klass
,
HeapWord
*
obj
,
size_t
size
);
inline
static
void
post_allocation_setup_obj
(
KlassHandle
klass
,
HeapWord
*
obj
);
inline
static
void
post_allocation_setup_array
(
KlassHandle
klass
,
HeapWord
*
obj
,
size_t
size
,
int
length
);
HeapWord
*
obj
,
int
length
);
// Clears an allocated object.
inline
static
void
init_obj
(
HeapWord
*
obj
,
size_t
size
);
...
...
@@ -368,9 +364,7 @@ class CollectedHeap : public CHeapObj {
inline
static
oop
permanent_obj_allocate_no_klass_install
(
KlassHandle
klass
,
int
size
,
TRAPS
);
inline
static
void
post_allocation_install_obj_klass
(
KlassHandle
klass
,
oop
obj
,
int
size
);
inline
static
void
post_allocation_install_obj_klass
(
KlassHandle
klass
,
oop
obj
);
inline
static
oop
permanent_array_allocate
(
KlassHandle
klass
,
int
size
,
int
length
,
TRAPS
);
// Raw memory allocation facilities
...
...
@@ -664,9 +658,6 @@ class CollectedHeap : public CHeapObj {
}
}
// Allocate GCHeapLog during VM startup
static
void
initialize_heap_log
();
// Heap verification
virtual
void
verify
(
bool
allow_dirty
,
bool
silent
,
VerifyOption
option
)
=
0
;
...
...
src/share/vm/gc_interface/collectedHeap.inline.hpp
浏览文件 @
76e1c94b
/*
* Copyright (c) 2001, 201
1
, 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
...
...
@@ -50,15 +50,13 @@
// Inline allocation implementations.
void
CollectedHeap
::
post_allocation_setup_common
(
KlassHandle
klass
,
HeapWord
*
obj
,
size_t
size
)
{
post_allocation_setup_no_klass_install
(
klass
,
obj
,
size
);
post_allocation_install_obj_klass
(
klass
,
oop
(
obj
),
(
int
)
size
);
HeapWord
*
obj
)
{
post_allocation_setup_no_klass_install
(
klass
,
obj
);
post_allocation_install_obj_klass
(
klass
,
oop
(
obj
));
}
void
CollectedHeap
::
post_allocation_setup_no_klass_install
(
KlassHandle
klass
,
HeapWord
*
objPtr
,
size_t
size
)
{
HeapWord
*
objPtr
)
{
oop
obj
=
(
oop
)
objPtr
;
assert
(
obj
!=
NULL
,
"NULL object pointer"
);
...
...
@@ -71,8 +69,7 @@ void CollectedHeap::post_allocation_setup_no_klass_install(KlassHandle klass,
}
void
CollectedHeap
::
post_allocation_install_obj_klass
(
KlassHandle
klass
,
oop
obj
,
int
size
)
{
oop
obj
)
{
// These asserts are kind of complicated because of klassKlass
// and the beginning of the world.
assert
(
klass
()
!=
NULL
||
!
Universe
::
is_fully_initialized
(),
"NULL klass"
);
...
...
@@ -101,9 +98,8 @@ inline void post_allocation_notify(KlassHandle klass, oop obj) {
}
void
CollectedHeap
::
post_allocation_setup_obj
(
KlassHandle
klass
,
HeapWord
*
obj
,
size_t
size
)
{
post_allocation_setup_common
(
klass
,
obj
,
size
);
HeapWord
*
obj
)
{
post_allocation_setup_common
(
klass
,
obj
);
assert
(
Universe
::
is_bootstrapping
()
||
!
((
oop
)
obj
)
->
blueprint
()
->
oop_is_array
(),
"must not be an array"
);
// notify jvmti and dtrace
...
...
@@ -112,14 +108,13 @@ void CollectedHeap::post_allocation_setup_obj(KlassHandle klass,
void
CollectedHeap
::
post_allocation_setup_array
(
KlassHandle
klass
,
HeapWord
*
obj
,
size_t
size
,
int
length
)
{
// Set array length before setting the _klass field
// in post_allocation_setup_common() because the klass field
// indicates that the object is parsable by concurrent GC.
assert
(
length
>=
0
,
"length should be non-negative"
);
((
arrayOop
)
obj
)
->
set_length
(
length
);
post_allocation_setup_common
(
klass
,
obj
,
size
);
post_allocation_setup_common
(
klass
,
obj
);
assert
(((
oop
)
obj
)
->
blueprint
()
->
oop_is_array
(),
"must be an array"
);
// notify jvmti and dtrace (must be after length is set for dtrace)
post_allocation_notify
(
klass
,
(
oop
)
obj
);
...
...
@@ -256,7 +251,7 @@ oop CollectedHeap::obj_allocate(KlassHandle klass, int size, TRAPS) {
assert
(
!
Universe
::
heap
()
->
is_gc_active
(),
"Allocation during gc not allowed"
);
assert
(
size
>=
0
,
"int won't convert to size_t"
);
HeapWord
*
obj
=
common_mem_allocate_init
(
size
,
CHECK_NULL
);
post_allocation_setup_obj
(
klass
,
obj
,
size
);
post_allocation_setup_obj
(
klass
,
obj
);
NOT_PRODUCT
(
Universe
::
heap
()
->
check_for_bad_heap_word_value
(
obj
,
size
));
return
(
oop
)
obj
;
}
...
...
@@ -269,7 +264,7 @@ oop CollectedHeap::array_allocate(KlassHandle klass,
assert
(
!
Universe
::
heap
()
->
is_gc_active
(),
"Allocation during gc not allowed"
);
assert
(
size
>=
0
,
"int won't convert to size_t"
);
HeapWord
*
obj
=
common_mem_allocate_init
(
size
,
CHECK_NULL
);
post_allocation_setup_array
(
klass
,
obj
,
size
,
length
);
post_allocation_setup_array
(
klass
,
obj
,
length
);
NOT_PRODUCT
(
Universe
::
heap
()
->
check_for_bad_heap_word_value
(
obj
,
size
));
return
(
oop
)
obj
;
}
...
...
@@ -283,7 +278,7 @@ oop CollectedHeap::array_allocate_nozero(KlassHandle klass,
assert
(
size
>=
0
,
"int won't convert to size_t"
);
HeapWord
*
obj
=
common_mem_allocate_noinit
(
size
,
CHECK_NULL
);
((
oop
)
obj
)
->
set_klass_gap
(
0
);
post_allocation_setup_array
(
klass
,
obj
,
size
,
length
);
post_allocation_setup_array
(
klass
,
obj
,
length
);
#ifndef PRODUCT
const
size_t
hs
=
oopDesc
::
header_size
()
+
1
;
Universe
::
heap
()
->
check_for_non_bad_heap_word_value
(
obj
+
hs
,
size
-
hs
);
...
...
@@ -293,7 +288,7 @@ oop CollectedHeap::array_allocate_nozero(KlassHandle klass,
oop
CollectedHeap
::
permanent_obj_allocate
(
KlassHandle
klass
,
int
size
,
TRAPS
)
{
oop
obj
=
permanent_obj_allocate_no_klass_install
(
klass
,
size
,
CHECK_NULL
);
post_allocation_install_obj_klass
(
klass
,
obj
,
size
);
post_allocation_install_obj_klass
(
klass
,
obj
);
NOT_PRODUCT
(
Universe
::
heap
()
->
check_for_bad_heap_word_value
((
HeapWord
*
)
obj
,
size
));
return
obj
;
...
...
@@ -306,7 +301,7 @@ oop CollectedHeap::permanent_obj_allocate_no_klass_install(KlassHandle klass,
assert
(
!
Universe
::
heap
()
->
is_gc_active
(),
"Allocation during gc not allowed"
);
assert
(
size
>=
0
,
"int won't convert to size_t"
);
HeapWord
*
obj
=
common_permanent_mem_allocate_init
(
size
,
CHECK_NULL
);
post_allocation_setup_no_klass_install
(
klass
,
obj
,
size
);
post_allocation_setup_no_klass_install
(
klass
,
obj
);
#ifndef PRODUCT
const
size_t
hs
=
oopDesc
::
header_size
();
Universe
::
heap
()
->
check_for_bad_heap_word_value
(
obj
+
hs
,
size
-
hs
);
...
...
@@ -322,7 +317,7 @@ oop CollectedHeap::permanent_array_allocate(KlassHandle klass,
assert
(
!
Universe
::
heap
()
->
is_gc_active
(),
"Allocation during gc not allowed"
);
assert
(
size
>=
0
,
"int won't convert to size_t"
);
HeapWord
*
obj
=
common_permanent_mem_allocate_init
(
size
,
CHECK_NULL
);
post_allocation_setup_array
(
klass
,
obj
,
size
,
length
);
post_allocation_setup_array
(
klass
,
obj
,
length
);
NOT_PRODUCT
(
Universe
::
heap
()
->
check_for_bad_heap_word_value
(
obj
,
size
));
return
(
oop
)
obj
;
}
...
...
src/share/vm/oops/klass.cpp
浏览文件 @
76e1c94b
/*
* Copyright (c) 1997, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
...
...
@@ -174,10 +174,9 @@ KlassHandle Klass::base_create_klass(KlassHandle& klass, int size,
}
void
Klass_vtbl
::
post_new_init_klass
(
KlassHandle
&
klass
,
klassOop
new_klass
,
int
size
)
const
{
klassOop
new_klass
)
const
{
assert
(
!
new_klass
->
klass_part
()
->
null_vtbl
(),
"Not a complete klass"
);
CollectedHeap
::
post_allocation_install_obj_klass
(
klass
,
new_klass
,
size
);
CollectedHeap
::
post_allocation_install_obj_klass
(
klass
,
new_klass
);
}
void
*
Klass_vtbl
::
operator
new
(
size_t
ignored
,
KlassHandle
&
klass
,
...
...
src/share/vm/oops/klass.hpp
浏览文件 @
76e1c94b
/*
* Copyright (c) 1997, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
...
...
@@ -149,7 +149,7 @@ class Klass_vtbl {
// by the shared "base_create" subroutines.
//
virtual
void
*
allocate_permanent
(
KlassHandle
&
klass
,
int
size
,
TRAPS
)
const
=
0
;
void
post_new_init_klass
(
KlassHandle
&
klass
,
klassOop
obj
,
int
size
)
const
;
void
post_new_init_klass
(
KlassHandle
&
klass
,
klassOop
obj
)
const
;
// Every subclass on which vtbl_value is called must include this macro.
// Delay the installation of the klassKlass pointer until after the
...
...
@@ -160,7 +160,7 @@ class Klass_vtbl {
if (HAS_PENDING_EXCEPTION) return NULL; \
klassOop new_klass = ((Klass*) result)->as_klassOop(); \
OrderAccess::storestore(); \
post_new_init_klass(klass_klass, new_klass
, size);
\
post_new_init_klass(klass_klass, new_klass
);
\
return result; \
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录