< prev index next >

src/hotspot/share/gc/g1/g1DirtyCardQueue.hpp

Print this page
rev 56066 : [mq]: card_units

*** 64,81 **** using PtrQueue::byte_width_of_buf; }; class G1DirtyCardQueueSet: public PtrQueueSet { ! Monitor* _cbl_mon; // Protects the fields below. BufferNode* _completed_buffers_head; BufferNode* _completed_buffers_tail; ! // Number of actual entries in the list of completed buffers. ! volatile size_t _num_entries_in_completed_buffers; ! size_t _process_completed_buffers_threshold; volatile bool _process_completed_buffers; // If true, notify_all on _cbl_mon when the threshold is reached. bool _notify_when_complete; --- 64,81 ---- using PtrQueue::byte_width_of_buf; }; class G1DirtyCardQueueSet: public PtrQueueSet { ! Monitor* _cbl_mon; // Protects the list and count members. BufferNode* _completed_buffers_head; BufferNode* _completed_buffers_tail; ! // Number of actual cards in the list of completed buffers. ! volatile size_t _num_cards; ! size_t _process_cards_threshold; volatile bool _process_completed_buffers; // If true, notify_all on _cbl_mon when the threshold is reached. bool _notify_when_complete;
*** 110,124 **** size_t stop_at, bool during_pause); bool mut_process_buffer(BufferNode* node); ! // If the queue contains more buffers than configured here, the ! // mutator must start doing some of the concurrent refinement work, ! size_t _max_completed_buffers; ! size_t _completed_buffers_padding; ! static const size_t MaxCompletedBuffersUnlimited = SIZE_MAX; G1FreeIdSet* _free_ids; // The number of completed buffers processed by mutator and rs thread, // respectively. --- 110,124 ---- size_t stop_at, bool during_pause); bool mut_process_buffer(BufferNode* node); ! // If the queue contains more cards than configured here, the ! // mutator must start doing some of the concurrent refinement work. ! size_t _max_cards; ! size_t _max_cards_padding; ! static const size_t MaxCardsUnlimited = SIZE_MAX; G1FreeIdSet* _free_ids; // The number of completed buffers processed by mutator and rs thread, // respectively.
*** 148,182 **** // If the number of completed buffers is > stop_at, then remove and // return a completed buffer from the list. Otherwise, return NULL. BufferNode* get_completed_buffer(size_t stop_at = 0); ! // The number of buffers in the list. Derived as an approximation from the number ! // of entries in the buffers. Racy. ! size_t num_completed_buffers() const { ! return (num_entries_in_completed_buffers() + buffer_size() - 1) / buffer_size(); ! } ! // The number of entries in completed buffers. Read without synchronization. ! size_t num_entries_in_completed_buffers() const { return _num_entries_in_completed_buffers; } ! // Verify that _num_entries_in_completed_buffers is equal to the sum of actual entries // in the completed buffers. ! void verify_num_entries_in_completed_buffers() const NOT_DEBUG_RETURN; bool process_completed_buffers() { return _process_completed_buffers; } void set_process_completed_buffers(bool x) { _process_completed_buffers = x; } ! // Get/Set the number of completed buffers that triggers log processing. ! // Log processing should be done when the number of buffers exceeds the // threshold. ! void set_process_completed_buffers_threshold(size_t sz) { ! _process_completed_buffers_threshold = sz; } ! size_t process_completed_buffers_threshold() const { ! return _process_completed_buffers_threshold; } ! static const size_t ProcessCompletedBuffersThresholdNever = SIZE_MAX; // Notify the consumer if the number of buffers crossed the threshold void notify_if_necessary(); void merge_bufferlists(G1RedirtyCardsQueueSet* src); --- 148,177 ---- // If the number of completed buffers is > stop_at, then remove and // return a completed buffer from the list. Otherwise, return NULL. BufferNode* get_completed_buffer(size_t stop_at = 0); ! // The number of cards in completed buffers. Read without synchronization. ! size_t num_cards() const { return _num_cards; } ! // Verify that _num_cards is equal to the sum of actual cards // in the completed buffers. ! void verify_num_cards() const NOT_DEBUG_RETURN; bool process_completed_buffers() { return _process_completed_buffers; } void set_process_completed_buffers(bool x) { _process_completed_buffers = x; } ! // Get/Set the number of cards that triggers log processing. ! // Log processing should be done when the number of cards exceeds the // threshold. ! void set_process_cards_threshold(size_t sz) { ! _process_cards_threshold = sz; } ! size_t process_cards_threshold() const { ! return _process_cards_threshold; } ! static const size_t ProcessCardsThresholdNever = SIZE_MAX; // Notify the consumer if the number of buffers crossed the threshold void notify_if_necessary(); void merge_bufferlists(G1RedirtyCardsQueueSet* src);
*** 194,215 **** void abandon_logs(); // If any threads have partial logs, add them to the global list of logs. void concatenate_logs(); ! void set_max_completed_buffers(size_t m) { ! _max_completed_buffers = m; } ! size_t max_completed_buffers() const { ! return _max_completed_buffers; } ! void set_completed_buffers_padding(size_t padding) { ! _completed_buffers_padding = padding; } ! size_t completed_buffers_padding() const { ! return _completed_buffers_padding; } jint processed_buffers_mut() { return _processed_buffers_mut; } --- 189,210 ---- void abandon_logs(); // If any threads have partial logs, add them to the global list of logs. void concatenate_logs(); ! void set_max_cards(size_t m) { ! _max_cards = m; } ! size_t max_cards() const { ! return _max_cards; } ! void set_max_cards_padding(size_t padding) { ! _max_cards_padding = padding; } ! size_t max_cards_padding() const { ! return _max_cards_padding; } jint processed_buffers_mut() { return _processed_buffers_mut; }
< prev index next >