hotspot/src/share/vm/trace/traceEvent.hpp
changeset 21767 41eaa9a17059
parent 18025 b7bcf7497f93
child 27673 df559a888b9f
--- a/hotspot/src/share/vm/trace/traceEvent.hpp	Sat Nov 23 09:56:59 2013 +0100
+++ b/hotspot/src/share/vm/trace/traceEvent.hpp	Sat Nov 23 12:25:13 2013 +0100
@@ -25,26 +25,23 @@
 #ifndef SHARE_VM_TRACE_TRACEEVENT_HPP
 #define SHARE_VM_TRACE_TRACEEVENT_HPP
 
+#include "utilities/macros.hpp"
+
 enum EventStartTime {
   UNTIMED,
   TIMED
 };
 
-#include "utilities/macros.hpp"
-
 #if INCLUDE_TRACE
 
 #include "trace/traceBackend.hpp"
 #include "trace/tracing.hpp"
 #include "tracefiles/traceEventIds.hpp"
 #include "tracefiles/traceTypes.hpp"
+#include "utilities/ticks.hpp"
 
 template<typename T>
 class TraceEvent : public StackObj {
- protected:
-  jlong _startTime;
-  jlong _endTime;
-
  private:
   bool _started;
 #ifdef ASSERT
@@ -54,6 +51,18 @@
   bool _ignore_check;
 #endif
 
+ protected:
+  jlong _startTime;
+  jlong _endTime;
+
+  void set_starttime(const TracingTime& time) {
+    _startTime = time;
+  }
+
+  void set_endtime(const TracingTime& time) {
+    _endTime = time;
+  }
+
  public:
   TraceEvent(EventStartTime timing=TIMED) :
     _startTime(0),
@@ -100,12 +109,12 @@
     set_commited();
   }
 
-  void set_starttime(jlong time) {
-    _startTime = time;
+  void set_starttime(const Ticks& time) {
+    _startTime = time.value();
   }
 
-  void set_endtime(jlong time) {
-    _endTime = time;
+  void set_endtime(const Ticks& time) {
+    _endTime = time.value();
   }
 
   TraceEventId id() const {