< prev index next >

src/share/vm/gc/g1/dirtyCardQueue.hpp

Print this page
rev 10335 : imported patch bufnode_params
rev 10336 : [mq]: inc1

*** 50,74 **** ~DirtyCardQueue(); // Process queue entries and release resources. void flush() { flush_impl(); } ! // Apply the closure to all elements, and reset the index to make the ! // buffer empty. If a closure application returns "false", return ! // "false" immediately, halting the iteration. If "consume" is true, ! // deletes processed entries from logs. bool apply_closure(CardTableEntryClosure* cl, bool consume = true, uint worker_i = 0); ! // Apply the closure to all elements of "buf", down to "index" ! // (inclusive.) If returns "false", then a closure application returned ! // "false", and we return immediately. If "consume" is true, entries are ! // set to NULL as they are processed, so they will not be processed again ! // later. static bool apply_closure_to_buffer(CardTableEntryClosure* cl, ! void** buf, size_t index, size_t sz, bool consume = true, uint worker_i = 0); void **get_buf() { return _buf;} size_t get_index() { return _index;} void reinitialize() { _buf = 0; _sz = 0; _index = 0;} --- 50,77 ---- ~DirtyCardQueue(); // Process queue entries and release resources. void flush() { flush_impl(); } ! // Apply the closure to the elements from _index to _sz. If all ! // closure applications return true, then returns true. Stops ! // processing after the first closure application that returns ! // false, and returns false from this function. If "consume" is ! // true, _index is updated to follow the last processed element. bool apply_closure(CardTableEntryClosure* cl, bool consume = true, uint worker_i = 0); ! // Apply the closure to the elements of "node" from it's index to ! // buffer_size. If all closure applications return true, then ! // returns true. Stops processing after the first closure ! // application that returns false, and returns false from this ! // function. If "consume" is true, the node's index is updated to ! // follow the last processed element. static bool apply_closure_to_buffer(CardTableEntryClosure* cl, ! BufferNode* node, ! size_t buffer_size, bool consume = true, uint worker_i = 0); void **get_buf() { return _buf;} size_t get_index() { return _index;} void reinitialize() { _buf = 0; _sz = 0; _index = 0;}
*** 92,103 **** // The closure used in mut_process_buffer(). CardTableEntryClosure* _mut_process_closure; DirtyCardQueue _shared_dirty_card_queue; ! // Override. ! bool mut_process_buffer(void** buf); // Protected by the _cbl_mon. FreeIdSet* _free_ids; // The number of completed buffers processed by mutator and rs thread, --- 95,105 ---- // The closure used in mut_process_buffer(). CardTableEntryClosure* _mut_process_closure; DirtyCardQueue _shared_dirty_card_queue; ! bool mut_process_buffer(BufferNode* node); // Protected by the _cbl_mon. FreeIdSet* _free_ids; // The number of completed buffers processed by mutator and rs thread,
*** 105,114 **** --- 107,119 ---- jint _processed_buffers_mut; jint _processed_buffers_rs_thread; // Current buffer node used for parallel iteration. BufferNode* volatile _cur_par_buffer_node; + + void concatenate_log(DirtyCardQueue& dcq); + public: DirtyCardQueueSet(bool notify_when_complete = true); void initialize(CardTableEntryClosure* cl, Monitor* cbl_mon,
*** 124,153 **** static uint num_par_ids(); static void handle_zero_index_for_thread(JavaThread* t); // If there exists some completed buffer, pop it, then apply the ! // specified closure to all its elements, nulling out those elements ! // processed. If all elements are processed, returns "true". If no ! // completed buffers exist, returns false. If a completed buffer exists, ! // but is only partially completed before a "yield" happens, the ! // partially completed buffer (with its processed elements set to NULL) ! // is returned to the completed buffer set, and this call returns false. bool apply_closure_to_completed_buffer(CardTableEntryClosure* cl, uint worker_i, size_t stop_at, bool during_pause); BufferNode* get_completed_buffer(size_t stop_at); - // Applies the current closure to all completed buffers, - // non-consumptively. - void apply_closure_to_all_completed_buffers(CardTableEntryClosure* cl); - void reset_for_par_iteration() { _cur_par_buffer_node = _completed_buffers_head; } // Applies the current closure to all completed buffers, non-consumptively. ! // Parallel version. void par_apply_closure_to_all_completed_buffers(CardTableEntryClosure* cl); DirtyCardQueue* shared_dirty_card_queue() { return &_shared_dirty_card_queue; } --- 129,156 ---- static uint num_par_ids(); static void handle_zero_index_for_thread(JavaThread* t); // If there exists some completed buffer, pop it, then apply the ! // specified closure to its active elements. If all active elements ! // are processed, returns "true". If no completed buffers exist, ! // returns false. If a completed buffer exists, but is only ! // partially completed before a "yield" happens, the partially ! // completed buffer (with its index updated to exclude the processed ! // elements) is returned to the completed buffer set, and this call ! // returns false. bool apply_closure_to_completed_buffer(CardTableEntryClosure* cl, uint worker_i, size_t stop_at, bool during_pause); BufferNode* get_completed_buffer(size_t stop_at); void reset_for_par_iteration() { _cur_par_buffer_node = _completed_buffers_head; } // Applies the current closure to all completed buffers, non-consumptively. ! // Can be used in parallel, all callers using the iteration state initialized ! // by reset_for_par_iteration. void par_apply_closure_to_all_completed_buffers(CardTableEntryClosure* cl); DirtyCardQueue* shared_dirty_card_queue() { return &_shared_dirty_card_queue; }
< prev index next >