Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
1b1587d7
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,发现更多精彩内容 >>
提交
1b1587d7
编写于
1月 24, 2012
作者:
D
dsamersoff
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
edfe2d42
c78ca104
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
13 addition
and
12 deletion
+13
-12
src/share/vm/services/gcNotifier.cpp
src/share/vm/services/gcNotifier.cpp
+2
-1
src/share/vm/services/management.cpp
src/share/vm/services/management.cpp
+8
-8
src/share/vm/services/memoryManager.cpp
src/share/vm/services/memoryManager.cpp
+2
-2
src/share/vm/services/memoryManager.hpp
src/share/vm/services/memoryManager.hpp
+1
-1
未找到文件。
src/share/vm/services/gcNotifier.cpp
浏览文件 @
1b1587d7
...
...
@@ -44,7 +44,8 @@ void GCNotifier::pushNotification(GCMemoryManager *mgr, const char *action, cons
// Make a copy of the last GC statistics
// GC may occur between now and the creation of the notification
int
num_pools
=
MemoryService
::
num_memory_pools
();
GCStatInfo
*
stat
=
new
GCStatInfo
(
num_pools
);
// stat is deallocated inside GCNotificationRequest
GCStatInfo
*
stat
=
new
(
ResourceObj
::
C_HEAP
)
GCStatInfo
(
num_pools
);
mgr
->
get_last_gc_stat
(
stat
);
GCNotificationRequest
*
request
=
new
GCNotificationRequest
(
os
::
javaTimeMillis
(),
mgr
,
action
,
cause
,
stat
);
addRequest
(
request
);
...
...
src/share/vm/services/management.cpp
浏览文件 @
1b1587d7
...
...
@@ -2047,15 +2047,15 @@ JVM_ENTRY(void, jmm_GetLastGCStat(JNIEnv *env, jobject obj, jmmGCStat *gc_stat))
// Make a copy of the last GC statistics
// GC may occur while constructing the last GC information
int
num_pools
=
MemoryService
::
num_memory_pools
();
GCStatInfo
*
stat
=
new
GCStatInfo
(
num_pools
);
if
(
mgr
->
get_last_gc_stat
(
stat
)
==
0
)
{
GCStatInfo
stat
(
num_pools
);
if
(
mgr
->
get_last_gc_stat
(
&
stat
)
==
0
)
{
gc_stat
->
gc_index
=
0
;
return
;
}
gc_stat
->
gc_index
=
stat
->
gc_index
();
gc_stat
->
start_time
=
Management
::
ticks_to_ms
(
stat
->
start_time
());
gc_stat
->
end_time
=
Management
::
ticks_to_ms
(
stat
->
end_time
());
gc_stat
->
gc_index
=
stat
.
gc_index
();
gc_stat
->
start_time
=
Management
::
ticks_to_ms
(
stat
.
start_time
());
gc_stat
->
end_time
=
Management
::
ticks_to_ms
(
stat
.
end_time
());
// Current implementation does not have GC extension attributes
gc_stat
->
num_gc_ext_attributes
=
0
;
...
...
@@ -2073,17 +2073,17 @@ JVM_ENTRY(void, jmm_GetLastGCStat(JNIEnv *env, jobject obj, jmmGCStat *gc_stat))
objArrayHandle
usage_after_gc_ah
(
THREAD
,
au
);
for
(
int
i
=
0
;
i
<
num_pools
;
i
++
)
{
Handle
before_usage
=
MemoryService
::
create_MemoryUsage_obj
(
stat
->
before_gc_usage_for_pool
(
i
),
CHECK
);
Handle
before_usage
=
MemoryService
::
create_MemoryUsage_obj
(
stat
.
before_gc_usage_for_pool
(
i
),
CHECK
);
Handle
after_usage
;
MemoryUsage
u
=
stat
->
after_gc_usage_for_pool
(
i
);
MemoryUsage
u
=
stat
.
after_gc_usage_for_pool
(
i
);
if
(
u
.
max_size
()
==
0
&&
u
.
used
()
>
0
)
{
// If max size == 0, this pool is a survivor space.
// Set max size = -1 since the pools will be swapped after GC.
MemoryUsage
usage
(
u
.
init_size
(),
u
.
used
(),
u
.
committed
(),
(
size_t
)
-
1
);
after_usage
=
MemoryService
::
create_MemoryUsage_obj
(
usage
,
CHECK
);
}
else
{
after_usage
=
MemoryService
::
create_MemoryUsage_obj
(
stat
->
after_gc_usage_for_pool
(
i
),
CHECK
);
after_usage
=
MemoryService
::
create_MemoryUsage_obj
(
stat
.
after_gc_usage_for_pool
(
i
),
CHECK
);
}
usage_before_gc_ah
->
obj_at_put
(
i
,
before_usage
());
usage_after_gc_ah
->
obj_at_put
(
i
,
after_usage
());
...
...
src/share/vm/services/memoryManager.cpp
浏览文件 @
1b1587d7
...
...
@@ -214,8 +214,8 @@ GCMemoryManager::~GCMemoryManager() {
void
GCMemoryManager
::
initialize_gc_stat_info
()
{
assert
(
MemoryService
::
num_memory_pools
()
>
0
,
"should have one or more memory pools"
);
_last_gc_stat
=
new
GCStatInfo
(
MemoryService
::
num_memory_pools
());
_current_gc_stat
=
new
GCStatInfo
(
MemoryService
::
num_memory_pools
());
_last_gc_stat
=
new
(
ResourceObj
::
C_HEAP
)
GCStatInfo
(
MemoryService
::
num_memory_pools
());
_current_gc_stat
=
new
(
ResourceObj
::
C_HEAP
)
GCStatInfo
(
MemoryService
::
num_memory_pools
());
// tracking concurrent collections we need two objects: one to update, and one to
// hold the publicly available "last (completed) gc" information.
}
...
...
src/share/vm/services/memoryManager.hpp
浏览文件 @
1b1587d7
...
...
@@ -108,7 +108,7 @@ public:
const
char
*
name
()
{
return
"CodeCacheManager"
;
}
};
class
GCStatInfo
:
public
CHeap
Obj
{
class
GCStatInfo
:
public
Resource
Obj
{
private:
size_t
_index
;
jlong
_start_time
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录