Mercurial > hg > graal-jvmci-8
diff src/share/vm/runtime/thread.hpp @ 11852:d7964e96b0b0
move benchmark counters into separate class and make them correct for multithreaded applications
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Mon, 30 Sep 2013 18:32:26 +0200 |
parents | 6b0fd0964b87 |
children | ec267141f753 |
line wrap: on
line diff
--- a/src/share/vm/runtime/thread.hpp Mon Sep 30 14:02:07 2013 +0200 +++ b/src/share/vm/runtime/thread.hpp Mon Sep 30 18:32:26 2013 +0200 @@ -919,6 +919,17 @@ #ifdef GRAAL address _graal_alternate_call_target; address _graal_implicit_exception_pc; // pc at which the most recent implicit exception occurred + + // number of counters, increase as needed. 0 == disabled +#define GRAAL_COUNTERS_SIZE (0) +#define GRAAL_COUNTERS_EXCLUDE_COMPILER_THREADS (true) + + jlong _graal_counters[GRAAL_COUNTERS_SIZE]; + static jlong _graal_old_counters[GRAAL_COUNTERS_SIZE]; + + public: + static void collect_counters(typeArrayOop array); + private: #endif StackGuardState _stack_guard_state; @@ -1379,6 +1390,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); } + static ByteSize graal_counters_offset() { return byte_offset_of(JavaThread, _graal_counters ); } #endif static ByteSize exception_oop_offset() { return byte_offset_of(JavaThread, _exception_oop ); } static ByteSize exception_pc_offset() { return byte_offset_of(JavaThread, _exception_pc ); }