1.1 --- a/src/share/vm/runtime/os.cpp Fri Aug 31 16:39:35 2012 -0700 1.2 +++ b/src/share/vm/runtime/os.cpp Sat Sep 01 13:25:18 2012 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -271,7 +271,7 @@ 1.11 default: { 1.12 // Dispatch the signal to java 1.13 HandleMark hm(THREAD); 1.14 - klassOop k = SystemDictionary::resolve_or_null(vmSymbols::sun_misc_Signal(), THREAD); 1.15 + Klass* k = SystemDictionary::resolve_or_null(vmSymbols::sun_misc_Signal(), THREAD); 1.16 KlassHandle klass (THREAD, k); 1.17 if (klass.not_null()) { 1.18 JavaValue result(T_VOID); 1.19 @@ -294,7 +294,7 @@ 1.20 char klass_name[256]; 1.21 char tmp_sig_name[16]; 1.22 const char* sig_name = "UNKNOWN"; 1.23 - instanceKlass::cast(PENDING_EXCEPTION->klass())-> 1.24 + InstanceKlass::cast(PENDING_EXCEPTION->klass())-> 1.25 name()->as_klass_external_name(klass_name, 256); 1.26 if (os::exception_name(sig, tmp_sig_name, 16) != NULL) 1.27 sig_name = tmp_sig_name; 1.28 @@ -314,7 +314,7 @@ 1.29 if (!ReduceSignalUsage) { 1.30 // Setup JavaThread for processing signals 1.31 EXCEPTION_MARK; 1.32 - klassOop k = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_Thread(), true, CHECK); 1.33 + Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_Thread(), true, CHECK); 1.34 instanceKlassHandle klass (THREAD, k); 1.35 instanceHandle thread_oop = klass->allocate_instance_handle(CHECK); 1.36 1.37 @@ -893,17 +893,6 @@ 1.38 if (print) { 1.39 st->print_cr(INTPTR_FORMAT " is an oop", addr); 1.40 oop(p)->print_on(st); 1.41 - if (p != (HeapWord*)x && oop(p)->is_constMethod() && 1.42 - constMethodOop(p)->contains(addr)) { 1.43 - Thread *thread = Thread::current(); 1.44 - HandleMark hm(thread); 1.45 - methodHandle mh (thread, constMethodOop(p)->method()); 1.46 - if (!mh->is_native()) { 1.47 - st->print_cr("bci_from(%p) = %d; print_codes():", 1.48 - addr, mh->bci_from(address(x))); 1.49 - mh->print_codes_on(st); 1.50 - } 1.51 - } 1.52 return; 1.53 } 1.54 } else { 1.55 @@ -958,6 +947,17 @@ 1.56 } 1.57 1.58 } 1.59 + 1.60 +#ifndef PRODUCT 1.61 + // Check if in metaspace. 1.62 + if (ClassLoaderDataGraph::contains((address)addr)) { 1.63 + // Use addr->print() from the debugger instead (not here) 1.64 + st->print_cr(INTPTR_FORMAT 1.65 + " is pointing into metadata", addr); 1.66 + return; 1.67 + } 1.68 +#endif 1.69 + 1.70 // Try an OS specific find 1.71 if (os::find(addr, st)) { 1.72 return;