< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp

Print this page




  12  * accompanied this code).
  13  *
  14  * You should have received a copy of the GNU General Public License version
  15  * 2 along with this work; if not, write to the Free Software Foundation,
  16  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  17  *
  18  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  19  * or visit www.oracle.com if you need additional information or have any
  20  * questions.
  21  *
  22  */
  23 
  24 #include "precompiled.hpp"
  25 #include "code/codeCache.hpp"
  26 #include "code/nmethod.hpp"
  27 #include "gc/shenandoah/shenandoahHeap.inline.hpp"
  28 #include "gc/shenandoah/shenandoahCodeRoots.hpp"
  29 #include "gc/shenandoah/shenandoahUtils.hpp"
  30 #include "memory/resourceArea.hpp"
  31 #include "memory/universe.hpp"

  32 
  33 ShenandoahParallelCodeCacheIterator::ShenandoahParallelCodeCacheIterator(const GrowableArray<CodeHeap*>* heaps) {
  34   _length = heaps->length();
  35   _iters = NEW_C_HEAP_ARRAY(ShenandoahParallelCodeHeapIterator, _length, mtGC);
  36   for (int h = 0; h < _length; h++) {
  37     _iters[h] = ShenandoahParallelCodeHeapIterator(heaps->at(h));
  38   }
  39 }
  40 
  41 ShenandoahParallelCodeCacheIterator::~ShenandoahParallelCodeCacheIterator() {
  42   FREE_C_HEAP_ARRAY(ParallelCodeHeapIterator, _iters);
  43 }
  44 
  45 void ShenandoahParallelCodeCacheIterator::parallel_blobs_do(CodeBlobClosure* f) {
  46   for (int c = 0; c < _length; c++) {
  47     _iters[c].parallel_blobs_do(f);
  48   }
  49 }
  50 
  51 ShenandoahParallelCodeHeapIterator::ShenandoahParallelCodeHeapIterator(CodeHeap* heap) :




  12  * accompanied this code).
  13  *
  14  * You should have received a copy of the GNU General Public License version
  15  * 2 along with this work; if not, write to the Free Software Foundation,
  16  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  17  *
  18  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  19  * or visit www.oracle.com if you need additional information or have any
  20  * questions.
  21  *
  22  */
  23 
  24 #include "precompiled.hpp"
  25 #include "code/codeCache.hpp"
  26 #include "code/nmethod.hpp"
  27 #include "gc/shenandoah/shenandoahHeap.inline.hpp"
  28 #include "gc/shenandoah/shenandoahCodeRoots.hpp"
  29 #include "gc/shenandoah/shenandoahUtils.hpp"
  30 #include "memory/resourceArea.hpp"
  31 #include "memory/universe.hpp"
  32 #include "runtime/atomic.hpp"
  33 
  34 ShenandoahParallelCodeCacheIterator::ShenandoahParallelCodeCacheIterator(const GrowableArray<CodeHeap*>* heaps) {
  35   _length = heaps->length();
  36   _iters = NEW_C_HEAP_ARRAY(ShenandoahParallelCodeHeapIterator, _length, mtGC);
  37   for (int h = 0; h < _length; h++) {
  38     _iters[h] = ShenandoahParallelCodeHeapIterator(heaps->at(h));
  39   }
  40 }
  41 
  42 ShenandoahParallelCodeCacheIterator::~ShenandoahParallelCodeCacheIterator() {
  43   FREE_C_HEAP_ARRAY(ParallelCodeHeapIterator, _iters);
  44 }
  45 
  46 void ShenandoahParallelCodeCacheIterator::parallel_blobs_do(CodeBlobClosure* f) {
  47   for (int c = 0; c < _length; c++) {
  48     _iters[c].parallel_blobs_do(f);
  49   }
  50 }
  51 
  52 ShenandoahParallelCodeHeapIterator::ShenandoahParallelCodeHeapIterator(CodeHeap* heap) :


< prev index next >