equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
21 * questions. |
21 * questions. |
22 * |
22 * |
23 */ |
23 */ |
24 |
24 |
25 #include "precompiled.hpp" |
25 #include "precompiled.hpp" |
|
26 #include "gc/g1/g1BarrierSet.hpp" |
26 #include "gc/g1/g1ConcurrentRefine.hpp" |
27 #include "gc/g1/g1ConcurrentRefine.hpp" |
27 #include "gc/g1/g1ConcurrentRefineThread.hpp" |
28 #include "gc/g1/g1ConcurrentRefineThread.hpp" |
28 #include "logging/log.hpp" |
29 #include "logging/log.hpp" |
29 #include "memory/allocation.inline.hpp" |
30 #include "memory/allocation.inline.hpp" |
30 #include "runtime/java.hpp" |
31 #include "runtime/java.hpp" |
375 } |
376 } |
376 |
377 |
377 void G1ConcurrentRefine::adjust(double update_rs_time, |
378 void G1ConcurrentRefine::adjust(double update_rs_time, |
378 size_t update_rs_processed_buffers, |
379 size_t update_rs_processed_buffers, |
379 double goal_ms) { |
380 double goal_ms) { |
380 DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); |
381 DirtyCardQueueSet& dcqs = G1BarrierSet::dirty_card_queue_set(); |
381 |
382 |
382 if (G1UseAdaptiveConcRefinement) { |
383 if (G1UseAdaptiveConcRefinement) { |
383 update_zones(update_rs_time, update_rs_processed_buffers, goal_ms); |
384 update_zones(update_rs_time, update_rs_processed_buffers, goal_ms); |
384 |
385 |
385 // Change the barrier params |
386 // Change the barrier params |
423 _thread_control.maybe_activate_next(worker_id); |
424 _thread_control.maybe_activate_next(worker_id); |
424 } |
425 } |
425 } |
426 } |
426 |
427 |
427 bool G1ConcurrentRefine::do_refinement_step(uint worker_id) { |
428 bool G1ConcurrentRefine::do_refinement_step(uint worker_id) { |
428 DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); |
429 DirtyCardQueueSet& dcqs = G1BarrierSet::dirty_card_queue_set(); |
429 |
430 |
430 size_t curr_buffer_num = dcqs.completed_buffers_num(); |
431 size_t curr_buffer_num = dcqs.completed_buffers_num(); |
431 // If the number of the buffers falls down into the yellow zone, |
432 // If the number of the buffers falls down into the yellow zone, |
432 // that means that the transition period after the evacuation pause has ended. |
433 // that means that the transition period after the evacuation pause has ended. |
433 // Since the value written to the DCQS is the same for all threads, there is no |
434 // Since the value written to the DCQS is the same for all threads, there is no |