Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 13451:02f27ecb4f3a
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 18 Dec 2013 00:00:24 +0100 |
parents | 096c224171c4 86e6d691f2e1 |
children | d8041d695d19 |
comparison
equal
deleted
inserted
replaced
13371:4db09b7304da | 13451:02f27ecb4f3a |
---|---|
54 #include "memory/generationSpec.hpp" | 54 #include "memory/generationSpec.hpp" |
55 #include "memory/referenceProcessor.hpp" | 55 #include "memory/referenceProcessor.hpp" |
56 #include "oops/oop.inline.hpp" | 56 #include "oops/oop.inline.hpp" |
57 #include "oops/oop.pcgc.inline.hpp" | 57 #include "oops/oop.pcgc.inline.hpp" |
58 #include "runtime/vmThread.hpp" | 58 #include "runtime/vmThread.hpp" |
59 #include "utilities/ticks.hpp" | |
59 | 60 |
60 size_t G1CollectedHeap::_humongous_object_threshold_in_words = 0; | 61 size_t G1CollectedHeap::_humongous_object_threshold_in_words = 0; |
61 | 62 |
62 // turn it on so that the contents of the young list (scan-only / | 63 // turn it on so that the contents of the young list (scan-only / |
63 // to-be-collected) are printed at "strategic" points before / during | 64 // to-be-collected) are printed at "strategic" points before / during |
1282 if (GC_locker::check_active_before_gc()) { | 1283 if (GC_locker::check_active_before_gc()) { |
1283 return false; | 1284 return false; |
1284 } | 1285 } |
1285 | 1286 |
1286 STWGCTimer* gc_timer = G1MarkSweep::gc_timer(); | 1287 STWGCTimer* gc_timer = G1MarkSweep::gc_timer(); |
1287 gc_timer->register_gc_start(os::elapsed_counter()); | 1288 gc_timer->register_gc_start(); |
1288 | 1289 |
1289 SerialOldTracer* gc_tracer = G1MarkSweep::gc_tracer(); | 1290 SerialOldTracer* gc_tracer = G1MarkSweep::gc_tracer(); |
1290 gc_tracer->report_gc_start(gc_cause(), gc_timer->gc_start()); | 1291 gc_tracer->report_gc_start(gc_cause(), gc_timer->gc_start()); |
1291 | 1292 |
1292 SvcGCMarker sgcm(SvcGCMarker::FULL); | 1293 SvcGCMarker sgcm(SvcGCMarker::FULL); |
1550 print_heap_after_gc(); | 1551 print_heap_after_gc(); |
1551 trace_heap_after_gc(gc_tracer); | 1552 trace_heap_after_gc(gc_tracer); |
1552 | 1553 |
1553 post_full_gc_dump(gc_timer); | 1554 post_full_gc_dump(gc_timer); |
1554 | 1555 |
1555 gc_timer->register_gc_end(os::elapsed_counter()); | 1556 gc_timer->register_gc_end(); |
1556 gc_tracer->report_gc_end(gc_timer->gc_end(), gc_timer->time_partitions()); | 1557 gc_tracer->report_gc_end(gc_timer->gc_end(), gc_timer->time_partitions()); |
1557 } | 1558 } |
1558 | 1559 |
1559 return true; | 1560 return true; |
1560 } | 1561 } |
2490 // and it's waiting for a full GC to finish will be woken up. It is | 2491 // and it's waiting for a full GC to finish will be woken up. It is |
2491 // waiting in VM_G1IncCollectionPause::doit_epilogue(). | 2492 // waiting in VM_G1IncCollectionPause::doit_epilogue(). |
2492 FullGCCount_lock->notify_all(); | 2493 FullGCCount_lock->notify_all(); |
2493 } | 2494 } |
2494 | 2495 |
2495 void G1CollectedHeap::register_concurrent_cycle_start(jlong start_time) { | 2496 void G1CollectedHeap::register_concurrent_cycle_start(const Ticks& start_time) { |
2496 _concurrent_cycle_started = true; | 2497 _concurrent_cycle_started = true; |
2497 _gc_timer_cm->register_gc_start(start_time); | 2498 _gc_timer_cm->register_gc_start(start_time); |
2498 | 2499 |
2499 _gc_tracer_cm->report_gc_start(gc_cause(), _gc_timer_cm->gc_start()); | 2500 _gc_tracer_cm->report_gc_start(gc_cause(), _gc_timer_cm->gc_start()); |
2500 trace_heap_before_gc(_gc_tracer_cm); | 2501 trace_heap_before_gc(_gc_tracer_cm); |
2504 if (_concurrent_cycle_started) { | 2505 if (_concurrent_cycle_started) { |
2505 if (_cm->has_aborted()) { | 2506 if (_cm->has_aborted()) { |
2506 _gc_tracer_cm->report_concurrent_mode_failure(); | 2507 _gc_tracer_cm->report_concurrent_mode_failure(); |
2507 } | 2508 } |
2508 | 2509 |
2509 _gc_timer_cm->register_gc_end(os::elapsed_counter()); | 2510 _gc_timer_cm->register_gc_end(); |
2510 _gc_tracer_cm->report_gc_end(_gc_timer_cm->gc_end(), _gc_timer_cm->time_partitions()); | 2511 _gc_tracer_cm->report_gc_end(_gc_timer_cm->gc_end(), _gc_timer_cm->time_partitions()); |
2511 | 2512 |
2512 _concurrent_cycle_started = false; | 2513 _concurrent_cycle_started = false; |
2513 } | 2514 } |
2514 } | 2515 } |
3895 | 3896 |
3896 if (GC_locker::check_active_before_gc()) { | 3897 if (GC_locker::check_active_before_gc()) { |
3897 return false; | 3898 return false; |
3898 } | 3899 } |
3899 | 3900 |
3900 _gc_timer_stw->register_gc_start(os::elapsed_counter()); | 3901 _gc_timer_stw->register_gc_start(); |
3901 | 3902 |
3902 _gc_tracer_stw->report_gc_start(gc_cause(), _gc_timer_stw->gc_start()); | 3903 _gc_tracer_stw->report_gc_start(gc_cause(), _gc_timer_stw->gc_start()); |
3903 | 3904 |
3904 SvcGCMarker sgcm(SvcGCMarker::MINOR); | 3905 SvcGCMarker sgcm(SvcGCMarker::MINOR); |
3905 ResourceMark rm; | 3906 ResourceMark rm; |
4273 // before any GC notifications are raised. | 4274 // before any GC notifications are raised. |
4274 g1mm()->update_sizes(); | 4275 g1mm()->update_sizes(); |
4275 | 4276 |
4276 _gc_tracer_stw->report_evacuation_info(&evacuation_info); | 4277 _gc_tracer_stw->report_evacuation_info(&evacuation_info); |
4277 _gc_tracer_stw->report_tenuring_threshold(_g1_policy->tenuring_threshold()); | 4278 _gc_tracer_stw->report_tenuring_threshold(_g1_policy->tenuring_threshold()); |
4278 _gc_timer_stw->register_gc_end(os::elapsed_counter()); | 4279 _gc_timer_stw->register_gc_end(); |
4279 _gc_tracer_stw->report_gc_end(_gc_timer_stw->gc_end(), _gc_timer_stw->time_partitions()); | 4280 _gc_tracer_stw->report_gc_end(_gc_timer_stw->gc_end(), _gc_timer_stw->time_partitions()); |
4280 } | 4281 } |
4281 // It should now be safe to tell the concurrent mark thread to start | 4282 // It should now be safe to tell the concurrent mark thread to start |
4282 // without its logging output interfering with the logging output | 4283 // without its logging output interfering with the logging output |
4283 // that came from the pause. | 4284 // that came from the pause. |