< prev index next >

src/hotspot/share/gc/shared/gcTraceTime.inline.hpp

Print this page




  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_SHARED_GCTRACETIME_INLINE_HPP
  26 #define SHARE_VM_GC_SHARED_GCTRACETIME_INLINE_HPP
  27 
  28 #include "gc/shared/collectedHeap.hpp"
  29 #include "gc/shared/gcTimer.hpp"
  30 #include "gc/shared/gcTrace.hpp"
  31 #include "gc/shared/gcTraceTime.hpp"
  32 #include "logging/log.hpp"
  33 #include "logging/logStream.hpp"
  34 #include "memory/universe.hpp"
  35 #include "prims/jni_md.h"
  36 #include "utilities/ticks.hpp"
  37 
  38 #define LOG_STOP_HEAP_FORMAT SIZE_FORMAT "M->" SIZE_FORMAT "M("  SIZE_FORMAT "M)"
  39 
  40 inline void GCTraceTimeImpl::log_start(jlong start_counter) {
  41   if (_out_start.is_enabled()) {
  42     LogStream out(_out_start);
  43 
  44     out.print("%s", _title);
  45     if (_gc_cause != GCCause::_no_gc) {
  46       out.print(" (%s)", GCCause::to_string(_gc_cause));
  47     }
  48     out.cr();
  49   }
  50 }
  51 
  52 inline void GCTraceTimeImpl::log_stop(jlong start_counter, jlong stop_counter) {
  53   double duration_in_ms = TimeHelper::counter_to_millis(stop_counter - start_counter);
  54   double start_time_in_secs = TimeHelper::counter_to_seconds(start_counter);
  55   double stop_time_in_secs = TimeHelper::counter_to_seconds(stop_counter);




  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_SHARED_GCTRACETIME_INLINE_HPP
  26 #define SHARE_VM_GC_SHARED_GCTRACETIME_INLINE_HPP
  27 
  28 #include "gc/shared/collectedHeap.hpp"
  29 #include "gc/shared/gcTimer.hpp"
  30 #include "gc/shared/gcTrace.hpp"
  31 #include "gc/shared/gcTraceTime.hpp"
  32 #include "logging/log.hpp"
  33 #include "logging/logStream.hpp"
  34 #include "memory/universe.hpp"

  35 #include "utilities/ticks.hpp"
  36 
  37 #define LOG_STOP_HEAP_FORMAT SIZE_FORMAT "M->" SIZE_FORMAT "M("  SIZE_FORMAT "M)"
  38 
  39 inline void GCTraceTimeImpl::log_start(jlong start_counter) {
  40   if (_out_start.is_enabled()) {
  41     LogStream out(_out_start);
  42 
  43     out.print("%s", _title);
  44     if (_gc_cause != GCCause::_no_gc) {
  45       out.print(" (%s)", GCCause::to_string(_gc_cause));
  46     }
  47     out.cr();
  48   }
  49 }
  50 
  51 inline void GCTraceTimeImpl::log_stop(jlong start_counter, jlong stop_counter) {
  52   double duration_in_ms = TimeHelper::counter_to_millis(stop_counter - start_counter);
  53   double start_time_in_secs = TimeHelper::counter_to_seconds(start_counter);
  54   double stop_time_in_secs = TimeHelper::counter_to_seconds(stop_counter);


< prev index next >