src/hotspot/share/gc/shenandoah/shenandoahRootVerifier.cpp
author stefank
Tue, 26 Nov 2019 10:47:46 +0100
changeset 59290 97d13893ec3c
parent 55476 aee0d296c0ef
child 58679 9c3209ff7550
child 59296 9186be5c78ba
permissions -rw-r--r--
8234748: Clean up atomic and orderAccess includes Reviewed-by: dholmes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
54882
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
     1
/*
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
     2
 * Copyright (c) 2019, Red Hat, Inc. All rights reserved.
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
     3
 *
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
     4
 * This code is free software; you can redistribute it and/or modify it
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
     5
 * under the terms of the GNU General Public License version 2 only, as
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
     6
 * published by the Free Software Foundation.
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
     7
 *
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
     8
 * This code is distributed in the hope that it will be useful, but WITHOUT
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
     9
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    10
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    11
 * version 2 for more details (a copy is included in the LICENSE file that
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    12
 * accompanied this code).
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    13
 *
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License version
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    15
 * 2 along with this work; if not, write to the Free Software Foundation,
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    16
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    17
 *
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    18
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    19
 * or visit www.oracle.com if you need additional information or have any
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    20
 * questions.
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    21
 *
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    22
 */
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    23
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    24
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    25
#include "precompiled.hpp"
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    26
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    27
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    28
#include "classfile/classLoaderDataGraph.hpp"
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    29
#include "classfile/systemDictionary.hpp"
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    30
#include "code/codeCache.hpp"
55119
04ff1e00635a 8224978: Shenandoah: Allows root verifier to verify some roots outside safepoints with proper locks
zgu
parents: 55048
diff changeset
    31
#include "gc/shenandoah/shenandoahAsserts.hpp"
54882
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    32
#include "gc/shenandoah/shenandoahHeap.hpp"
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    33
#include "gc/shenandoah/shenandoahPhaseTimings.hpp"
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    34
#include "gc/shenandoah/shenandoahRootVerifier.hpp"
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    35
#include "gc/shenandoah/shenandoahStringDedup.hpp"
55119
04ff1e00635a 8224978: Shenandoah: Allows root verifier to verify some roots outside safepoints with proper locks
zgu
parents: 55048
diff changeset
    36
#include "gc/shenandoah/shenandoahUtils.hpp"
54882
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    37
#include "gc/shared/weakProcessor.inline.hpp"
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    38
#include "memory/universe.hpp"
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    39
#include "runtime/thread.hpp"
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    40
#include "services/management.hpp"
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    41
#include "utilities/debug.hpp"
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    42
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    43
// Check for overflow of number of root types.
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    44
STATIC_ASSERT((static_cast<uint>(ShenandoahRootVerifier::AllRoots) + 1) > static_cast<uint>(ShenandoahRootVerifier::AllRoots));
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    45
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    46
ShenandoahRootVerifier::ShenandoahRootVerifier() : _types(AllRoots) {
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    47
}
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    48
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    49
void ShenandoahRootVerifier::excludes(RootTypes types) {
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    50
  _types = static_cast<ShenandoahRootVerifier::RootTypes>(static_cast<uint>(_types) & (~static_cast<uint>(types)));
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    51
}
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    52
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    53
bool ShenandoahRootVerifier::verify(RootTypes type) const {
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    54
  return (_types & type) != 0;
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    55
}
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    56
55476
aee0d296c0ef 8226311: Shenandoah: Concurrent evacuation of OopStorage backed weak roots
zgu
parents: 55335
diff changeset
    57
ShenandoahRootVerifier::RootTypes ShenandoahRootVerifier::combine(RootTypes t1, RootTypes t2) {
aee0d296c0ef 8226311: Shenandoah: Concurrent evacuation of OopStorage backed weak roots
zgu
parents: 55335
diff changeset
    58
  return static_cast<ShenandoahRootVerifier::RootTypes>(static_cast<uint>(t1) | static_cast<uint>(t2));
aee0d296c0ef 8226311: Shenandoah: Concurrent evacuation of OopStorage backed weak roots
zgu
parents: 55335
diff changeset
    59
}
aee0d296c0ef 8226311: Shenandoah: Concurrent evacuation of OopStorage backed weak roots
zgu
parents: 55335
diff changeset
    60
