276 WB_ENTRY(void, WB_ClearMethodState(JNIEnv* env, jobject o, jobject method)) |
276 WB_ENTRY(void, WB_ClearMethodState(JNIEnv* env, jobject o, jobject method)) |
277 jmethodID jmid = reflected_method_to_jmid(thread, env, method); |
277 jmethodID jmid = reflected_method_to_jmid(thread, env, method); |
278 methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid)); |
278 methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid)); |
279 MutexLockerEx mu(Compile_lock); |
279 MutexLockerEx mu(Compile_lock); |
280 MethodData* mdo = mh->method_data(); |
280 MethodData* mdo = mh->method_data(); |
|
281 MethodCounters* mcs = mh->method_counters(); |
281 |
282 |
282 if (mdo != NULL) { |
283 if (mdo != NULL) { |
283 mdo->init(); |
284 mdo->init(); |
284 ResourceMark rm; |
285 ResourceMark rm; |
285 int arg_count = mdo->method()->size_of_parameters(); |
286 int arg_count = mdo->method()->size_of_parameters(); |
286 for (int i = 0; i < arg_count; i++) { |
287 for (int i = 0; i < arg_count; i++) { |
287 mdo->set_arg_modified(i, 0); |
288 mdo->set_arg_modified(i, 0); |
288 } |
289 } |
289 } |
290 } |
290 |
291 |
291 mh->backedge_counter()->init(); |
|
292 mh->invocation_counter()->init(); |
|
293 mh->set_interpreter_invocation_count(0); |
|
294 mh->set_interpreter_throwout_count(0); |
|
295 mh->clear_not_c1_compilable(); |
292 mh->clear_not_c1_compilable(); |
296 mh->clear_not_c2_compilable(); |
293 mh->clear_not_c2_compilable(); |
297 mh->clear_not_c2_osr_compilable(); |
294 mh->clear_not_c2_osr_compilable(); |
298 NOT_PRODUCT(mh->set_compiled_invocation_count(0)); |
295 NOT_PRODUCT(mh->set_compiled_invocation_count(0)); |
|
296 if (mcs != NULL) { |
|
297 mcs->backedge_counter()->init(); |
|
298 mcs->invocation_counter()->init(); |
|
299 mcs->set_interpreter_invocation_count(0); |
|
300 mcs->set_interpreter_throwout_count(0); |
299 |
301 |
300 #ifdef TIERED |
302 #ifdef TIERED |
301 mh->set_rate(0.0F); |
303 mcs->set_rate(0.0F); |
302 mh->set_prev_event_count(0); |
304 mh->set_prev_event_count(0, THREAD); |
303 mh->set_prev_time(0); |
305 mh->set_prev_time(0, THREAD); |
304 #endif |
306 #endif |
|
307 } |
305 WB_END |
308 WB_END |
306 |
309 |
307 WB_ENTRY(jboolean, WB_IsInStringTable(JNIEnv* env, jobject o, jstring javaString)) |
310 WB_ENTRY(jboolean, WB_IsInStringTable(JNIEnv* env, jobject o, jstring javaString)) |
308 ResourceMark rm(THREAD); |
311 ResourceMark rm(THREAD); |
309 int len; |
312 int len; |