diff options
Diffstat (limited to 'src/cpu/zero/vm')
-rw-r--r-- | src/cpu/zero/vm/cppInterpreter_zero.cpp | 8 | ||||
-rw-r--r-- | src/cpu/zero/vm/jni_zero.h | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/cpu/zero/vm/cppInterpreter_zero.cpp b/src/cpu/zero/vm/cppInterpreter_zero.cpp index 10501655d..9a237998c 100644 --- a/src/cpu/zero/vm/cppInterpreter_zero.cpp +++ b/src/cpu/zero/vm/cppInterpreter_zero.cpp @@ -212,7 +212,13 @@ int CppInterpreter::native_entry(Method* method, intptr_t UNUSED, TRAPS) { // Update the invocation counter if ((UseCompiler || CountCompiledCalls) && !method->is_synchronized()) { - InvocationCounter *counter = method->invocation_counter(); + MethodCounters* mcs = method->method_counters(); + if (mcs == NULL) { + CALL_VM_NOCHECK(mcs = InterpreterRuntime::build_method_counters(thread, method)); + if (HAS_PENDING_EXCEPTION) + goto unwind_and_return; + } + InvocationCounter *counter = mcs->invocation_counter(); counter->increment(); if (counter->reached_InvocationLimit()) { CALL_VM_NOCHECK( diff --git a/src/cpu/zero/vm/jni_zero.h b/src/cpu/zero/vm/jni_zero.h index 6ac4f63ea..11157f4f0 100644 --- a/src/cpu/zero/vm/jni_zero.h +++ b/src/cpu/zero/vm/jni_zero.h @@ -25,7 +25,13 @@ */ -#if defined(__GNUC__) && (__GNUC__ >= 4) + +// Note: please do not change these without also changing jni_md.h in the JDK +// repository +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility) #define JNIEXPORT __attribute__((visibility("default"))) #define JNIIMPORT __attribute__((visibility("default"))) #else |