src/share/vm/runtime/sharedRuntime.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2013, 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  *


 236 
 237   // Counters
 238 #ifndef PRODUCT
 239   static address nof_megamorphic_calls_addr() { return (address)&_nof_megamorphic_calls; }
 240 #endif // PRODUCT
 241 
 242   // Helper routine for full-speed JVMTI exception throwing support
 243   static void throw_and_post_jvmti_exception(JavaThread *thread, Handle h_exception);
 244   static void throw_and_post_jvmti_exception(JavaThread *thread, Symbol* name, const char *message = NULL);
 245 
 246   // RedefineClasses() tracing support for obsolete method entry
 247   static int rc_trace_method_entry(JavaThread* thread, Method* m);
 248 
 249   // To be used as the entry point for unresolved native methods.
 250   static address native_method_throw_unsatisfied_link_error_entry();
 251   static address native_method_throw_unsupported_operation_exception_entry();
 252 
 253   // bytecode tracing is only used by the TraceBytecodes
 254   static intptr_t trace_bytecode(JavaThread* thread, intptr_t preserve_this_value, intptr_t tos, intptr_t tos2) PRODUCT_RETURN0;
 255 
 256   // Used to back off a spin lock that is under heavy contention
 257   static void yield_all(JavaThread* thread, int attempts = 0);
 258 
 259   static oop retrieve_receiver( Symbol* sig, frame caller );
 260 
 261   static void register_finalizer(JavaThread* thread, oopDesc* obj);
 262 
 263   // dtrace notifications
 264   static int dtrace_object_alloc(oopDesc* o);
 265   static int dtrace_object_alloc_base(Thread* thread, oopDesc* o);
 266   static int dtrace_method_entry(JavaThread* thread, Method* m);
 267   static int dtrace_method_exit(JavaThread* thread, Method* m);
 268 
 269   // Utility method for retrieving the Java thread id, returns 0 if the
 270   // thread is not a well formed Java thread.
 271   static jlong get_java_tid(Thread* thread);
 272 
 273 
 274   // used by native wrappers to reenable yellow if overflow happened in native code
 275   static void reguard_yellow_pages();
 276 
 277   /**
 278    * Fill in the "X cannot be cast to a Y" message for ClassCastException


   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  *


 236 
 237   // Counters
 238 #ifndef PRODUCT
 239   static address nof_megamorphic_calls_addr() { return (address)&_nof_megamorphic_calls; }
 240 #endif // PRODUCT
 241 
 242   // Helper routine for full-speed JVMTI exception throwing support
 243   static void throw_and_post_jvmti_exception(JavaThread *thread, Handle h_exception);
 244   static void throw_and_post_jvmti_exception(JavaThread *thread, Symbol* name, const char *message = NULL);
 245 
 246   // RedefineClasses() tracing support for obsolete method entry
 247   static int rc_trace_method_entry(JavaThread* thread, Method* m);
 248 
 249   // To be used as the entry point for unresolved native methods.
 250   static address native_method_throw_unsatisfied_link_error_entry();
 251   static address native_method_throw_unsupported_operation_exception_entry();
 252 
 253   // bytecode tracing is only used by the TraceBytecodes
 254   static intptr_t trace_bytecode(JavaThread* thread, intptr_t preserve_this_value, intptr_t tos, intptr_t tos2) PRODUCT_RETURN0;
 255 



 256   static oop retrieve_receiver( Symbol* sig, frame caller );
 257 
 258   static void register_finalizer(JavaThread* thread, oopDesc* obj);
 259 
 260   // dtrace notifications
 261   static int dtrace_object_alloc(oopDesc* o);
 262   static int dtrace_object_alloc_base(Thread* thread, oopDesc* o);
 263   static int dtrace_method_entry(JavaThread* thread, Method* m);
 264   static int dtrace_method_exit(JavaThread* thread, Method* m);
 265 
 266   // Utility method for retrieving the Java thread id, returns 0 if the
 267   // thread is not a well formed Java thread.
 268   static jlong get_java_tid(Thread* thread);
 269 
 270 
 271   // used by native wrappers to reenable yellow if overflow happened in native code
 272   static void reguard_yellow_pages();
 273 
 274   /**
 275    * Fill in the "X cannot be cast to a Y" message for ClassCastException