本文整理汇总了C++中CodeBlob::print方法的典型用法代码示例。如果您正苦于以下问题:C++ CodeBlob::print方法的具体用法?C++ CodeBlob::print怎么用?C++ CodeBlob::print使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CodeBlob
的用法示例。
在下文中一共展示了CodeBlob::print方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: c
extern "C" void nm(intptr_t p) {
// Actually we look through all CodeBlobs (the nm name has been kept for backwards compatability)
Command c("nm");
CodeBlob* cb = CodeCache::find_blob((address)p);
if (cb == NULL) {
tty->print_cr("NULL");
} else {
cb->print();
}
}
示例2: c
extern "C" void disnm(intptr_t p) {
Command c("disnm");
CodeBlob* cb = CodeCache::find_blob((address) p);
nmethod* nm = cb->as_nmethod_or_null();
if (nm) {
nm->print();
Disassembler::decode(nm);
} else {
cb->print();
Disassembler::decode(cb);
}
}
示例3: find
static void find(intptr_t x, bool print_pc) {
address addr = (address)x;
CodeBlob* b = CodeCache::find_blob_unsafe(addr);
if (b != NULL) {
if (b->is_buffer_blob()) {
// the interpreter is generated into a buffer blob
InterpreterCodelet* i = Interpreter::codelet_containing(addr);
if (i != NULL) {
i->print();
return;
}
if (Interpreter::contains(addr)) {
tty->print_cr(INTPTR_FORMAT " is pointing into interpreter code (not bytecode specific)", addr);
return;
}
//
if (AdapterHandlerLibrary::contains(b)) {
AdapterHandlerLibrary::print_handler(b);
}
// the stubroutines are generated into a buffer blob
StubCodeDesc* d = StubCodeDesc::desc_for(addr);
if (d != NULL) {
d->print();
if (print_pc) tty->cr();
return;
}
if (StubRoutines::contains(addr)) {
tty->print_cr(INTPTR_FORMAT " is pointing to an (unnamed) stub routine", addr);
return;
}
// the InlineCacheBuffer is using stubs generated into a buffer blob
if (InlineCacheBuffer::contains(addr)) {
tty->print_cr(INTPTR_FORMAT " is pointing into InlineCacheBuffer", addr);
return;
}
VtableStub* v = VtableStubs::stub_containing(addr);
if (v != NULL) {
v->print();
return;
}
}
if (print_pc && b->is_nmethod()) {
ResourceMark rm;
tty->print("%#p: Compiled ", addr);
((nmethod*)b)->method()->print_value_on(tty);
tty->print(" = (CodeBlob*)" INTPTR_FORMAT, b);
tty->cr();
return;
}
if ( b->is_nmethod()) {
if (b->is_zombie()) {
tty->print_cr(INTPTR_FORMAT " is zombie nmethod", b);
} else if (b->is_not_entrant()) {
tty->print_cr(INTPTR_FORMAT " is non-entrant nmethod", b);
}
}
b->print();
return;
}
if (Universe::heap()->is_in(addr)) {
HeapWord* p = Universe::heap()->block_start(addr);
bool print = false;
// If we couldn't find it it just may mean that heap wasn't parseable
// See if we were just given an oop directly
if (p != NULL && Universe::heap()->block_is_obj(p)) {
print = true;
} else if (p == NULL && ((oopDesc*)addr)->is_oop()) {
p = (HeapWord*) addr;
print = true;
}
if (print) {
oop(p)->print();
if (p != (HeapWord*)x && oop(p)->is_constMethod() &&
constMethodOop(p)->contains(addr)) {
Thread *thread = Thread::current();
HandleMark hm(thread);
methodHandle mh (thread, constMethodOop(p)->method());
if (!mh->is_native()) {
tty->print_cr("bci_from(%p) = %d; print_codes():",
addr, mh->bci_from(address(x)));
mh->print_codes();
}
}
return;
}
} else if (Universe::heap()->is_in_reserved(addr)) {
tty->print_cr(INTPTR_FORMAT " is an unallocated location in the heap", addr);
return;
}
if (JNIHandles::is_global_handle((jobject) addr)) {
tty->print_cr(INTPTR_FORMAT " is a global jni handle", addr);
return;
}
if (JNIHandles::is_weak_global_handle((jobject) addr)) {
tty->print_cr(INTPTR_FORMAT " is a weak global jni handle", addr);
return;
}
//.........这里部分代码省略.........