Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
f1074612
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看板
提交
f1074612
编写于
9月 10, 2014
作者:
J
jcoomes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8057827: notify an obj when allocation context stats are available
Reviewed-by: mikael, jmasa, tschatzl
上级
0fbcc6a6
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
65 addition
and
1 deletion
+65
-1
src/share/vm/gc_implementation/g1/g1AllocationContext.hpp
src/share/vm/gc_implementation/g1/g1AllocationContext.hpp
+1
-0
src/share/vm/memory/universe.cpp
src/share/vm/memory/universe.cpp
+3
-0
src/share/vm/memory/universe.hpp
src/share/vm/memory/universe.hpp
+6
-0
src/share/vm/memory/universe.inline.hpp
src/share/vm/memory/universe.inline.hpp
+8
-0
src/share/vm/runtime/serviceThread.cpp
src/share/vm/runtime/serviceThread.cpp
+8
-1
src/share/vm/services/allocationContextService.hpp
src/share/vm/services/allocationContextService.hpp
+39
-0
未找到文件。
src/share/vm/gc_implementation/g1/g1AllocationContext.hpp
浏览文件 @
f1074612
...
@@ -46,6 +46,7 @@ public:
...
@@ -46,6 +46,7 @@ public:
inline
void
clear
()
{
}
inline
void
clear
()
{
}
inline
void
update
(
bool
full_gc
)
{
}
inline
void
update
(
bool
full_gc
)
{
}
inline
void
update_at_remark
()
{
}
inline
void
update_at_remark
()
{
}
inline
bool
available
()
{
return
false
;
}
};
};
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1ALLOCATIONCONTEXT_HPP
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1ALLOCATIONCONTEXT_HPP
src/share/vm/memory/universe.cpp
浏览文件 @
f1074612
...
@@ -126,6 +126,8 @@ oop Universe::_null_ptr_exception_instance = NULL;
...
@@ -126,6 +126,8 @@ oop Universe::_null_ptr_exception_instance = NULL;
oop
Universe
::
_arithmetic_exception_instance
=
NULL
;
oop
Universe
::
_arithmetic_exception_instance
=
NULL
;
oop
Universe
::
_virtual_machine_error_instance
=
NULL
;
oop
Universe
::
_virtual_machine_error_instance
=
NULL
;
oop
Universe
::
_vm_exception
=
NULL
;
oop
Universe
::
_vm_exception
=
NULL
;
oop
Universe
::
_allocation_context_notification_obj
=
NULL
;
Method
*
Universe
::
_throw_illegal_access_error
=
NULL
;
Method
*
Universe
::
_throw_illegal_access_error
=
NULL
;
Array
<
int
>*
Universe
::
_the_empty_int_array
=
NULL
;
Array
<
int
>*
Universe
::
_the_empty_int_array
=
NULL
;
Array
<
u2
>*
Universe
::
_the_empty_short_array
=
NULL
;
Array
<
u2
>*
Universe
::
_the_empty_short_array
=
NULL
;
...
@@ -195,6 +197,7 @@ void Universe::oops_do(OopClosure* f, bool do_all) {
...
@@ -195,6 +197,7 @@ void Universe::oops_do(OopClosure* f, bool do_all) {
f
->
do_oop
((
oop
*
)
&
_main_thread_group
);
f
->
do_oop
((
oop
*
)
&
_main_thread_group
);
f
->
do_oop
((
oop
*
)
&
_system_thread_group
);
f
->
do_oop
((
oop
*
)
&
_system_thread_group
);
f
->
do_oop
((
oop
*
)
&
_vm_exception
);
f
->
do_oop
((
oop
*
)
&
_vm_exception
);
f
->
do_oop
((
oop
*
)
&
_allocation_context_notification_obj
);
debug_only
(
f
->
do_oop
((
oop
*
)
&
_fullgc_alot_dummy_array
);)
debug_only
(
f
->
do_oop
((
oop
*
)
&
_fullgc_alot_dummy_array
);)
}
}
...
...
src/share/vm/memory/universe.hpp
浏览文件 @
f1074612
...
@@ -178,6 +178,8 @@ class Universe: AllStatic {
...
@@ -178,6 +178,8 @@ class Universe: AllStatic {
// the vm thread.
// the vm thread.
static
oop
_vm_exception
;
static
oop
_vm_exception
;
static
oop
_allocation_context_notification_obj
;
// The particular choice of collected heap.
// The particular choice of collected heap.
static
CollectedHeap
*
_collectedHeap
;
static
CollectedHeap
*
_collectedHeap
;
...
@@ -307,6 +309,10 @@ class Universe: AllStatic {
...
@@ -307,6 +309,10 @@ class Universe: AllStatic {
static
oop
arithmetic_exception_instance
()
{
return
_arithmetic_exception_instance
;
}
static
oop
arithmetic_exception_instance
()
{
return
_arithmetic_exception_instance
;
}
static
oop
virtual_machine_error_instance
()
{
return
_virtual_machine_error_instance
;
}
static
oop
virtual_machine_error_instance
()
{
return
_virtual_machine_error_instance
;
}
static
oop
vm_exception
()
{
return
_vm_exception
;
}
static
oop
vm_exception
()
{
return
_vm_exception
;
}
static
inline
oop
allocation_context_notification_obj
();
static
inline
void
set_allocation_context_notification_obj
(
oop
obj
);
static
Method
*
throw_illegal_access_error
()
{
return
_throw_illegal_access_error
;
}
static
Method
*
throw_illegal_access_error
()
{
return
_throw_illegal_access_error
;
}
static
Array
<
int
>*
the_empty_int_array
()
{
return
_the_empty_int_array
;
}
static
Array
<
int
>*
the_empty_int_array
()
{
return
_the_empty_int_array
;
}
...
...
src/share/vm/memory/universe.inline.hpp
浏览文件 @
f1074612
...
@@ -41,4 +41,12 @@ inline bool Universe::field_type_should_be_aligned(BasicType type) {
...
@@ -41,4 +41,12 @@ inline bool Universe::field_type_should_be_aligned(BasicType type) {
return
type
==
T_DOUBLE
||
type
==
T_LONG
;
return
type
==
T_DOUBLE
||
type
==
T_LONG
;
}
}
inline
oop
Universe
::
allocation_context_notification_obj
()
{
return
_allocation_context_notification_obj
;
}
inline
void
Universe
::
set_allocation_context_notification_obj
(
oop
obj
)
{
_allocation_context_notification_obj
=
obj
;
}
#endif // SHARE_VM_MEMORY_UNIVERSE_INLINE_HPP
#endif // SHARE_VM_MEMORY_UNIVERSE_INLINE_HPP
src/share/vm/runtime/serviceThread.cpp
浏览文件 @
f1074612
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include "runtime/serviceThread.hpp"
#include "runtime/serviceThread.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/mutexLocker.hpp"
#include "prims/jvmtiImpl.hpp"
#include "prims/jvmtiImpl.hpp"
#include "services/allocationContextService.hpp"
#include "services/gcNotifier.hpp"
#include "services/gcNotifier.hpp"
#include "services/diagnosticArgument.hpp"
#include "services/diagnosticArgument.hpp"
#include "services/diagnosticFramework.hpp"
#include "services/diagnosticFramework.hpp"
...
@@ -86,6 +87,7 @@ void ServiceThread::service_thread_entry(JavaThread* jt, TRAPS) {
...
@@ -86,6 +87,7 @@ void ServiceThread::service_thread_entry(JavaThread* jt, TRAPS) {
bool
has_jvmti_events
=
false
;
bool
has_jvmti_events
=
false
;
bool
has_gc_notification_event
=
false
;
bool
has_gc_notification_event
=
false
;
bool
has_dcmd_notification_event
=
false
;
bool
has_dcmd_notification_event
=
false
;
bool
acs_notify
=
false
;
JvmtiDeferredEvent
jvmti_event
;
JvmtiDeferredEvent
jvmti_event
;
{
{
// Need state transition ThreadBlockInVM so that this thread
// Need state transition ThreadBlockInVM so that this thread
...
@@ -102,7 +104,8 @@ void ServiceThread::service_thread_entry(JavaThread* jt, TRAPS) {
...
@@ -102,7 +104,8 @@ void ServiceThread::service_thread_entry(JavaThread* jt, TRAPS) {
while
(
!
(
sensors_changed
=
LowMemoryDetector
::
has_pending_requests
())
&&
while
(
!
(
sensors_changed
=
LowMemoryDetector
::
has_pending_requests
())
&&
!
(
has_jvmti_events
=
JvmtiDeferredEventQueue
::
has_events
())
&&
!
(
has_jvmti_events
=
JvmtiDeferredEventQueue
::
has_events
())
&&
!
(
has_gc_notification_event
=
GCNotifier
::
has_event
())
&&
!
(
has_gc_notification_event
=
GCNotifier
::
has_event
())
&&
!
(
has_dcmd_notification_event
=
DCmdFactory
::
has_pending_jmx_notification
()))
{
!
(
has_dcmd_notification_event
=
DCmdFactory
::
has_pending_jmx_notification
())
&&
!
(
acs_notify
=
AllocationContextService
::
should_notify
()))
{
// wait until one of the sensors has pending requests, or there is a
// wait until one of the sensors has pending requests, or there is a
// pending JVMTI event or JMX GC notification to post
// pending JVMTI event or JMX GC notification to post
Service_lock
->
wait
(
Mutex
::
_no_safepoint_check_flag
);
Service_lock
->
wait
(
Mutex
::
_no_safepoint_check_flag
);
...
@@ -128,6 +131,10 @@ void ServiceThread::service_thread_entry(JavaThread* jt, TRAPS) {
...
@@ -128,6 +131,10 @@ void ServiceThread::service_thread_entry(JavaThread* jt, TRAPS) {
if
(
has_dcmd_notification_event
)
{
if
(
has_dcmd_notification_event
)
{
DCmdFactory
::
send_notification
(
CHECK
);
DCmdFactory
::
send_notification
(
CHECK
);
}
}
if
(
acs_notify
)
{
AllocationContextService
::
notify
(
CHECK
);
}
}
}
}
}
...
...
src/share/vm/services/allocationContextService.hpp
0 → 100644
浏览文件 @
f1074612
/*
* Copyright (c) 2014, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef SHARE_VM_SERVICES_ALLOCATION_CONTEXT_SERVICE_HPP
#define SHARE_VM_SERVICES_ALLOCATION_CONTEXT_SERVICE_HPP
#include "utilities/exceptions.hpp"
class
AllocationContextService
:
public
AllStatic
{
public:
static
inline
bool
should_notify
();
static
inline
void
notify
(
TRAPS
);
};
bool
AllocationContextService
::
should_notify
()
{
return
false
;
}
void
AllocationContextService
::
notify
(
TRAPS
)
{
}
#endif // SHARE_VM_SERVICES_ALLOCATION_CONTEXT_SERVICE_HPP
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录