src/hotspot/share/gc/g1/g1OopClosures.hpp
changeset 49606 9ae8719efcae
parent 49337 e4fdca451542
child 49607 acffe6ff3ae7
equal deleted inserted replaced
49605:784f3f2dea14 49606:9ae8719efcae
     1 /*
     1 /*
     2  * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2001, 2018, 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.
   179 // Closure to scan the root regions during concurrent marking
   179 // Closure to scan the root regions during concurrent marking
   180 class G1RootRegionScanClosure : public MetadataAwareOopClosure {
   180 class G1RootRegionScanClosure : public MetadataAwareOopClosure {
   181 private:
   181 private:
   182   G1CollectedHeap* _g1h;
   182   G1CollectedHeap* _g1h;
   183   G1ConcurrentMark* _cm;
   183   G1ConcurrentMark* _cm;
   184 public:
   184   uint _worker_id;
   185   G1RootRegionScanClosure(G1CollectedHeap* g1h, G1ConcurrentMark* cm) :
   185 public:
   186     _g1h(g1h), _cm(cm) { }
   186   G1RootRegionScanClosure(G1CollectedHeap* g1h, G1ConcurrentMark* cm, uint worker_id) :
       
   187     _g1h(g1h), _cm(cm), _worker_id(worker_id) { }
   187   template <class T> void do_oop_nv(T* p);
   188   template <class T> void do_oop_nv(T* p);
   188   virtual void do_oop(      oop* p) { do_oop_nv(p); }
   189   virtual void do_oop(      oop* p) { do_oop_nv(p); }
   189   virtual void do_oop(narrowOop* p) { do_oop_nv(p); }
   190   virtual void do_oop(narrowOop* p) { do_oop_nv(p); }
   190 };
   191 };
   191 
   192