54882
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    61
void ShenandoahRootVerifier::oops_do(OopClosure* oops) {
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    62
  CodeBlobToOopClosure blobs(oops, !CodeBlobToOopClosure::FixRelocations);
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    63
  if (verify(CodeRoots)) {
55119
04ff1e00635a 8224978: Shenandoah: Allows root verifier to verify some roots outside safepoints with proper locks
zgu
parents: 55048
diff changeset
    64
    shenandoah_assert_locked_or_safepoint(CodeCache_lock);
54882
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    65
    CodeCache::blobs_do(&blobs);
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    66
  }
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    67
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    68
  if (verify(CLDGRoots)) {
55119
04ff1e00635a 8224978: Shenandoah: Allows root verifier to verify some roots outside safepoints with proper locks
zgu
parents: 55048
diff changeset
    69
    shenandoah_assert_locked_or_safepoint(ClassLoaderDataGraph_lock);
55048
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
    70
    CLDToOopClosure clds(oops, ClassLoaderData::_claim_none);
54882
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    71
    ClassLoaderDataGraph::cld_do(&clds);
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    72
  }
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    73
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    74
  if (verify(SerialRoots)) {
55119
04ff1e00635a 8224978: Shenandoah: Allows root verifier to verify some roots outside safepoints with proper locks
zgu
parents: 55048
diff changeset
    75
    shenandoah_assert_safepoint();
54882
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    76
    Universe::oops_do(oops);
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    77
    Management::oops_do(oops);
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    78
    JvmtiExport::oops_do(oops);
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    79
    ObjectSynchronizer::oops_do(oops);
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    80
    SystemDictionary::oops_do(oops);
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    81
  }
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    82
55335
f7cc25dda38a 8225572: Shenandoah: Move JNIHandles root out of serial roots
zgu
parents: 55119
diff changeset
    83
  if (verify(JNIHandleRoots)) {
f7cc25dda38a 8225572: Shenandoah: Move JNIHandles root out of serial roots
zgu
parents: 55119
diff changeset
    84
    shenandoah_assert_safepoint();
f7cc25dda38a 8225572: Shenandoah: Move JNIHandles root out of serial roots
zgu
parents: 55119
diff changeset
    85
    JNIHandles::oops_do(oops);
f7cc25dda38a 8225572: Shenandoah: Move JNIHandles root out of serial roots
zgu
parents: 55119
diff changeset
    86
  }
f7cc25dda38a 8225572: Shenandoah: Move JNIHandles root out of serial roots
zgu
parents: 55119
diff changeset
    87
54882
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    88
  if (verify(WeakRoots)) {
55119
04ff1e00635a 8224978: Shenandoah: Allows root verifier to verify some roots outside safepoints with proper locks
zgu
parents: 55048
diff changeset
    89
    shenandoah_assert_safepoint();
54882
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    90
    AlwaysTrueClosure always_true;
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    91
    WeakProcessor::weak_oops_do(&always_true, oops);
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    92
  }
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    93
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    94
  if (ShenandoahStringDedup::is_enabled() && verify(StringDedupRoots)) {
55119
04ff1e00635a 8224978: Shenandoah: Allows root verifier to verify some roots outside safepoints with proper locks
zgu
parents: 55048
diff changeset
    95
    shenandoah_assert_safepoint();
54882
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    96
    ShenandoahStringDedup::oops_do_slow(oops);
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    97
  }
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    98
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
    99
  if (verify(ThreadRoots)) {
55119
04ff1e00635a 8224978: Shenandoah: Allows root verifier to verify some roots outside safepoints with proper locks
zgu
parents: 55048
diff changeset
   100
    shenandoah_assert_safepoint();
54882
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
   101
    // Do thread roots the last. This allows verification code to find
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
   102
    // any broken objects from those special roots first, not the accidental
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
   103
    // dangling reference from the thread root.
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
   104
    Threads::possibly_parallel_oops_do(false, oops, &blobs);
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
   105
  }
b99e97bc5040 8223215: Shenandoah: Support verifying subset of roots
zgu
parents:
diff changeset
   106
}
55048
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   107
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   108
void ShenandoahRootVerifier::roots_do(OopClosure* oops) {
55119
04ff1e00635a 8224978: Shenandoah: Allows root verifier to verify some roots outside safepoints with proper locks
zgu
parents: 55048
diff changeset
   109
  shenandoah_assert_safepoint();
04ff1e00635a 8224978: Shenandoah: Allows root verifier to verify some roots outside safepoints with proper locks
zgu
parents: 55048
diff changeset
   110
55048
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   111
  CodeBlobToOopClosure blobs(oops, !CodeBlobToOopClosure::FixRelocations);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   112
  CodeCache::blobs_do(&blobs);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   113
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   114
  CLDToOopClosure clds(oops, ClassLoaderData::_claim_none);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   115
  ClassLoaderDataGraph::cld_do(&clds);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   116
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   117
  Universe::oops_do(oops);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   118
  Management::oops_do(oops);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   119
  JvmtiExport::oops_do(oops);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   120
  JNIHandles::oops_do(oops);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   121
  ObjectSynchronizer::oops_do(oops);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   122
  SystemDictionary::oops_do(oops);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   123
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   124
  AlwaysTrueClosure always_true;
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   125
  WeakProcessor::weak_oops_do(&always_true, oops);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   126
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   127
  if (ShenandoahStringDedup::is_enabled()) {
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   128
    ShenandoahStringDedup::oops_do_slow(oops);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   129
  }
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   130
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   131
  // Do thread roots the last. This allows verification code to find
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   132
  // any broken objects from those special roots first, not the accidental
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   133
  // dangling reference from the thread root.
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   134
  Threads::possibly_parallel_oops_do(false, oops, &blobs);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   135
}
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   136
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   137
void ShenandoahRootVerifier::strong_roots_do(OopClosure* oops) {
55119
04ff1e00635a 8224978: Shenandoah: Allows root verifier to verify some roots outside safepoints with proper locks
zgu
parents: 55048
diff changeset
   138
  shenandoah_assert_safepoint();
04ff1e00635a 8224978: Shenandoah: Allows root verifier to verify some roots outside safepoints with proper locks
zgu
parents: 55048
diff changeset
   139
55048
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   140
  CodeBlobToOopClosure blobs(oops, !CodeBlobToOopClosure::FixRelocations);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   141
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   142
  CLDToOopClosure clds(oops, ClassLoaderData::_claim_none);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   143
  ClassLoaderDataGraph::roots_cld_do(&clds, NULL);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   144
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   145
  Universe::oops_do(oops);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   146
  Management::oops_do(oops);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   147
  JvmtiExport::oops_do(oops);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   148
  JNIHandles::oops_do(oops);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   149
  ObjectSynchronizer::oops_do(oops);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   150
  SystemDictionary::oops_do(oops);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   151
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   152
  // Do thread roots the last. This allows verification code to find
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   153
  // any broken objects from those special roots first, not the accidental
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   154
  // dangling reference from the thread root.
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   155
  Threads::possibly_parallel_oops_do(false, oops, &blobs);
812212323fb1 8224751: Shenandoah: Shenandoah Verifier should select proper roots according to current GC cycle
zgu
parents: 54882
diff changeset
   156
}