src/share/vm/runtime/thread.cpp

Print this page
rev 6562 : 8043224: -Xcheck:jni improvements to exception checking and excessive local refs
Summary: Warning when not checking exceptions from function that require so, also when local refs expand beyond capacity.
Reviewed-by: zgu, coleenp, hseigel


1431   _privileged_stack_top = NULL;
1432   _array_for_gc = NULL;
1433   _suspend_equivalent = false;
1434   _in_deopt_handler = 0;
1435   _doing_unsafe_access = false;
1436   _stack_guard_state = stack_guard_unused;
1437   (void)const_cast<oop&>(_exception_oop = oop(NULL));
1438   _exception_pc  = 0;
1439   _exception_handler_pc = 0;
1440   _is_method_handle_return = 0;
1441   _jvmti_thread_state= NULL;
1442   _should_post_on_exceptions_flag = JNI_FALSE;
1443   _jvmti_get_loaded_classes_closure = NULL;
1444   _interp_only_mode    = 0;
1445   _special_runtime_exit_condition = _no_async_condition;
1446   _pending_async_exception = NULL;
1447   _thread_stat = NULL;
1448   _thread_stat = new ThreadStatistics();
1449   _blocked_on_compilation = false;
1450   _jni_active_critical = 0;

1451   _do_not_unlock_if_synchronized = false;
1452   _cached_monitor_info = NULL;
1453   _parker = Parker::Allocate(this) ;
1454 
1455 #ifndef PRODUCT
1456   _jmp_ring_index = 0;
1457   for (int ji = 0 ; ji < jump_ring_buffer_size ; ji++ ) {
1458     record_jump(NULL, NULL, NULL, 0);
1459   }
1460 #endif /* PRODUCT */
1461 
1462   set_thread_profiler(NULL);
1463   if (FlatProfiler::is_active()) {
1464     // This is where we would decide to either give each thread it's own profiler
1465     // or use one global one from FlatProfiler,
1466     // or up to some count of the number of profiled threads, etc.
1467     ThreadProfiler* pp = new ThreadProfiler();
1468     pp->engage();
1469     set_thread_profiler(pp);
1470   }




1431   _privileged_stack_top = NULL;
1432   _array_for_gc = NULL;
1433   _suspend_equivalent = false;
1434   _in_deopt_handler = 0;
1435   _doing_unsafe_access = false;
1436   _stack_guard_state = stack_guard_unused;
1437   (void)const_cast<oop&>(_exception_oop = oop(NULL));
1438   _exception_pc  = 0;
1439   _exception_handler_pc = 0;
1440   _is_method_handle_return = 0;
1441   _jvmti_thread_state= NULL;
1442   _should_post_on_exceptions_flag = JNI_FALSE;
1443   _jvmti_get_loaded_classes_closure = NULL;
1444   _interp_only_mode    = 0;
1445   _special_runtime_exit_condition = _no_async_condition;
1446   _pending_async_exception = NULL;
1447   _thread_stat = NULL;
1448   _thread_stat = new ThreadStatistics();
1449   _blocked_on_compilation = false;
1450   _jni_active_critical = 0;
1451   _pending_jni_exception_check_fn = NULL;
1452   _do_not_unlock_if_synchronized = false;
1453   _cached_monitor_info = NULL;
1454   _parker = Parker::Allocate(this) ;
1455 
1456 #ifndef PRODUCT
1457   _jmp_ring_index = 0;
1458   for (int ji = 0 ; ji < jump_ring_buffer_size ; ji++ ) {
1459     record_jump(NULL, NULL, NULL, 0);
1460   }
1461 #endif /* PRODUCT */
1462 
1463   set_thread_profiler(NULL);
1464   if (FlatProfiler::is_active()) {
1465     // This is where we would decide to either give each thread it's own profiler
1466     // or use one global one from FlatProfiler,
1467     // or up to some count of the number of profiled threads, etc.
1468     ThreadProfiler* pp = new ThreadProfiler();
1469     pp->engage();
1470     set_thread_profiler(pp);
1471   }