debug.cpp revision 2062
0N/A * or visit www.oracle.com if you need additional information or have any
0N/A#include "precompiled.hpp"
0N/A#include "classfile/systemDictionary.hpp"
0N/A#include "code/codeCache.hpp"
0N/A#include "code/icBuffer.hpp"
0N/A#include "code/nmethod.hpp"
0N/A#include "code/vtableStubs.hpp"
0N/A#include "compiler/compileBroker.hpp"
0N/A#include "compiler/disassembler.hpp"
0N/A#include "gc_implementation/shared/markSweep.hpp"
0N/A#include "gc_interface/collectedHeap.hpp"
0N/A#include "interpreter/bytecodeHistogram.hpp"
0N/A#include "interpreter/interpreter.hpp"
0N/A#include "memory/resourceArea.hpp"
0N/A#include "memory/universe.hpp"
0N/A#include "oops/oop.inline.hpp"
0N/A#include "prims/privilegedStack.hpp"
0N/A#include "runtime/arguments.hpp"
0N/A#include "runtime/sharedRuntime.hpp"
0N/A#include "runtime/stubCodeGenerator.hpp"
0N/A#include "runtime/stubRoutines.hpp"
0N/A#include "runtime/vframe.hpp"
0N/A#include "services/heapDumper.hpp"
0N/A#include "utilities/defaultStream.hpp"
0N/A#include "utilities/events.hpp"
0N/A#include "utilities/vmError.hpp"
0N/A#ifdef TARGET_OS_FAMILY_linux
0N/A# include "os_linux.inline.hpp"
0N/A# include "thread_linux.inline.hpp"
0N/A#ifdef TARGET_OS_FAMILY_solaris
10N/A# include "os_solaris.inline.hpp"
10N/A# include "thread_solaris.inline.hpp"
0N/A# include "os_windows.inline.hpp"
0N/A# include "thread_windows.inline.hpp"
0N/A if (PrintWarnings) {
0N/A if (!is_error_reported()) {
0N/A const char* detail_msg)
0N/A if (first_time_here) {
0N/A if (HeapDumpOnOutOfMemoryError) {
0N/Astatic bool error_reported = false;
0N/Avoid set_error_reported() {
0N/A error_reported = true;
0N/Abool is_error_reported() {
0N/A return error_reported;
0N/A // Keep this in sync with test/runtime/6888954/vmerrors.sh.
0N/A default: ShouldNotReachHere();
0N/A bool debug_save;
533N/A // Actually we look through all CodeBlobs (the nm name has been kept for backwards compatability)
10N/A if (p->has_last_Java_frame()) {
10N/A p->trace_stack();
160N/A if (p->has_last_Java_frame()) {
160N/A p->trace_frames();
0N/A WizardMode = true;
0N/A PrintCompilation = false;
0N/A#ifndef VALIDATE_MARK_SWEEP
944N/A tty->print_cr("Requires build with VALIDATE_MARK_SWEEP defined (debug build) and RecordMarkSweepCompaction enabled");
const char* _target;
findref(x);
void help() {
tty->print_cr(" find(intptr_t x) - finds & prints nmethod/stub/bytecode/oop based on pointer into it");
enum CommandID {
struct CommandParser {
char *name;
char *description;
(char *)0, CMDID_ILLEGAL
void get_debug_command()
bool gotcommand;
methodOop m;
gotcommand = false;
if ( count >=0 ) {
gotcommand = true;
case CMDID_PS:
ps();
case CMDID_PSS:
pss();
case CMDID_PSF:
psf();
case CMDID_FINDM:
case CMDID_FINDNM:
case CMDID_PP:
case CMDID_EXIT:
exit(0);
case CMDID_HELP:
case CMDID_QUIT:
case CMDID_BPT:
case CMDID_VERIFY:
verify();;
case CMDID_THREADS:
threads();;
case CMDID_HSFIND:
case CMDID_ILLEGAL: