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; 643 644 public: 645 646 static AdapterHandlerEntry* new_entry(AdapterFingerPrint* fingerprint, 647 address i2c_entry, address c2i_entry, address c2i_unverified_entry); 648 static nmethod* create_native_wrapper(methodHandle method); 649 static AdapterHandlerEntry* get_adapter(methodHandle method); 650 651 #ifdef HAVE_DTRACE_H 652 static nmethod* create_dtrace_nmethod (methodHandle method); 653 #endif // HAVE_DTRACE_H 654 655 static void print_handler(CodeBlob* b) { print_handler_on(tty, b); } 656 static void print_handler_on(outputStream* st, CodeBlob* b); 657 static bool contains(CodeBlob* b); 658 #ifndef PRODUCT 659 static void print_statistics(); 660 #endif /* PRODUCT */ 661 662 }; | 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; 654 655 public: 656 657 static AdapterHandlerEntry* new_entry(AdapterFingerPrint* fingerprint, 658 address i2c_entry, address c2i_entry, address c2i_unverified_entry); 659 static nmethod* create_native_wrapper(methodHandle method); 660 static AdapterHandlerEntry* get_adapter(methodHandle method); 661 662 #ifdef HAVE_DTRACE_H 663 static nmethod* create_dtrace_nmethod (methodHandle method); 664 #endif // HAVE_DTRACE_H 665 666 static void print_handler(CodeBlob* b) { print_handler_on(tty, b); } 667 static void print_handler_on(outputStream* st, CodeBlob* b); 668 static bool contains(CodeBlob* b); 669 #ifndef PRODUCT 670 static void print_statistics(); 671 #endif /* PRODUCT */ 672 673 }; 674 675 #endif // SHARE_VM_RUNTIME_SHAREDRUNTIME_HPP |