Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @ 10405:f2110083203d
8005849: JEP 167: Event-Based JVM Tracing
Reviewed-by: acorn, coleenp, sla
Contributed-by: Karen Kinnear <karen.kinnear@oracle.com>, Bengt Rutisson <bengt.rutisson@oracle.com>, Calvin Cheung <calvin.cheung@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Erik Helin <erik.helin@oracle.com>, Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>, Keith McGuigan <keith.mcguigan@oracle.com>, Mattias Tobiasson <mattias.tobiasson@oracle.com>, Markus Gronlund <markus.gronlund@oracle.com>, Mikael Auno <mikael.auno@oracle.com>, Nils Eliasson <nils.eliasson@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
author | sla |
---|---|
date | Mon, 10 Jun 2013 11:30:51 +0200 |
parents | 48391ab0687e |
children | f4311079200c |
comparison
equal
deleted
inserted
replaced
10404:d0add7016434 | 10405:f2110083203d |
---|---|
907 } | 907 } |
908 | 908 |
909 // Anything below that is considered to be zero | 909 // Anything below that is considered to be zero |
910 #define MIN_TIMER_GRANULARITY 0.0000001 | 910 #define MIN_TIMER_GRANULARITY 0.0000001 |
911 | 911 |
912 void G1CollectorPolicy::record_collection_pause_end(double pause_time_ms) { | 912 void G1CollectorPolicy::record_collection_pause_end(double pause_time_ms, EvacuationInfo& evacuation_info) { |
913 double end_time_sec = os::elapsedTime(); | 913 double end_time_sec = os::elapsedTime(); |
914 assert(_cur_collection_pause_used_regions_at_start >= cset_region_length(), | 914 assert(_cur_collection_pause_used_regions_at_start >= cset_region_length(), |
915 "otherwise, the subtraction below does not make sense"); | 915 "otherwise, the subtraction below does not make sense"); |
916 size_t rs_size = | 916 size_t rs_size = |
917 _cur_collection_pause_used_regions_at_start - cset_region_length(); | 917 _cur_collection_pause_used_regions_at_start - cset_region_length(); |
938 set_initiate_conc_mark_if_possible(); | 938 set_initiate_conc_mark_if_possible(); |
939 } | 939 } |
940 | 940 |
941 _mmu_tracker->add_pause(end_time_sec - pause_time_ms/1000.0, | 941 _mmu_tracker->add_pause(end_time_sec - pause_time_ms/1000.0, |
942 end_time_sec, false); | 942 end_time_sec, false); |
943 | |
944 evacuation_info.set_collectionset_used_before(_collection_set_bytes_used_before); | |
945 evacuation_info.set_bytes_copied(_bytes_copied_during_gc); | |
943 | 946 |
944 if (update_stats) { | 947 if (update_stats) { |
945 _trace_gen0_time_data.record_end_collection(pause_time_ms, phase_times()); | 948 _trace_gen0_time_data.record_end_collection(pause_time_ms, phase_times()); |
946 // this is where we update the allocation rate of the application | 949 // this is where we update the allocation rate of the application |
947 double app_time_ms = | 950 double app_time_ms = |
1894 } | 1897 } |
1895 return (uint) result; | 1898 return (uint) result; |
1896 } | 1899 } |
1897 | 1900 |
1898 | 1901 |
1899 void G1CollectorPolicy::finalize_cset(double target_pause_time_ms) { | 1902 void G1CollectorPolicy::finalize_cset(double target_pause_time_ms, EvacuationInfo& evacuation_info) { |
1900 double young_start_time_sec = os::elapsedTime(); | 1903 double young_start_time_sec = os::elapsedTime(); |
1901 | 1904 |
1902 YoungList* young_list = _g1->young_list(); | 1905 YoungList* young_list = _g1->young_list(); |
1903 finalize_incremental_cset_building(); | 1906 finalize_incremental_cset_building(); |
1904 | 1907 |
2100 old_cset_region_length(), | 2103 old_cset_region_length(), |
2101 predicted_pause_time_ms, target_pause_time_ms); | 2104 predicted_pause_time_ms, target_pause_time_ms); |
2102 | 2105 |
2103 double non_young_end_time_sec = os::elapsedTime(); | 2106 double non_young_end_time_sec = os::elapsedTime(); |
2104 phase_times()->record_non_young_cset_choice_time_ms((non_young_end_time_sec - non_young_start_time_sec) * 1000.0); | 2107 phase_times()->record_non_young_cset_choice_time_ms((non_young_end_time_sec - non_young_start_time_sec) * 1000.0); |
2108 evacuation_info.set_collectionset_regions(cset_region_length()); | |
2105 } | 2109 } |
2106 | 2110 |
2107 void TraceGen0TimeData::record_start_collection(double time_to_stop_the_world_ms) { | 2111 void TraceGen0TimeData::record_start_collection(double time_to_stop_the_world_ms) { |
2108 if(TraceGen0Time) { | 2112 if(TraceGen0Time) { |
2109 _all_stop_world_times_ms.add(time_to_stop_the_world_ms); | 2113 _all_stop_world_times_ms.add(time_to_stop_the_world_ms); |