Mercurial > hg > graal-jvmci-8
comparison src/share/vm/compiler/compileBroker.cpp @ 23288:d2cd0b15957c
Restore previous order of pushing and popping JNI handle blocks
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Mon, 25 Jan 2016 09:21:40 -0800 |
parents | 1fbfcc0334d3 |
children | 5d04cfbd1945 |
comparison
equal
deleted
inserted
replaced
23287:bd88fd590f4e | 23288:d2cd0b15957c |
---|---|
2150 set_last_compile(thread, method, is_osr, task_level); | 2150 set_last_compile(thread, method, is_osr, task_level); |
2151 | 2151 |
2152 DTRACE_METHOD_COMPILE_BEGIN_PROBE(method, compiler_name(task_level)); | 2152 DTRACE_METHOD_COMPILE_BEGIN_PROBE(method, compiler_name(task_level)); |
2153 } | 2153 } |
2154 | 2154 |
2155 // Allocate a new set of JNI handles. | |
2156 push_jni_handle_block(); | |
2155 Method* target_handle = task->method(); | 2157 Method* target_handle = task->method(); |
2156 int compilable = ciEnv::MethodCompilable; | 2158 int compilable = ciEnv::MethodCompilable; |
2157 const char* failure_reason = NULL; | 2159 const char* failure_reason = NULL; |
2158 const char* retry_message = NULL; | 2160 const char* retry_message = NULL; |
2159 AbstractCompiler *comp = compiler(task_level); | 2161 AbstractCompiler *comp = compiler(task_level); |
2183 } | 2185 } |
2184 | 2186 |
2185 } else | 2187 } else |
2186 #endif // COMPILERJVMCI | 2188 #endif // COMPILERJVMCI |
2187 { | 2189 { |
2188 // Allocate a new set of JNI handles. | |
2189 push_jni_handle_block(); | |
2190 | |
2191 NoHandleMark nhm; | 2190 NoHandleMark nhm; |
2192 ThreadToNativeFromVM ttn(thread); | 2191 ThreadToNativeFromVM ttn(thread); |
2193 | 2192 |
2194 ciEnv ci_env(task, system_dictionary_modification_counter); | 2193 ciEnv ci_env(task, system_dictionary_modification_counter); |
2195 if (should_break) { | 2194 if (should_break) { |
2232 failure_reason = ci_env.failure_reason(); | 2231 failure_reason = ci_env.failure_reason(); |
2233 retry_message = ci_env.retry_message(); | 2232 retry_message = ci_env.retry_message(); |
2234 } | 2233 } |
2235 | 2234 |
2236 post_compile(thread, task, event, !ci_env.failing(), &ci_env); | 2235 post_compile(thread, task, event, !ci_env.failing(), &ci_env); |
2237 | 2236 } |
2238 pop_jni_handle_block(); | 2237 // Remove the JNI handle block after the ciEnv destructor has run in |
2239 } | 2238 // the previous block. |
2239 pop_jni_handle_block(); | |
2240 | 2240 |
2241 if (failure_reason != NULL) { | 2241 if (failure_reason != NULL) { |
2242 if (_compilation_log != NULL) { | 2242 if (_compilation_log != NULL) { |
2243 _compilation_log->log_failure(thread, task, failure_reason, retry_message); | 2243 _compilation_log->log_failure(thread, task, failure_reason, retry_message); |
2244 } | 2244 } |