< prev index next >

src/share/vm/gc/shared/referenceProcessor.hpp

Print this page
rev 13328 : [mq]: webrev.0b
rev 13331 : imported patch webrev.3b

*** 1,7 **** /* ! * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 24,33 **** --- 24,34 ---- #ifndef SHARE_VM_GC_SHARED_REFERENCEPROCESSOR_HPP #define SHARE_VM_GC_SHARED_REFERENCEPROCESSOR_HPP #include "gc/shared/referencePolicy.hpp" + #include "gc/shared/referenceProcessorPhaseTimes.hpp" #include "gc/shared/referenceProcessorStats.hpp" #include "memory/referenceType.hpp" #include "oops/instanceRefKlass.hpp" class GCTimer;
*** 166,176 **** }; class ReferenceProcessor : public CHeapObj<mtGC> { private: ! size_t total_count(DiscoveredList lists[]); protected: // The SoftReference master timestamp clock static jlong _soft_ref_timestamp_clock; --- 167,177 ---- }; class ReferenceProcessor : public CHeapObj<mtGC> { private: ! size_t total_count(DiscoveredList lists[]) const; protected: // The SoftReference master timestamp clock static jlong _soft_ref_timestamp_clock;
*** 240,250 **** ReferencePolicy* policy, bool clear_referent, BoolObjectClosure* is_alive, OopClosure* keep_alive, VoidClosure* complete_gc, ! AbstractRefProcTaskExecutor* task_executor); void process_phaseJNI(BoolObjectClosure* is_alive, OopClosure* keep_alive, VoidClosure* complete_gc); --- 241,252 ---- ReferencePolicy* policy, bool clear_referent, BoolObjectClosure* is_alive, OopClosure* keep_alive, VoidClosure* complete_gc, ! AbstractRefProcTaskExecutor* task_executor, ! ReferenceProcessorPhaseTimes* phase_times); void process_phaseJNI(BoolObjectClosure* is_alive, OopClosure* keep_alive, VoidClosure* complete_gc);
*** 308,318 **** // Returns the name of the discovered reference list // occupying the i / _num_q slot. const char* list_name(uint i); ! void enqueue_discovered_reflists(AbstractRefProcTaskExecutor* task_executor); protected: // "Preclean" the given discovered reference list // by removing references with strongly reachable referents. // Currently used in support of CMS only. --- 310,321 ---- // Returns the name of the discovered reference list // occupying the i / _num_q slot. const char* list_name(uint i); ! void enqueue_discovered_reflists(AbstractRefProcTaskExecutor* task_executor, ! ReferenceProcessorPhaseTimes* phase_times); protected: // "Preclean" the given discovered reference list // by removing references with strongly reachable referents. // Currently used in support of CMS only.
*** 418,437 **** ReferenceProcessorStats process_discovered_references(BoolObjectClosure* is_alive, OopClosure* keep_alive, VoidClosure* complete_gc, AbstractRefProcTaskExecutor* task_executor, ! GCTimer *gc_timer); // Enqueue references at end of GC (called by the garbage collector) ! void enqueue_discovered_references(AbstractRefProcTaskExecutor* task_executor = NULL); // If a discovery is in process that is being superceded, abandon it: all // the discovered lists will be empty, and all the objects on them will // have NULL discovered fields. Must be called only at a safepoint. void abandon_partial_discovery(); // debugging void verify_no_references_recorded() PRODUCT_RETURN; void verify_referent(oop obj) PRODUCT_RETURN; }; --- 421,443 ---- ReferenceProcessorStats process_discovered_references(BoolObjectClosure* is_alive, OopClosure* keep_alive, VoidClosure* complete_gc, AbstractRefProcTaskExecutor* task_executor, ! ReferenceProcessorPhaseTimes* phase_times); // Enqueue references at end of GC (called by the garbage collector) ! void enqueue_discovered_references(AbstractRefProcTaskExecutor* task_executor, ! ReferenceProcessorPhaseTimes* phase_times); // If a discovery is in process that is being superceded, abandon it: all // the discovered lists will be empty, and all the objects on them will // have NULL discovered fields. Must be called only at a safepoint. void abandon_partial_discovery(); + size_t total_reference_count(ReferenceType rt) const; + // debugging void verify_no_references_recorded() PRODUCT_RETURN; void verify_referent(oop obj) PRODUCT_RETURN; };
*** 584,596 **** // Abstract reference processing task to execute. class AbstractRefProcTaskExecutor::ProcessTask { protected: ProcessTask(ReferenceProcessor& ref_processor, DiscoveredList refs_lists[], ! bool marks_oops_alive) : _ref_processor(ref_processor), _refs_lists(refs_lists), _marks_oops_alive(marks_oops_alive) { } public: virtual void work(unsigned int work_id, BoolObjectClosure& is_alive, --- 590,604 ---- // Abstract reference processing task to execute. class AbstractRefProcTaskExecutor::ProcessTask { protected: ProcessTask(ReferenceProcessor& ref_processor, DiscoveredList refs_lists[], ! bool marks_oops_alive, ! ReferenceProcessorPhaseTimes* phase_times) : _ref_processor(ref_processor), _refs_lists(refs_lists), + _phase_times(phase_times), _marks_oops_alive(marks_oops_alive) { } public: virtual void work(unsigned int work_id, BoolObjectClosure& is_alive,
*** 602,630 **** { return _marks_oops_alive; } protected: ReferenceProcessor& _ref_processor; DiscoveredList* _refs_lists; const bool _marks_oops_alive; }; // Abstract reference processing task to execute. class AbstractRefProcTaskExecutor::EnqueueTask { protected: EnqueueTask(ReferenceProcessor& ref_processor, DiscoveredList refs_lists[], ! int n_queues) : _ref_processor(ref_processor), _refs_lists(refs_lists), ! _n_queues(n_queues) { } public: virtual void work(unsigned int work_id) = 0; protected: ReferenceProcessor& _ref_processor; DiscoveredList* _refs_lists; int _n_queues; }; #endif // SHARE_VM_GC_SHARED_REFERENCEPROCESSOR_HPP --- 610,642 ---- { return _marks_oops_alive; } protected: ReferenceProcessor& _ref_processor; DiscoveredList* _refs_lists; + ReferenceProcessorPhaseTimes* _phase_times; const bool _marks_oops_alive; }; // Abstract reference processing task to execute. class AbstractRefProcTaskExecutor::EnqueueTask { protected: EnqueueTask(ReferenceProcessor& ref_processor, DiscoveredList refs_lists[], ! int n_queues, ! ReferenceProcessorPhaseTimes* phase_times) : _ref_processor(ref_processor), _refs_lists(refs_lists), ! _n_queues(n_queues), ! _phase_times(phase_times) { } public: virtual void work(unsigned int work_id) = 0; protected: ReferenceProcessor& _ref_processor; DiscoveredList* _refs_lists; + ReferenceProcessorPhaseTimes* _phase_times; int _n_queues; }; #endif // SHARE_VM_GC_SHARED_REFERENCEPROCESSOR_HPP
< prev index next >