src/hotspot/share/utilities/ticks.cpp
changeset 50174 78d9ffb8146f
parent 50113 caf115bb98ad
--- a/src/hotspot/share/utilities/ticks.cpp	Fri May 18 12:48:09 2018 +0200
+++ b/src/hotspot/share/utilities/ticks.cpp	Wed May 16 15:25:51 2018 +0200
@@ -26,7 +26,7 @@
 #include "runtime/os.hpp"
 #include "utilities/ticks.hpp"
 
-#ifdef X86
+#if defined(X86) && !defined(ZERO)
 #include "rdtsc_x86.hpp"
 #endif
 
@@ -63,7 +63,7 @@
 }
 
 uint64_t FastUnorderedElapsedCounterSource::frequency() {
-#ifdef X86
+#if defined(X86) && !defined(ZERO)
   static bool valid_rdtsc = Rdtsc::initialize();
   if (valid_rdtsc) {
     static const uint64_t freq = (uint64_t)Rdtsc::frequency();
@@ -75,7 +75,7 @@
 }
 
 FastUnorderedElapsedCounterSource::Type FastUnorderedElapsedCounterSource::now() {
-#ifdef X86
+#if defined(X86) && !defined(ZERO)
   static bool valid_rdtsc = Rdtsc::initialize();
   if (valid_rdtsc) {
     return Rdtsc::elapsed_counter();
@@ -107,7 +107,7 @@
 CompositeElapsedCounterSource::Type CompositeElapsedCounterSource::now() {
   CompositeTime ct;
   ct.val1 = ElapsedCounterSource::now();
-#ifdef X86
+#if defined(X86) && !defined(ZERO)
   static bool initialized = false;
   static bool valid_rdtsc = false;
   if (!initialized) {