author | tschatzl |
Wed, 17 Jul 2019 16:33:19 +0200 | |
changeset 55722 | 5ee183a90e65 |
parent 54465 | c4f16445675a |
permissions | -rw-r--r-- |
52897
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
1 |
/* |
54465
c4f16445675a
8218668: Clean up evacuation of optional collection set
tschatzl
parents:
52897
diff
changeset
|
2 |
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. |
52897
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
4 |
* |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
8 |
* |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
13 |
* accompanied this code). |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
14 |
* |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
18 |
* |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
21 |
* questions. |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
22 |
* |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
23 |
*/ |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
24 |
|
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
25 |
#include "precompiled.hpp" |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
26 |
#include "gc/g1/g1OopStarChunkedList.inline.hpp" |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
27 |
|
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
28 |
G1OopStarChunkedList::~G1OopStarChunkedList() { |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
29 |
delete_list(_roots); |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
30 |
delete_list(_croots); |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
31 |
delete_list(_oops); |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
32 |
delete_list(_coops); |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
33 |
} |
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
34 |
|
54465
c4f16445675a
8218668: Clean up evacuation of optional collection set
tschatzl
parents:
52897
diff
changeset
|
35 |
size_t G1OopStarChunkedList::oops_do(OopClosure* obj_cl, OopClosure* root_cl) { |
c4f16445675a
8218668: Clean up evacuation of optional collection set
tschatzl
parents:
52897
diff
changeset
|
36 |
size_t result = 0; |
c4f16445675a
8218668: Clean up evacuation of optional collection set
tschatzl
parents:
52897
diff
changeset
|
37 |
result += chunks_do(_roots, root_cl); |
c4f16445675a
8218668: Clean up evacuation of optional collection set
tschatzl
parents:
52897
diff
changeset
|
38 |
result += chunks_do(_croots, root_cl); |
c4f16445675a
8218668: Clean up evacuation of optional collection set
tschatzl
parents:
52897
diff
changeset
|
39 |
result += chunks_do(_oops, obj_cl); |
c4f16445675a
8218668: Clean up evacuation of optional collection set
tschatzl
parents:
52897
diff
changeset
|
40 |
result += chunks_do(_coops, obj_cl); |
c4f16445675a
8218668: Clean up evacuation of optional collection set
tschatzl
parents:
52897
diff
changeset
|
41 |
return result; |
52897
495c05ee2a9a
8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
sjohanss
parents:
diff
changeset
|
42 |
} |