/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "classfile/javaClasses.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp"
#include "code/codeCache.hpp"
#include "code/debugInfoRec.hpp"
#include "code/nmethod.hpp"
#include "code/pcDesc.hpp"
#include "code/scopeDesc.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/oopMapCache.hpp"
#include "memory/resourceArea.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/objectMonitor.hpp"
#include "runtime/objectMonitor.inline.hpp"
#include "runtime/signature.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/synchronizer.hpp"
#include "runtime/vframe.hpp"
#include "runtime/vframeArray.hpp"
#include "runtime/vframe_hp.hpp"
}
}
// Interpreter frame
if (f->is_interpreted_frame()) {
}
// Compiled frame
if (cb->is_nmethod()) {
}
if (f->is_runtime_frame()) {
// Skip this frame and try again.
}
}
// External frame
}
if (s.is_first_frame()) return NULL;
}
return vf;
}
while (f != NULL) {
f = f->sender();
}
return NULL;
}
// ------------- javaVFrame --------------
"must be at safepoint or it's a java frame of the current thread");
bool found_first_monitor = false;
//
// Skip the monitor that the thread is blocked to enter or waiting on
//
continue;
}
found_first_monitor = true;
}
return result;
}
} else {
}
}
}
// If this is the first frame, and java.lang.Object.wait(...) then print out the receiver.
if (frame_count == 0) {
}
}
st->print_cr("\t- %s <" INTPTR_FORMAT "> (a %s)", "parking to wait for ", (address)obj, k->external_name());
}
}
// Print out all monitors that we have locked or are trying to lock
bool found_first_monitor = false;
if (monitor->owner_is_scalar_replaced()) {
} else {
}
}
continue;
}
// First, assume we have the monitor locked. If we haven't found an
// owned monitor before and this is the first frame, then we need to
// see if we have completed the lock or we are blocked trying to
// acquire it - we can only be blocked if the monitor is inflated
if (!found_first_monitor && frame_count == 0) {
if (mark->has_monitor() &&
lock_state = "waiting to lock";
}
}
found_first_monitor = true;
}
}
}
}
// ------------- interpretedVFrame --------------
return fr().interpreter_frame_bcp();
}
}
}
for (BasicObjectLock* current = (fr().previous_monitor_in_interpreter_frame(fr().interpreter_frame_monitor_begin()));
}
return result;
}
}
return fr().interpreter_frame_method();
}
// If the method is native, max_locals is not telling the truth.
// maxlocals then equals the size of parameters
}
// Get oopmap describing oops and int for current bci
if (TraceDeoptimization && Verbose) {
} else {
}
// handle locals
for(int i=0; i < length; i++) {
// Find stack location
// oop value
sv = new StackValue(h);
} else {
// integer
}
}
return result;
}
// If the method is native, max_locals is not telling the truth.
// maxlocals then equals the size of parameters
}
// handle locals
for (int i = 0; i < length; i++) {
// Find stack location
} else { // integer
}
}
}
// If the method is native, there is no expression stack
length = 0;
}
// Get oopmap describing oops and int for current bci
if (TraceDeoptimization && Verbose) {
} else {
}
// handle expressions
for(int i=0; i < length; i++) {
// Find stack location
// oop value
sv = new StackValue(h);
} else {
// integer
}
}
return result;
}
// ------------- cChunk --------------
// 6379830 Cut point for an assertion that occasionally fires when
// we are using the performance analyzer.
// Disable this assert when testing the analyzer with fastdebug.
// -XX:SuppressErrorAt=vframe.cpp:XXX (XXX=following line number)
assert(false, "invalid bci or invalid scope desc");
}
// top-frame will be skipped
// skip top frame, as it may not be at safepoint
while (!fill_from_frame()) {
}
}
// Step back n frames, skip any pseudo frames in between.
// This function is used in Class.forName, Class.newInstance, Method.Invoke,
// AccessController.doPrivileged.
//
// NOTE that in JDK 1.4 this has been exposed to Java as
// sun.reflect.Reflection.getCallerClass(), which can be inlined.
// Inlined versions must match this routine's logic.
// Native method prefixing logic does not need to match since
// the method names don't match and inlining will not occur.
// See, for example,
// Parse::inline_native_Reflection_getCallerClass in
// opto/library_call.cpp.
while (!at_end()) {
// This is Method.invoke() -- skip it
} else if (use_new_reflection &&
// This is an auxilary frame -- skip it
} else if (method()->is_method_handle_intrinsic() ||
method()->is_compiled_lambda_form()) {
// This is an internal adapter frame for method handles -- skip it
} else {
// This is non-excluded frame, we need to count it against the depth
if (depth-- <= 0) {
// we have reached the desired depth, we are done
break;
}
}
if (method()->is_prefixed_native()) {
} else {
next();
}
}
}
int method_prefix_count = 0;
while (!at_end()) {
next();
break; // classes don't match, can't be a wrapper
}
break; // prefixed name isn't prefixed version of method name, can't be a wrapper
}
for (; prefix_index >= 0; --prefix_index) {
if (possible_prefix_len == prefix_len &&
break; // matching prefix found
}
}
if (prefix_index < 0) {
break; // didn't find the prefix, can't be a wrapper
}
}
}
while (!at_end() &&
(Klass::cast(method()->method_holder())->is_subclass_of(SystemDictionary::reflect_MethodAccessorImpl_klass()) ||
Klass::cast(method()->method_holder())->is_subclass_of(SystemDictionary::reflect_ConstructorAccessorImpl_klass())))) {
next();
}
}
#ifndef PRODUCT
}
}
((entryVFrame*)this)->print();
}
}
// ------------- javaVFrame --------------
}
method()->print_value();
if (monitor->owner_is_scalar_replaced()) {
} else {
}
}
}
klassOop k = m->method_holder();
tty->print_cr("frame( sp=" INTPTR_FORMAT ", unextended_sp=" INTPTR_FORMAT ", fp=" INTPTR_FORMAT ", pc=" INTPTR_FORMAT ")",
if (!m->is_native()) {
}
} else {
}
// Check frame size and print warning if it looks suspiciously large
#ifdef _LP64
#else
#endif
}
}
// Check static part
// Check locals
int i;
// it might happen the compiler reports a conflict and
// the interpreter reports a bogus int.
return false;
}
// Check expressions
return false;
}
return true;
}
// frame number and method
((vframe*)this)->print_value();
if (WizardMode) {
}
}
}
}
// ------------- externalVFrame --------------
}
}
#endif // PRODUCT