Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
0b677709
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看板
提交
0b677709
编写于
8月 19, 2014
作者:
A
asaha
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
c5b989fb
a6481e4c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
27 addition
and
14 deletion
+27
-14
src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp
src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp
+8
-1
src/share/vm/gc_implementation/g1/ptrQueue.cpp
src/share/vm/gc_implementation/g1/ptrQueue.cpp
+7
-3
src/share/vm/gc_implementation/g1/ptrQueue.hpp
src/share/vm/gc_implementation/g1/ptrQueue.hpp
+8
-5
src/share/vm/gc_implementation/g1/satbQueue.cpp
src/share/vm/gc_implementation/g1/satbQueue.cpp
+1
-1
src/share/vm/gc_implementation/g1/satbQueue.hpp
src/share/vm/gc_implementation/g1/satbQueue.hpp
+3
-4
未找到文件。
src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp
浏览文件 @
0b677709
/*
* Copyright (c) 2001, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 201
4
, 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
...
...
@@ -47,6 +47,13 @@ public:
// active field set to true.
PtrQueue
(
qset_
,
perm
,
true
/* active */
)
{
}
// Flush before destroying; queue may be used to capture pending work while
// doing something else, with auto-flush on completion.
~
DirtyCardQueue
()
{
if
(
!
is_permanent
())
flush
();
}
// Process queue entries and release resources.
void
flush
()
{
flush_impl
();
}
// Apply the closure to all elements, and reset the index to make the
// buffer empty. If a closure application returns "false", return
// "false" immediately, halting the iteration. If "consume" is true,
...
...
src/share/vm/gc_implementation/g1/ptrQueue.cpp
浏览文件 @
0b677709
/*
* Copyright (c) 2001, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 201
4
, 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
...
...
@@ -31,11 +31,15 @@
#include "runtime/thread.inline.hpp"
PtrQueue
::
PtrQueue
(
PtrQueueSet
*
qset
,
bool
perm
,
bool
active
)
:
_qset
(
qset
),
_buf
(
NULL
),
_index
(
0
),
_active
(
active
),
_qset
(
qset
),
_buf
(
NULL
),
_index
(
0
),
_
sz
(
0
),
_
active
(
active
),
_perm
(
perm
),
_lock
(
NULL
)
{}
void
PtrQueue
::
flush
()
{
PtrQueue
::~
PtrQueue
()
{
assert
(
_perm
||
(
_buf
==
NULL
),
"queue must be flushed before delete"
);
}
void
PtrQueue
::
flush_impl
()
{
if
(
!
_perm
&&
_buf
!=
NULL
)
{
if
(
_index
==
_sz
)
{
// No work to do.
...
...
src/share/vm/gc_implementation/g1/ptrQueue.hpp
浏览文件 @
0b677709
/*
* Copyright (c) 2001, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 201
4
, 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
...
...
@@ -65,15 +65,18 @@ protected:
Mutex
*
_lock
;
PtrQueueSet
*
qset
()
{
return
_qset
;
}
bool
is_permanent
()
const
{
return
_perm
;
}
// Process queue entries and release resources, if not permanent.
void
flush_impl
();
public:
// Initialize this queue to contain a null buffer, and be part of the
// given PtrQueueSet.
PtrQueue
(
PtrQueueSet
*
qset
,
bool
perm
=
false
,
bool
active
=
false
);
// Release any contained resources.
virtual
void
flush
();
// Calls flush() when destroyed.
~
PtrQueue
()
{
flush
();
}
// Requires queue flushed or permanent.
~
PtrQueue
();
// Associate a lock with a ptr queue.
void
set_lock
(
Mutex
*
lock
)
{
_lock
=
lock
;
}
...
...
src/share/vm/gc_implementation/g1/satbQueue.cpp
浏览文件 @
0b677709
...
...
@@ -39,7 +39,7 @@ void ObjPtrQueue::flush() {
// first before we flush it, otherwise we might end up with an
// enqueued buffer with refs into the CSet which breaks our invariants.
filter
();
PtrQueue
::
flush
();
flush_impl
();
}
// This method removes entries from an SATB buffer that will not be
...
...
src/share/vm/gc_implementation/g1/satbQueue.hpp
浏览文件 @
0b677709
/*
* Copyright (c) 2001, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 201
4
, 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
...
...
@@ -58,9 +58,8 @@ public:
// field to true. This is done in JavaThread::initialize_queues().
PtrQueue
(
qset
,
perm
,
false
/* active */
)
{
}
// Overrides PtrQueue::flush() so that it can filter the buffer
// before it is flushed.
virtual
void
flush
();
// Process queue entries and free resources.
void
flush
();
// Overrides PtrQueue::should_enqueue_buffer(). See the method's
// definition for more information.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录