< prev index next >

src/hotspot/share/gc/z/zStat.cpp

Print this page
rev 60421 : [mq]: 8248401-stefank-review


1031 Ticks     ZStatCycle::_end_of_last;
1032 NumberSeq ZStatCycle::_normalized_duration(0.3 /* alpha */);
1033 
1034 void ZStatCycle::at_start() {
1035   _start_of_last = Ticks::now();
1036 }
1037 
1038 void ZStatCycle::at_end(GCCause::Cause cause, double boost_factor) {
1039   _end_of_last = Ticks::now();
1040 
1041   if (cause == GCCause::_z_warmup) {
1042     _nwarmup_cycles++;
1043   }
1044 
1045   // Calculate normalized cycle duration. The measured duration is
1046   // normalized using the boost factor to avoid artificial deflation
1047   // of the duration when boost mode is enabled.
1048   const double duration = (_end_of_last - _start_of_last).seconds();
1049   const double normalized_duration = duration * boost_factor;
1050   _normalized_duration.add(normalized_duration);
1051 
1052   // Signal that we have completed a visit to all live objects.
1053   Universe::heap()->next_whole_heap_examined();
1054 }
1055 
1056 bool ZStatCycle::is_warm() {
1057   return _nwarmup_cycles >= 3;
1058 }
1059 
1060 uint64_t ZStatCycle::nwarmup_cycles() {
1061   return _nwarmup_cycles;
1062 }
1063 
1064 bool ZStatCycle::is_normalized_duration_trustable() {
1065   // The normalized duration is considered trustable if we have
1066   // completed at least one warmup cycle
1067   return _nwarmup_cycles > 0;
1068 }
1069 
1070 const AbsSeq& ZStatCycle::normalized_duration() {
1071   return _normalized_duration;
1072 }
1073 




1031 Ticks     ZStatCycle::_end_of_last;
1032 NumberSeq ZStatCycle::_normalized_duration(0.3 /* alpha */);
1033 
1034 void ZStatCycle::at_start() {
1035   _start_of_last = Ticks::now();
1036 }
1037 
1038 void ZStatCycle::at_end(GCCause::Cause cause, double boost_factor) {
1039   _end_of_last = Ticks::now();
1040 
1041   if (cause == GCCause::_z_warmup) {
1042     _nwarmup_cycles++;
1043   }
1044 
1045   // Calculate normalized cycle duration. The measured duration is
1046   // normalized using the boost factor to avoid artificial deflation
1047   // of the duration when boost mode is enabled.
1048   const double duration = (_end_of_last - _start_of_last).seconds();
1049   const double normalized_duration = duration * boost_factor;
1050   _normalized_duration.add(normalized_duration);



1051 }
1052 
1053 bool ZStatCycle::is_warm() {
1054   return _nwarmup_cycles >= 3;
1055 }
1056 
1057 uint64_t ZStatCycle::nwarmup_cycles() {
1058   return _nwarmup_cycles;
1059 }
1060 
1061 bool ZStatCycle::is_normalized_duration_trustable() {
1062   // The normalized duration is considered trustable if we have
1063   // completed at least one warmup cycle
1064   return _nwarmup_cycles > 0;
1065 }
1066 
1067 const AbsSeq& ZStatCycle::normalized_duration() {
1068   return _normalized_duration;
1069 }
1070 


< prev index next >