hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp
changeset 3583 805584e16d0f
parent 2882 d508a8bac491
child 3585 6974128ccb13
equal deleted inserted replaced
3280:791e5e4859ae 3583:805584e16d0f
   102     int n_logs = 0;
   102     int n_logs = 0;
   103     int lower_limit = 0;
   103     int lower_limit = 0;
   104     double start_vtime_sec; // only used when G1SmoothConcRefine is on
   104     double start_vtime_sec; // only used when G1SmoothConcRefine is on
   105     int prev_buffer_num; // only used when G1SmoothConcRefine is on
   105     int prev_buffer_num; // only used when G1SmoothConcRefine is on
   106     // This thread activation threshold
   106     // This thread activation threshold
   107     int threshold = DCQBarrierProcessCompletedThreshold * _worker_id;
   107     int threshold = G1UpdateBufferQueueProcessingThreshold * _worker_id;
   108     // Next thread activation threshold
   108     // Next thread activation threshold
   109     int next_threshold = threshold + DCQBarrierProcessCompletedThreshold;
   109     int next_threshold = threshold + G1UpdateBufferQueueProcessingThreshold;
   110     int deactivation_threshold = MAX2<int>(threshold - DCQBarrierProcessCompletedThreshold / 2, 0);
   110     int deactivation_threshold = MAX2<int>(threshold - G1UpdateBufferQueueProcessingThreshold / 2, 0);
   111 
   111 
   112     if (G1SmoothConcRefine) {
   112     if (G1SmoothConcRefine) {
   113       lower_limit = 0;
   113       lower_limit = 0;
   114       start_vtime_sec = os::elapsedVTime();
   114       start_vtime_sec = os::elapsedVTime();
   115       prev_buffer_num = (int) dcqs.completed_buffers_num();
   115       prev_buffer_num = (int) dcqs.completed_buffers_num();
   116     } else {
   116     } else {
   117       lower_limit = DCQBarrierProcessCompletedThreshold / 4; // For now.
   117       lower_limit = G1UpdateBufferQueueProcessingThreshold / 4; // For now.
   118     }
   118     }
   119     while (dcqs.apply_closure_to_completed_buffer(_worker_id + _worker_id_offset, lower_limit)) {
   119     while (dcqs.apply_closure_to_completed_buffer(_worker_id + _worker_id_offset, lower_limit)) {
   120       double end_vtime_sec;
   120       double end_vtime_sec;
   121       double elapsed_vtime_sec;
   121       double elapsed_vtime_sec;
   122       int elapsed_vtime_ms;
   122       int elapsed_vtime_ms;