< prev index next >

src/hotspot/share/runtime/perfData.inline.hpp

Print this page
@@ -1,7 +1,11 @@
  /*
+ <<<<<<< HEAD
+  * Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved.
+ =======
   * Copyright (c) 2002, 2026, Oracle and/or its affiliates. All rights reserved.
+ >>>>>>> master
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

@@ -25,10 +29,11 @@
  #ifndef SHARE_RUNTIME_PERFDATA_INLINE_HPP
  #define SHARE_RUNTIME_PERFDATA_INLINE_HPP
  
  #include "runtime/perfData.hpp"
  
+ #include "services/management.hpp"
  #include "utilities/globalCounter.inline.hpp"
  #include "utilities/globalDefinitions.hpp"
  #include "utilities/growableArray.hpp"
  
  inline int PerfDataList::length() {

@@ -49,10 +54,26 @@
    } else {
      return false;
    }
  }
  
+ inline jlong PerfTickCounters::elapsed_counter_value_ms() const {
+   return Management::ticks_to_ms(_elapsed_counter->get_value());
+ }
+ 
+ inline jlong PerfTickCounters::thread_counter_value_ms() const {
+   return Management::ticks_to_ms(_thread_counter->get_value());
+ }
+ 
+ inline jlong PerfTickCounters::elapsed_counter_value_us() const {
+   return Management::ticks_to_us(_elapsed_counter->get_value());
+ }
+ 
+ inline jlong PerfTickCounters::thread_counter_value_us() const {
+   return Management::ticks_to_us(_thread_counter->get_value());
+ }
+ 
  inline SafePerfTraceTime::SafePerfTraceTime(PerfLongCounter* timerp) : _timerp(timerp) {
    GlobalCounter::CriticalSection cs(Thread::current());
    if (!UsePerfData || !PerfDataManager::has_PerfData() || timerp == nullptr) {
      return;
    }

@@ -67,7 +88,6 @@
  
    _t.stop();
    _timerp->inc(_t.ticks());
  }
  
- 
  #endif // SHARE_RUNTIME_PERFDATA_INLINE_HPP
< prev index next >