< prev index next >

src/hotspot/share/gc/shared/oopStorage.hpp

Print this page

        

*** 150,179 **** // Parallel iteration is for the exclusive use of the GC. // Other clients must use serial iteration. template<bool concurrent, bool is_const> class ParState; // Service thread cleanup support. ! ! // Called by the service thread to process any pending cleanups for this ! // storage object. Drains the _deferred_updates list, and deletes empty ! // blocks. Stops deleting if there is an in-progress concurrent ! // iteration. Locks both the _allocation_mutex and the _active_mutex, and ! // may safepoint. Deletion may be throttled, with only some available ! // work performed, in order to allow other Service thread subtasks to run. ! // Returns true if there may be more work to do, false if nothing to do. bool delete_empty_blocks(); ! // Called by safepoint cleanup to notify the service thread (via ! // Service_lock) that there may be some OopStorage objects with pending ! // cleanups to process. ! static void trigger_cleanup_if_needed(); ! ! // Called by the service thread (while holding Service_lock) to to test ! // for pending cleanup requests, and resets the request state to allow ! // recognition of new requests. Returns true if there was a pending ! // request. ! static bool has_cleanup_work_and_reset(); // Debugging and logging support. const char* name() const; void print_on(outputStream* st) const PRODUCT_RETURN; --- 150,171 ---- // Parallel iteration is for the exclusive use of the GC. // Other clients must use serial iteration. template<bool concurrent, bool is_const> class ParState; // Service thread cleanup support. ! // Stops deleting if there is an in-progress concurrent iteration. ! // Locks both the _allocation_mutex and the _active_mutex, and may ! // safepoint. Deletion may be throttled, with only some available ! // work performed, in order to allow other Service thread subtasks ! // to run. Returns true if there may be more work to do, false if ! // nothing to do. bool delete_empty_blocks(); ! // Service thread cleanup support. ! // Called by the service thread (while holding Service_lock) to test ! // whether a call to delete_empty_blocks should be made. ! bool needs_delete_empty_blocks() const; // Debugging and logging support. const char* name() const; void print_on(outputStream* st) const PRODUCT_RETURN;
*** 181,191 **** // Declare, but not define, the public class OopStorage::TestAccess. // That class is defined as part of the unit-test. It "exports" the needed // private types by providing public typedefs for them. class TestAccess; ! private: class Block; // Fixed-size array of oops, plus bookkeeping. class ActiveArray; // Array of Blocks, plus bookkeeping. class AllocationListEntry; // Provides AllocationList links in a Block. // Doubly-linked list of Blocks. --- 173,186 ---- // Declare, but not define, the public class OopStorage::TestAccess. // That class is defined as part of the unit-test. It "exports" the needed // private types by providing public typedefs for them. class TestAccess; ! // xlC on AIX can't compile test_oopStorage.cpp with following private ! // classes. C++03 introduced access for nested classes with DR45, but xlC ! // version 12 rejects it. ! NOT_AIX( private: ) class Block; // Fixed-size array of oops, plus bookkeeping. class ActiveArray; // Array of Blocks, plus bookkeeping. class AllocationListEntry; // Provides AllocationList links in a Block. // Doubly-linked list of Blocks.
*** 219,229 **** --- 214,227 ---- private: const char* _name; ActiveArray* _active_array; AllocationList _allocation_list; + AIX_ONLY(public:) // xlC 12 on AIX doesn't implement C++ DR45. Block* volatile _deferred_updates; + AIX_ONLY(private:) + Mutex* _allocation_mutex; Mutex* _active_mutex; // Volatile for racy unlocked accesses. volatile size_t _allocation_count;
*** 232,250 **** mutable SingleWriterSynchronizer _protect_active; // mutable because this gets set even for const iteration. mutable int _concurrent_iteration_count; ! volatile bool _needs_cleanup; bool try_add_block(); Block* block_for_allocation(); Block* find_block_or_null(const oop* ptr) const; void delete_empty_block(const Block& block); bool reduce_deferred_updates(); void record_needs_cleanup(); // Managing _active_array. bool expand_active_array(); void replace_active_array(ActiveArray* new_array); ActiveArray* obtain_active_array() const; --- 230,251 ---- mutable SingleWriterSynchronizer _protect_active; // mutable because this gets set even for const iteration. mutable int _concurrent_iteration_count; ! volatile uint _needs_cleanup; bool try_add_block(); Block* block_for_allocation(); Block* find_block_or_null(const oop* ptr) const; void delete_empty_block(const Block& block); bool reduce_deferred_updates(); + void notify_needs_cleanup(); + AIX_ONLY(public:) // xlC 12 on AIX doesn't implement C++ DR45. void record_needs_cleanup(); + AIX_ONLY(private:) // Managing _active_array. bool expand_active_array(); void replace_active_array(ActiveArray* new_array); ActiveArray* obtain_active_array() const;
< prev index next >