author | eosterlund |
Tue, 12 Nov 2019 20:01:23 +0000 | |
changeset 59038 | b9a42ca342db |
parent 58815 | a4cdca87152b |
permissions | -rw-r--r-- |
55603
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
1 |
/* |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
2 |
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
4 |
* |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
8 |
* |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
13 |
* accompanied this code). |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
14 |
* |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
18 |
* |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
21 |
* questions. |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
22 |
*/ |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
23 |
|
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
24 |
#ifndef SHARE_GC_Z_ZVERIFY_HPP |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
25 |
#define SHARE_GC_Z_ZVERIFY_HPP |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
26 |
|
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
27 |
#include "memory/allocation.hpp" |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
28 |
|
58815
a4cdca87152b
8232604: ZGC: Make ZVerifyViews mapping and unmapping precise
stefank
parents:
57658
diff
changeset
|
29 |
class ZPageAllocator; |
a4cdca87152b
8232604: ZGC: Make ZVerifyViews mapping and unmapping precise
stefank
parents:
57658
diff
changeset
|
30 |
|
55603
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
31 |
class ZVerify : public AllStatic { |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
32 |
private: |
57658 | 33 |
template <typename RootsIterator> static void roots(); |
55603
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
34 |
|
57656
9429ecaee2e0
8229135: ZGC: Adding missing ZStatTimerDisable before call to ZVerify::roots_strong()
pliden
parents:
55603
diff
changeset
|
35 |
static void roots_strong(); |
55603
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
36 |
static void roots_weak(); |
57658 | 37 |
static void roots_concurrent_strong(); |
55603
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
38 |
static void roots_concurrent_weak(); |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
39 |
|
57658 | 40 |
static void roots(bool verify_weaks); |
55603
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
41 |
static void objects(bool verify_weaks); |
57658 | 42 |
static void roots_and_objects(bool verify_weaks); |
55603
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
43 |
|
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
44 |
public: |
57656
9429ecaee2e0
8229135: ZGC: Adding missing ZStatTimerDisable before call to ZVerify::roots_strong()
pliden
parents:
55603
diff
changeset
|
45 |
static void before_zoperation(); |
55603
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
46 |
static void after_mark(); |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
47 |
static void after_weak_processing(); |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
48 |
}; |
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
49 |
|
58815
a4cdca87152b
8232604: ZGC: Make ZVerifyViews mapping and unmapping precise
stefank
parents:
57658
diff
changeset
|
50 |
class ZVerifyViewsFlip { |
a4cdca87152b
8232604: ZGC: Make ZVerifyViews mapping and unmapping precise
stefank
parents:
57658
diff
changeset
|
51 |
private: |
a4cdca87152b
8232604: ZGC: Make ZVerifyViews mapping and unmapping precise
stefank
parents:
57658
diff
changeset
|
52 |
const ZPageAllocator* const _allocator; |
a4cdca87152b
8232604: ZGC: Make ZVerifyViews mapping and unmapping precise
stefank
parents:
57658
diff
changeset
|
53 |
|
a4cdca87152b
8232604: ZGC: Make ZVerifyViews mapping and unmapping precise
stefank
parents:
57658
diff
changeset
|
54 |
public: |
a4cdca87152b
8232604: ZGC: Make ZVerifyViews mapping and unmapping precise
stefank
parents:
57658
diff
changeset
|
55 |
ZVerifyViewsFlip(const ZPageAllocator* allocator); |
a4cdca87152b
8232604: ZGC: Make ZVerifyViews mapping and unmapping precise
stefank
parents:
57658
diff
changeset
|
56 |
~ZVerifyViewsFlip(); |
a4cdca87152b
8232604: ZGC: Make ZVerifyViews mapping and unmapping precise
stefank
parents:
57658
diff
changeset
|
57 |
}; |
a4cdca87152b
8232604: ZGC: Make ZVerifyViews mapping and unmapping precise
stefank
parents:
57658
diff
changeset
|
58 |
|
55603
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
diff
changeset
|
59 |
#endif // SHARE_GC_Z_ZVERIFY_HPP |