< prev index next >

hotspot/src/share/vm/runtime/thread.cpp

Print this page
rev 7151 : 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: dsimms
   1 /*
   2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


1448   _privileged_stack_top = NULL;
1449   _array_for_gc = NULL;
1450   _suspend_equivalent = false;
1451   _in_deopt_handler = 0;
1452   _doing_unsafe_access = false;
1453   _stack_guard_state = stack_guard_unused;
1454   (void)const_cast<oop&>(_exception_oop = NULL);
1455   _exception_pc  = 0;
1456   _exception_handler_pc = 0;
1457   _is_method_handle_return = 0;
1458   _jvmti_thread_state= NULL;
1459   _should_post_on_exceptions_flag = JNI_FALSE;
1460   _jvmti_get_loaded_classes_closure = NULL;
1461   _interp_only_mode    = 0;
1462   _special_runtime_exit_condition = _no_async_condition;
1463   _pending_async_exception = NULL;
1464   _thread_stat = NULL;
1465   _thread_stat = new ThreadStatistics();
1466   _blocked_on_compilation = false;
1467   _jni_active_critical = 0;

1468   _do_not_unlock_if_synchronized = false;
1469   _cached_monitor_info = NULL;
1470   _parker = Parker::Allocate(this) ;
1471 
1472 #ifndef PRODUCT
1473   _jmp_ring_index = 0;
1474   for (int ji = 0 ; ji < jump_ring_buffer_size ; ji++ ) {
1475     record_jump(NULL, NULL, NULL, 0);
1476   }
1477 #endif /* PRODUCT */
1478 
1479   set_thread_profiler(NULL);
1480   if (FlatProfiler::is_active()) {
1481     // This is where we would decide to either give each thread it's own profiler
1482     // or use one global one from FlatProfiler,
1483     // or up to some count of the number of profiled threads, etc.
1484     ThreadProfiler* pp = new ThreadProfiler();
1485     pp->engage();
1486     set_thread_profiler(pp);
1487   }


   1 /*
   2  * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


1448   _privileged_stack_top = NULL;
1449   _array_for_gc = NULL;
1450   _suspend_equivalent = false;
1451   _in_deopt_handler = 0;
1452   _doing_unsafe_access = false;
1453   _stack_guard_state = stack_guard_unused;
1454   (void)const_cast<oop&>(_exception_oop = NULL);
1455   _exception_pc  = 0;
1456   _exception_handler_pc = 0;
1457   _is_method_handle_return = 0;
1458   _jvmti_thread_state= NULL;
1459   _should_post_on_exceptions_flag = JNI_FALSE;
1460   _jvmti_get_loaded_classes_closure = NULL;
1461   _interp_only_mode    = 0;
1462   _special_runtime_exit_condition = _no_async_condition;
1463   _pending_async_exception = NULL;
1464   _thread_stat = NULL;
1465   _thread_stat = new ThreadStatistics();
1466   _blocked_on_compilation = false;
1467   _jni_active_critical = 0;
1468   _pending_jni_exception_check_fn = NULL;
1469   _do_not_unlock_if_synchronized = false;
1470   _cached_monitor_info = NULL;
1471   _parker = Parker::Allocate(this) ;
1472 
1473 #ifndef PRODUCT
1474   _jmp_ring_index = 0;
1475   for (int ji = 0 ; ji < jump_ring_buffer_size ; ji++ ) {
1476     record_jump(NULL, NULL, NULL, 0);
1477   }
1478 #endif /* PRODUCT */
1479 
1480   set_thread_profiler(NULL);
1481   if (FlatProfiler::is_active()) {
1482     // This is where we would decide to either give each thread it's own profiler
1483     // or use one global one from FlatProfiler,
1484     // or up to some count of the number of profiled threads, etc.
1485     ThreadProfiler* pp = new ThreadProfiler();
1486     pp->engage();
1487     set_thread_profiler(pp);
1488   }


< prev index next >