2391 void G1CMTask::decrease_limits() { 2392 // This is called when we believe that we're going to do an infrequent 2393 // operation which will increase the per byte scanned cost (i.e. move 2394 // entries to/from the global stack). It basically tries to decrease the 2395 // scanning limit so that the clock is called earlier. 2396 2397 _words_scanned_limit = _real_words_scanned_limit - 2398 3 * words_scanned_period / 4; 2399 _refs_reached_limit = _real_refs_reached_limit - 2400 3 * refs_reached_period / 4; 2401 } 2402 2403 void G1CMTask::move_entries_to_global_stack() { 2404 // Local array where we'll store the entries that will be popped 2405 // from the local queue. 2406 G1TaskQueueEntry buffer[G1CMMarkStack::EntriesPerChunk]; 2407 2408 size_t n = 0; 2409 G1TaskQueueEntry task_entry; 2410 while (n < G1CMMarkStack::EntriesPerChunk && _task_queue->pop_local(task_entry)) { 2411 buffer[n] = task_entry; 2412 ++n; 2413 } 2414 if (n < G1CMMarkStack::EntriesPerChunk) { 2415 buffer[n] = G1TaskQueueEntry(); 2416 } 2417 2418 if (n > 0) { 2419 if (!_cm->mark_stack_push(buffer)) { 2420 set_has_aborted(); 2421 } 2422 } 2423 2424 // This operation was quite expensive, so decrease the limits. 2425 decrease_limits(); 2426 } 2427 2428 bool G1CMTask::get_entries_from_global_stack() { 2429 // Local array where we'll store the entries that will be popped 2430 // from the global stack. 2431 G1TaskQueueEntry buffer[G1CMMarkStack::EntriesPerChunk]; 2432 2433 if (!_cm->mark_stack_pop(buffer)) { 2434 return false; 2435 } | 2391 void G1CMTask::decrease_limits() { 2392 // This is called when we believe that we're going to do an infrequent 2393 // operation which will increase the per byte scanned cost (i.e. move 2394 // entries to/from the global stack). It basically tries to decrease the 2395 // scanning limit so that the clock is called earlier. 2396 2397 _words_scanned_limit = _real_words_scanned_limit - 2398 3 * words_scanned_period / 4; 2399 _refs_reached_limit = _real_refs_reached_limit - 2400 3 * refs_reached_period / 4; 2401 } 2402 2403 void G1CMTask::move_entries_to_global_stack() { 2404 // Local array where we'll store the entries that will be popped 2405 // from the local queue. 2406 G1TaskQueueEntry buffer[G1CMMarkStack::EntriesPerChunk]; 2407 2408 size_t n = 0; 2409 G1TaskQueueEntry task_entry; 2410 while (n < G1CMMarkStack::EntriesPerChunk && _task_queue->pop_local(task_entry)) { 2411 buffer[n].assign(task_entry); 2412 ++n; 2413 } 2414 if (n < G1CMMarkStack::EntriesPerChunk) { 2415 buffer[n].assign(G1TaskQueueEntry()); 2416 } 2417 2418 if (n > 0) { 2419 if (!_cm->mark_stack_push(buffer)) { 2420 set_has_aborted(); 2421 } 2422 } 2423 2424 // This operation was quite expensive, so decrease the limits. 2425 decrease_limits(); 2426 } 2427 2428 bool G1CMTask::get_entries_from_global_stack() { 2429 // Local array where we'll store the entries that will be popped 2430 // from the global stack. 2431 G1TaskQueueEntry buffer[G1CMMarkStack::EntriesPerChunk]; 2432 2433 if (!_cm->mark_stack_pop(buffer)) { 2434 return false; 2435 } |