1 /* 2 * Copyright (c) 1997, 2024, 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 * 23 */ 24 25 #include "precompiled.hpp" 26 27 #include "compiler/abstractCompiler.hpp" 28 #include "compiler/compileBroker.hpp" 29 #include "compiler/disassembler.hpp" 30 #include "oops/oop.inline.hpp" 31 #include "runtime/interfaceSupport.inline.hpp" 32 #include "runtime/methodDetails.hpp" 33 34 Symbol* MethodDetails::class_name() { 35 if (_class_name == nullptr) { 36 if (_method_handle != nullptr) { 37 _class_name = (*_method_handle)->method_holder()->name(); 38 } else if (_ci_method != nullptr) { 39 _class_name = _ci_method->holder()->name()->get_symbol(); 40 } else if (_method != nullptr) { 41 _class_name = _method->method_holder()->name(); 42 } 43 } 44 return _class_name; 45 } 46 47 Symbol* MethodDetails::method_name() { 48 if (_method_name == nullptr) { 49 if (_method_handle != nullptr) { 50 _method_name = (*_method_handle)->name(); 51 } else if (_ci_method != nullptr) { 52 _method_name = _ci_method->name()->get_symbol(); 53 } else if (_method != nullptr) { 54 _method_name = _method->name(); 55 } 56 } 57 return _method_name; 58 } 59 60 Symbol* MethodDetails::signature() { 61 if (_signature == nullptr) { 62 if (_method_handle != nullptr) { 63 _signature = (*_method_handle)->signature(); 64 } else if (_ci_method != nullptr) { 65 _signature = _ci_method->signature()->as_symbol()->get_symbol(); 66 } else if (_method != nullptr) { 67 _signature = _method->signature(); 68 } 69 } 70 return _signature; 71 }