diff src/share/vm/runtime/thread.hpp @ 13796:8cd953e97e2d

rework of benchmark counters: fix size at VM entry, not at build time
author Lukas Stadler <lukas.stadler@jku.at>
date Wed, 29 Jan 2014 09:21:50 +0100
parents 77fbf02f701c
children d8041d695d19
line wrap: on
line diff
--- a/src/share/vm/runtime/thread.hpp	Wed Jan 29 10:45:43 2014 +0100
+++ b/src/share/vm/runtime/thread.hpp	Wed Jan 29 09:21:50 2014 +0100
@@ -922,16 +922,10 @@
   address   _graal_implicit_exception_pc;  // pc at which the most recent implicit exception occurred
   bool      _graal_compiling;
 
-  // number of counters, increase as needed. 0 == disabled
-#define GRAAL_COUNTERS_SIZE (0)
-#define GRAAL_COUNTERS_EXCLUDE_COMPILER_THREADS (true)
-
-#if GRAAL_COUNTERS_SIZE > 0
-  jlong     _graal_counters[GRAAL_COUNTERS_SIZE];
-  static jlong _graal_old_thread_counters[GRAAL_COUNTERS_SIZE];
-#endif // GRAAL_COUNTERS_SIZE > 0
+  jlong*    _graal_counters;
 
  public:
+  static jlong* _graal_old_thread_counters;
   static void collect_counters(typeArrayOop array);
  private:
 #endif // GRAAL
@@ -1394,11 +1388,7 @@
 #ifdef GRAAL
   static ByteSize graal_alternate_call_target_offset() { return byte_offset_of(JavaThread, _graal_alternate_call_target); }
   static ByteSize graal_implicit_exception_pc_offset() { return byte_offset_of(JavaThread, _graal_implicit_exception_pc); }
-#if GRAAL_COUNTERS_SIZE > 0
   static ByteSize graal_counters_offset()        { return byte_offset_of(JavaThread, _graal_counters      ); }
-#else
-  static ByteSize graal_counters_offset()        { return in_ByteSize(0); }
-#endif // GRAAL_COUNTERS_SIZE > 0
 #endif // GRAAL
   static ByteSize exception_oop_offset()         { return byte_offset_of(JavaThread, _exception_oop       ); }
   static ByteSize exception_pc_offset()          { return byte_offset_of(JavaThread, _exception_pc        ); }