src/hotspot/share/gc/z/zRootsIterator.hpp
changeset 55603 3868dde58ebb
parent 54511 fbfcebad8e66
child 55740 b3ff56f955c8
equal deleted inserted replaced
55602:73395f9cad54 55603:3868dde58ebb
     1 /*
     1 /*
     2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   109   void oops_do(ZRootsIteratorClosure* cl, bool visit_jvmti_weak_export = false);
   109   void oops_do(ZRootsIteratorClosure* cl, bool visit_jvmti_weak_export = false);
   110 };
   110 };
   111 
   111 
   112 class ZConcurrentRootsIterator {
   112 class ZConcurrentRootsIterator {
   113 private:
   113 private:
   114   const bool                 _marking;
       
   115   SuspendibleThreadSetJoiner _sts_joiner;
       
   116   ZOopStorageIterator        _jni_handles_iter;
   114   ZOopStorageIterator        _jni_handles_iter;
       
   115   int                        _cld_claim;
   117 
   116 
   118   void do_jni_handles(ZRootsIteratorClosure* cl);
   117   void do_jni_handles(ZRootsIteratorClosure* cl);
   119   void do_class_loader_data_graph(ZRootsIteratorClosure* cl);
   118   void do_class_loader_data_graph(ZRootsIteratorClosure* cl);
   120 
   119 
   121   ZParallelOopsDo<ZConcurrentRootsIterator, &ZConcurrentRootsIterator::do_jni_handles>             _jni_handles;
   120   ZParallelOopsDo<ZConcurrentRootsIterator, &ZConcurrentRootsIterator::do_jni_handles>             _jni_handles;
   122   ZParallelOopsDo<ZConcurrentRootsIterator, &ZConcurrentRootsIterator::do_class_loader_data_graph> _class_loader_data_graph;
   121   ZParallelOopsDo<ZConcurrentRootsIterator, &ZConcurrentRootsIterator::do_class_loader_data_graph> _class_loader_data_graph;
   123 
   122 
   124 public:
   123 public:
   125   ZConcurrentRootsIterator(bool marking = false);
   124   ZConcurrentRootsIterator(int cld_claim);
   126   ~ZConcurrentRootsIterator();
   125   ~ZConcurrentRootsIterator();
   127 
   126 
   128   void oops_do(ZRootsIteratorClosure* cl);
   127   void oops_do(ZRootsIteratorClosure* cl);
   129 };
   128 };
   130 
   129