< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.hpp

Print this page
rev 55429 : 8226413: Shenandoah: Separate root scanner for SH::object_iterate()

*** 112,121 **** --- 112,122 ---- ~ShenandoahCodeCacheRoots(); void code_blobs_do(CodeBlobClosure* blob_cl, uint worker_id); }; + template <bool SINGLE_THREADED> class ShenandoahClassLoaderDataRoots { public: ShenandoahClassLoaderDataRoots(); void clds_do(CLDClosure* strong_clds, CLDClosure* weak_clds, uint worker_id);
*** 134,147 **** template <typename ITR> class ShenandoahRootScanner : public ShenandoahRootProcessor { private: ShenandoahSerialRoots _serial_roots; - ShenandoahJNIHandleRoots<false /*concurrent*/> _jni_roots; - ShenandoahClassLoaderDataRoots _cld_roots; ShenandoahThreadRoots _thread_roots; ShenandoahCodeCacheRoots<ITR> _code_roots; public: ShenandoahRootScanner(uint n_workers, ShenandoahPhaseTimings::Phase phase); // Apply oops, clds and blobs to all strongly reachable roots in the system, // during class unloading cycle --- 135,148 ---- template <typename ITR> class ShenandoahRootScanner : public ShenandoahRootProcessor { private: ShenandoahSerialRoots _serial_roots; ShenandoahThreadRoots _thread_roots; ShenandoahCodeCacheRoots<ITR> _code_roots; + ShenandoahJNIHandleRoots<false /*concurrent*/ > _jni_roots; + ShenandoahClassLoaderDataRoots<false /*single threaded*/> _cld_roots; public: ShenandoahRootScanner(uint n_workers, ShenandoahPhaseTimings::Phase phase); // Apply oops, clds and blobs to all strongly reachable roots in the system, // during class unloading cycle
*** 150,173 **** // Apply oops, clds and blobs to all strongly reachable roots and weakly reachable // roots when class unloading is disabled during this cycle void roots_do(uint worker_id, OopClosure* cl); void roots_do(uint worker_id, OopClosure* oops, CLDClosure* clds, CodeBlobClosure* code, ThreadClosure* tc = NULL); - // For heap object iteration - void roots_do_unchecked(OopClosure* cl); - void strong_roots_do_unchecked(OopClosure* cl); }; typedef ShenandoahRootScanner<ShenandoahAllCodeRootsIterator> ShenandoahAllRootScanner; typedef ShenandoahRootScanner<ShenandoahCsetCodeRootsIterator> ShenandoahCSetRootScanner; // Evacuate all roots at a safepoint class ShenandoahRootEvacuator : public ShenandoahRootProcessor { private: ShenandoahSerialRoots _serial_roots; ShenandoahJNIHandleRoots<false /*concurrent*/> _jni_roots; ! ShenandoahClassLoaderDataRoots _cld_roots; ShenandoahThreadRoots _thread_roots; ShenandoahWeakRoots _weak_roots; ShenandoahStringDedupRoots _dedup_roots; ShenandoahCodeCacheRoots<ShenandoahCsetCodeRootsIterator> _code_roots; bool _include_concurrent_roots; --- 151,188 ---- // Apply oops, clds and blobs to all strongly reachable roots and weakly reachable // roots when class unloading is disabled during this cycle void roots_do(uint worker_id, OopClosure* cl); void roots_do(uint worker_id, OopClosure* oops, CLDClosure* clds, CodeBlobClosure* code, ThreadClosure* tc = NULL); }; typedef ShenandoahRootScanner<ShenandoahAllCodeRootsIterator> ShenandoahAllRootScanner; typedef ShenandoahRootScanner<ShenandoahCsetCodeRootsIterator> ShenandoahCSetRootScanner; + // This scanner is only for SH::object_iteration() and only supports single-threaded + // root scanning + class ShenandoahHeapIterationRootScanner : public ShenandoahRootProcessor { + private: + ShenandoahSerialRoots _serial_roots; + ShenandoahThreadRoots _thread_roots; + ShenandoahJNIHandleRoots<false /*concurrent*/> _jni_roots; + ShenandoahClassLoaderDataRoots<true /*single threaded*/> _cld_roots; + ShenandoahCodeCacheRoots<ShenandoahAllCodeRootsIterator> _code_roots; + + public: + ShenandoahHeapIterationRootScanner(); + + void roots_do(OopClosure* cl); + void strong_roots_do(OopClosure* cl); + }; + // Evacuate all roots at a safepoint class ShenandoahRootEvacuator : public ShenandoahRootProcessor { private: ShenandoahSerialRoots _serial_roots; ShenandoahJNIHandleRoots<false /*concurrent*/> _jni_roots; ! ShenandoahClassLoaderDataRoots<false /*single threaded*/> _cld_roots; ShenandoahThreadRoots _thread_roots; ShenandoahWeakRoots _weak_roots; ShenandoahStringDedupRoots _dedup_roots; ShenandoahCodeCacheRoots<ShenandoahCsetCodeRootsIterator> _code_roots; bool _include_concurrent_roots;
*** 181,191 **** // Update all roots at a safepoint class ShenandoahRootUpdater : public ShenandoahRootProcessor { private: ShenandoahSerialRoots _serial_roots; ShenandoahJNIHandleRoots<false /*concurrent*/> _jni_roots; ! ShenandoahClassLoaderDataRoots _cld_roots; ShenandoahThreadRoots _thread_roots; ShenandoahWeakRoots _weak_roots; ShenandoahStringDedupRoots _dedup_roots; ShenandoahCodeCacheRoots<ShenandoahCsetCodeRootsIterator> _code_roots; const bool _update_code_cache; --- 196,206 ---- // Update all roots at a safepoint class ShenandoahRootUpdater : public ShenandoahRootProcessor { private: ShenandoahSerialRoots _serial_roots; ShenandoahJNIHandleRoots<false /*concurrent*/> _jni_roots; ! ShenandoahClassLoaderDataRoots<false /*single threaded*/> _cld_roots; ShenandoahThreadRoots _thread_roots; ShenandoahWeakRoots _weak_roots; ShenandoahStringDedupRoots _dedup_roots; ShenandoahCodeCacheRoots<ShenandoahCsetCodeRootsIterator> _code_roots; const bool _update_code_cache;
*** 200,210 **** // Adjuster all roots at a safepoint during full gc class ShenandoahRootAdjuster : public ShenandoahRootProcessor { private: ShenandoahSerialRoots _serial_roots; ShenandoahJNIHandleRoots<false /*concurrent*/> _jni_roots; ! ShenandoahClassLoaderDataRoots _cld_roots; ShenandoahThreadRoots _thread_roots; ShenandoahWeakRoots _weak_roots; ShenandoahStringDedupRoots _dedup_roots; ShenandoahCodeCacheRoots<ShenandoahAllCodeRootsIterator> _code_roots; --- 215,225 ---- // Adjuster all roots at a safepoint during full gc class ShenandoahRootAdjuster : public ShenandoahRootProcessor { private: ShenandoahSerialRoots _serial_roots; ShenandoahJNIHandleRoots<false /*concurrent*/> _jni_roots; ! ShenandoahClassLoaderDataRoots<false /*single threaded*/> _cld_roots; ShenandoahThreadRoots _thread_roots; ShenandoahWeakRoots _weak_roots; ShenandoahStringDedupRoots _dedup_roots; ShenandoahCodeCacheRoots<ShenandoahAllCodeRootsIterator> _code_roots;
< prev index next >