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 * 23 */ 24 25 class AdapterHandlerEntry; 26 class AdapterHandlerTable; 27 class AdapterFingerPrint; 28 class vframeStream; 29 30 // Runtime is the base class for various runtime interfaces 31 // (InterpreterRuntime, CompilerRuntime, etc.). It provides 32 // shared functionality such as exception forwarding (C++ to 33 // Java exceptions), locking/unlocking mechanisms, statistical 34 // information, etc. 35 36 class SharedRuntime: AllStatic { 37 private: 38 static methodHandle resolve_sub_helper(JavaThread *thread, 39 bool is_virtual, 40 bool is_optimized, TRAPS); 41 42 // Shared stub locations 43 44 static RuntimeStub* _wrong_method_blob; 646 647 public: 648 649 static AdapterHandlerEntry* new_entry(AdapterFingerPrint* fingerprint, 650 address i2c_entry, address c2i_entry, address c2i_unverified_entry); 651 static nmethod* create_native_wrapper(methodHandle method); 652 static AdapterHandlerEntry* get_adapter(methodHandle method); 653 654 #ifdef HAVE_DTRACE_H 655 static nmethod* create_dtrace_nmethod (methodHandle method); 656 #endif // HAVE_DTRACE_H 657 658 static void print_handler(CodeBlob* b) { print_handler_on(tty, b); } 659 static void print_handler_on(outputStream* st, CodeBlob* b); 660 static bool contains(CodeBlob* b); 661 #ifndef PRODUCT 662 static void print_statistics(); 663 #endif /* PRODUCT */ 664 665 }; | 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 * 23 */ 24 25 #ifndef SHARE_VM_RUNTIME_SHAREDRUNTIME_HPP 26 #define SHARE_VM_RUNTIME_SHAREDRUNTIME_HPP 27 28 #include "interpreter/bytecodeHistogram.hpp" 29 #include "interpreter/bytecodeTracer.hpp" 30 #include "interpreter/linkResolver.hpp" 31 #include "memory/allocation.hpp" 32 #include "memory/resourceArea.hpp" 33 #include "runtime/threadLocalStorage.hpp" 34 #include "utilities/hashtable.hpp" 35 36 class AdapterHandlerEntry; 37 class AdapterHandlerTable; 38 class AdapterFingerPrint; 39 class vframeStream; 40 41 // Runtime is the base class for various runtime interfaces 42 // (InterpreterRuntime, CompilerRuntime, etc.). It provides 43 // shared functionality such as exception forwarding (C++ to 44 // Java exceptions), locking/unlocking mechanisms, statistical 45 // information, etc. 46 47 class SharedRuntime: AllStatic { 48 private: 49 static methodHandle resolve_sub_helper(JavaThread *thread, 50 bool is_virtual, 51 bool is_optimized, TRAPS); 52 53 // Shared stub locations 54 55 static RuntimeStub* _wrong_method_blob; 657 658 public: 659 660 static AdapterHandlerEntry* new_entry(AdapterFingerPrint* fingerprint, 661 address i2c_entry, address c2i_entry, address c2i_unverified_entry); 662 static nmethod* create_native_wrapper(methodHandle method); 663 static AdapterHandlerEntry* get_adapter(methodHandle method); 664 665 #ifdef HAVE_DTRACE_H 666 static nmethod* create_dtrace_nmethod (methodHandle method); 667 #endif // HAVE_DTRACE_H 668 669 static void print_handler(CodeBlob* b) { print_handler_on(tty, b); } 670 static void print_handler_on(outputStream* st, CodeBlob* b); 671 static bool contains(CodeBlob* b); 672 #ifndef PRODUCT 673 static void print_statistics(); 674 #endif /* PRODUCT */ 675 676 }; 677 678 #endif // SHARE_VM_RUNTIME_SHAREDRUNTIME_HPP |