1 /*
2 * Copyright (c) 1997, 2018, 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 *
1024 HOTSPOT_METHOD_RETURN(
1025 get_java_tid(thread),
1026 (char *) kname->bytes(), kname->utf8_length(),
1027 (char *) name->bytes(), name->utf8_length(),
1028 (char *) sig->bytes(), sig->utf8_length());
1029 #endif /* USDT2 */
1030 return 0;
1031 JRT_END
1032
1033
1034 // Finds receiver, CallInfo (i.e. receiver method), and calling bytecode)
1035 // for a call current in progress, i.e., arguments has been pushed on stack
1036 // put callee has not been invoked yet. Used by: resolve virtual/static,
1037 // vtable updates, etc. Caller frame must be compiled.
1038 Handle SharedRuntime::find_callee_info(JavaThread* thread, Bytecodes::Code& bc, CallInfo& callinfo, TRAPS) {
1039 ResourceMark rm(THREAD);
1040
1041 // last java frame on stack (which includes native call frames)
1042 vframeStream vfst(thread, true); // Do not skip and javaCalls
1043
1044 return find_callee_info_helper(thread, vfst, bc, callinfo, CHECK_(Handle()));
1045 }
1046
1047
1048 // Finds receiver, CallInfo (i.e. receiver method), and calling bytecode
1049 // for a call current in progress, i.e., arguments has been pushed on stack
1050 // but callee has not been invoked yet. Caller frame must be compiled.
1051 Handle SharedRuntime::find_callee_info_helper(JavaThread* thread,
1052 vframeStream& vfst,
1053 Bytecodes::Code& bc,
1054 CallInfo& callinfo, TRAPS) {
1055 Handle receiver;
1056 Handle nullHandle; //create a handy null handle for exception returns
1057
1058 assert(!vfst.at_end(), "Java frame must exist");
1059
1060 // Find caller and bci from vframe
1061 methodHandle caller(THREAD, vfst.method());
1062 int bci = vfst.bci();
1063
1064 // Find bytecode
|
1 /*
2 * Copyright (c) 1997, 2019, 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 *
1024 HOTSPOT_METHOD_RETURN(
1025 get_java_tid(thread),
1026 (char *) kname->bytes(), kname->utf8_length(),
1027 (char *) name->bytes(), name->utf8_length(),
1028 (char *) sig->bytes(), sig->utf8_length());
1029 #endif /* USDT2 */
1030 return 0;
1031 JRT_END
1032
1033
1034 // Finds receiver, CallInfo (i.e. receiver method), and calling bytecode)
1035 // for a call current in progress, i.e., arguments has been pushed on stack
1036 // put callee has not been invoked yet. Used by: resolve virtual/static,
1037 // vtable updates, etc. Caller frame must be compiled.
1038 Handle SharedRuntime::find_callee_info(JavaThread* thread, Bytecodes::Code& bc, CallInfo& callinfo, TRAPS) {
1039 ResourceMark rm(THREAD);
1040
1041 // last java frame on stack (which includes native call frames)
1042 vframeStream vfst(thread, true); // Do not skip and javaCalls
1043
1044 return find_callee_info_helper(thread, vfst, bc, callinfo, THREAD);
1045 }
1046
1047
1048 // Finds receiver, CallInfo (i.e. receiver method), and calling bytecode
1049 // for a call current in progress, i.e., arguments has been pushed on stack
1050 // but callee has not been invoked yet. Caller frame must be compiled.
1051 Handle SharedRuntime::find_callee_info_helper(JavaThread* thread,
1052 vframeStream& vfst,
1053 Bytecodes::Code& bc,
1054 CallInfo& callinfo, TRAPS) {
1055 Handle receiver;
1056 Handle nullHandle; //create a handy null handle for exception returns
1057
1058 assert(!vfst.at_end(), "Java frame must exist");
1059
1060 // Find caller and bci from vframe
1061 methodHandle caller(THREAD, vfst.method());
1062 int bci = vfst.bci();
1063
1064 // Find bytecode
|