Fri, 22 Nov 2013 20:26:36 +0100
Merge
1.1 --- a/agent/src/share/classes/sun/jvm/hotspot/tools/JInfo.java Wed Nov 20 12:46:08 2013 +0100 1.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/tools/JInfo.java Fri Nov 22 20:26:36 2013 +0100 1.3 @@ -24,8 +24,9 @@ 1.4 1.5 package sun.jvm.hotspot.tools; 1.6 1.7 -import sun.jvm.hotspot.runtime.*; 1.8 import sun.jvm.hotspot.debugger.JVMDebugger; 1.9 +import sun.jvm.hotspot.runtime.Arguments; 1.10 +import sun.jvm.hotspot.runtime.VM; 1.11 1.12 public class JInfo extends Tool { 1.13 public JInfo() { 1.14 @@ -138,14 +139,33 @@ 1.15 } 1.16 1.17 private void printVMFlags() { 1.18 + VM.Flag[] flags = VM.getVM().getCommandLineFlags(); 1.19 + System.out.print("Non-default VM flags: "); 1.20 + for (VM.Flag flag : flags) { 1.21 + if (flag.getOrigin() == 0) { 1.22 + // only print flags which aren't their defaults 1.23 + continue; 1.24 + } 1.25 + if (flag.isBool()) { 1.26 + String onoff = flag.getBool() ? "+" : "-"; 1.27 + System.out.print("-XX:" + onoff + flag.getName() + " "); 1.28 + } else { 1.29 + System.out.print("-XX:" + flag.getName() + "=" 1.30 + + flag.getValue() + " "); 1.31 + } 1.32 + } 1.33 + System.out.println(); 1.34 + 1.35 + System.out.print("Command line: "); 1.36 String str = Arguments.getJVMFlags(); 1.37 if (str != null) { 1.38 - System.out.println(str); 1.39 + System.out.print(str + " "); 1.40 } 1.41 str = Arguments.getJVMArgs(); 1.42 if (str != null) { 1.43 - System.out.println(str); 1.44 + System.out.print(str); 1.45 } 1.46 + System.out.println(); 1.47 } 1.48 1.49 private int mode;
2.1 --- a/agent/src/share/classes/sun/jvm/hotspot/tools/Tool.java Wed Nov 20 12:46:08 2013 +0100 2.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/tools/Tool.java Fri Nov 22 20:26:36 2013 +0100 2.3 @@ -25,11 +25,11 @@ 2.4 package sun.jvm.hotspot.tools; 2.5 2.6 import java.io.PrintStream; 2.7 -import java.util.Hashtable; 2.8 2.9 -import sun.jvm.hotspot.*; 2.10 -import sun.jvm.hotspot.runtime.*; 2.11 -import sun.jvm.hotspot.debugger.*; 2.12 +import sun.jvm.hotspot.HotSpotAgent; 2.13 +import sun.jvm.hotspot.debugger.DebuggerException; 2.14 +import sun.jvm.hotspot.debugger.JVMDebugger; 2.15 +import sun.jvm.hotspot.runtime.VM; 2.16 2.17 // generic command line or GUI tool. 2.18 // override run & code main as shown below. 2.19 @@ -147,6 +147,7 @@ 2.20 } 2.21 2.22 PrintStream err = System.err; 2.23 + PrintStream out = System.out; 2.24 2.25 int pid = 0; 2.26 String coreFileName = null; 2.27 @@ -180,18 +181,18 @@ 2.28 try { 2.29 switch (debugeeType) { 2.30 case DEBUGEE_PID: 2.31 - err.println("Attaching to process ID " + pid + ", please wait..."); 2.32 + out.println("Attaching to process ID " + pid + ", please wait..."); 2.33 agent.attach(pid); 2.34 break; 2.35 2.36 case DEBUGEE_CORE: 2.37 - err.println("Attaching to core " + coreFileName + 2.38 + out.println("Attaching to core " + coreFileName + 2.39 " from executable " + executableName + ", please wait..."); 2.40 agent.attach(executableName, coreFileName); 2.41 break; 2.42 2.43 case DEBUGEE_REMOTE: 2.44 - err.println("Attaching to remote server " + remoteServer + ", please wait..."); 2.45 + out.println("Attaching to remote server " + remoteServer + ", please wait..."); 2.46 agent.attach(remoteServer); 2.47 break; 2.48 } 2.49 @@ -218,7 +219,7 @@ 2.50 return 1; 2.51 } 2.52 2.53 - err.println("Debugger attached successfully."); 2.54 + out.println("Debugger attached successfully."); 2.55 startInternal(); 2.56 return 0; 2.57 } 2.58 @@ -237,14 +238,14 @@ 2.59 // Remains of the start mechanism, common to both start methods. 2.60 private void startInternal() { 2.61 2.62 - PrintStream err = System.err; 2.63 + PrintStream out = System.out; 2.64 VM vm = VM.getVM(); 2.65 if (vm.isCore()) { 2.66 - err.println("Core build detected."); 2.67 + out.println("Core build detected."); 2.68 } else if (vm.isClientCompiler()) { 2.69 - err.println("Client compiler detected."); 2.70 + out.println("Client compiler detected."); 2.71 } else if (vm.isServerCompiler()) { 2.72 - err.println("Server compiler detected."); 2.73 + out.println("Server compiler detected."); 2.74 } else { 2.75 throw new RuntimeException("Fatal error: " 2.76 + "should have been able to detect core/C1/C2 build"); 2.77 @@ -252,8 +253,8 @@ 2.78 2.79 String version = vm.getVMRelease(); 2.80 if (version != null) { 2.81 - err.print("JVM version is "); 2.82 - err.println(version); 2.83 + out.print("JVM version is "); 2.84 + out.println(version); 2.85 } 2.86 2.87 run();
3.1 --- a/src/share/vm/classfile/metadataOnStackMark.cpp Wed Nov 20 12:46:08 2013 +0100 3.2 +++ b/src/share/vm/classfile/metadataOnStackMark.cpp Fri Nov 22 20:26:36 2013 +0100 3.3 @@ -30,6 +30,7 @@ 3.4 #include "prims/jvmtiImpl.hpp" 3.5 #include "runtime/synchronizer.hpp" 3.6 #include "runtime/thread.hpp" 3.7 +#include "services/threadService.hpp" 3.8 #include "utilities/growableArray.hpp" 3.9 3.10 3.11 @@ -50,6 +51,7 @@ 3.12 CodeCache::alive_nmethods_do(nmethod::mark_on_stack); 3.13 CompileBroker::mark_on_stack(); 3.14 JvmtiCurrentBreakpoints::metadata_do(Metadata::mark_on_stack); 3.15 + ThreadService::metadata_do(Metadata::mark_on_stack); 3.16 } 3.17 3.18 MetadataOnStackMark::~MetadataOnStackMark() {
4.1 --- a/src/share/vm/classfile/systemDictionary.hpp Wed Nov 20 12:46:08 2013 +0100 4.2 +++ b/src/share/vm/classfile/systemDictionary.hpp Fri Nov 22 20:26:36 2013 +0100 4.3 @@ -141,7 +141,6 @@ 4.4 /* NOTE: needed too early in bootstrapping process to have checks based on JDK version */ \ 4.5 /* Universe::is_gte_jdk14x_version() is not set up by this point. */ \ 4.6 /* It's okay if this turns out to be NULL in non-1.4 JDKs. */ \ 4.7 - do_klass(lambda_MagicLambdaImpl_klass, java_lang_invoke_MagicLambdaImpl, Opt ) \ 4.8 do_klass(reflect_MagicAccessorImpl_klass, sun_reflect_MagicAccessorImpl, Opt ) \ 4.9 do_klass(reflect_MethodAccessorImpl_klass, sun_reflect_MethodAccessorImpl, Opt_Only_JDK14NewRef) \ 4.10 do_klass(reflect_ConstructorAccessorImpl_klass, sun_reflect_ConstructorAccessorImpl, Opt_Only_JDK14NewRef) \
5.1 --- a/src/share/vm/classfile/verifier.cpp Wed Nov 20 12:46:08 2013 +0100 5.2 +++ b/src/share/vm/classfile/verifier.cpp Fri Nov 22 20:26:36 2013 +0100 5.3 @@ -188,10 +188,8 @@ 5.4 bool Verifier::is_eligible_for_verification(instanceKlassHandle klass, bool should_verify_class) { 5.5 Symbol* name = klass->name(); 5.6 Klass* refl_magic_klass = SystemDictionary::reflect_MagicAccessorImpl_klass(); 5.7 - Klass* lambda_magic_klass = SystemDictionary::lambda_MagicLambdaImpl_klass(); 5.8 5.9 bool is_reflect = refl_magic_klass != NULL && klass->is_subtype_of(refl_magic_klass); 5.10 - bool is_lambda = lambda_magic_klass != NULL && klass->is_subtype_of(lambda_magic_klass); 5.11 5.12 return (should_verify_for(klass->class_loader(), should_verify_class) && 5.13 // return if the class is a bootstrapping class 5.14 @@ -215,9 +213,7 @@ 5.15 // NOTE: this is called too early in the bootstrapping process to be 5.16 // guarded by Universe::is_gte_jdk14x_version()/UseNewReflection. 5.17 // Also for lambda generated code, gte jdk8 5.18 - (!is_reflect || VerifyReflectionBytecodes) && 5.19 - (!is_lambda || VerifyLambdaBytecodes) 5.20 - ); 5.21 + (!is_reflect || VerifyReflectionBytecodes)); 5.22 } 5.23 5.24 Symbol* Verifier::inference_verify(
6.1 --- a/src/share/vm/classfile/vmSymbols.hpp Wed Nov 20 12:46:08 2013 +0100 6.2 +++ b/src/share/vm/classfile/vmSymbols.hpp Fri Nov 22 20:26:36 2013 +0100 6.3 @@ -273,7 +273,6 @@ 6.4 template(java_lang_invoke_Stable_signature, "Ljava/lang/invoke/Stable;") \ 6.5 template(java_lang_invoke_LambdaForm_Compiled_signature, "Ljava/lang/invoke/LambdaForm$Compiled;") \ 6.6 template(java_lang_invoke_LambdaForm_Hidden_signature, "Ljava/lang/invoke/LambdaForm$Hidden;") \ 6.7 - template(java_lang_invoke_MagicLambdaImpl, "java/lang/invoke/MagicLambdaImpl") \ 6.8 /* internal up-calls made only by the JVM, via class sun.invoke.MethodHandleNatives: */ \ 6.9 template(findMethodHandleType_name, "findMethodHandleType") \ 6.10 template(findMethodHandleType_signature, "(Ljava/lang/Class;[Ljava/lang/Class;)Ljava/lang/invoke/MethodType;") \
7.1 --- a/src/share/vm/interpreter/rewriter.cpp Wed Nov 20 12:46:08 2013 +0100 7.2 +++ b/src/share/vm/interpreter/rewriter.cpp Fri Nov 22 20:26:36 2013 +0100 7.3 @@ -70,12 +70,14 @@ 7.4 } 7.5 7.6 // Unrewrite the bytecodes if an error occurs. 7.7 -void Rewriter::restore_bytecodes(TRAPS) { 7.8 +void Rewriter::restore_bytecodes() { 7.9 int len = _methods->length(); 7.10 + bool invokespecial_error = false; 7.11 7.12 for (int i = len-1; i >= 0; i--) { 7.13 Method* method = _methods->at(i); 7.14 - scan_method(method, true, CHECK); 7.15 + scan_method(method, true, &invokespecial_error); 7.16 + assert(!invokespecial_error, "reversing should not get an invokespecial error"); 7.17 } 7.18 } 7.19 7.20 @@ -160,22 +162,21 @@ 7.21 // These cannot share cpCache entries. It's unclear if all invokespecial to 7.22 // InterfaceMethodrefs would resolve to the same thing so a new cpCache entry 7.23 // is created for each one. This was added with lambda. 7.24 -void Rewriter::rewrite_invokespecial(address bcp, int offset, bool reverse, TRAPS) { 7.25 - static int count = 0; 7.26 +void Rewriter::rewrite_invokespecial(address bcp, int offset, bool reverse, bool* invokespecial_error) { 7.27 address p = bcp + offset; 7.28 if (!reverse) { 7.29 int cp_index = Bytes::get_Java_u2(p); 7.30 + if (_pool->tag_at(cp_index).is_interface_method()) { 7.31 int cache_index = add_invokespecial_cp_cache_entry(cp_index); 7.32 if (cache_index != (int)(jushort) cache_index) { 7.33 - THROW_MSG(vmSymbols::java_lang_InternalError(), 7.34 - "This classfile overflows invokespecial for interfaces " 7.35 - "and cannot be loaded"); 7.36 + *invokespecial_error = true; 7.37 } 7.38 Bytes::put_native_u2(p, cache_index); 7.39 } else { 7.40 - int cache_index = Bytes::get_native_u2(p); 7.41 - int cp_index = cp_cache_entry_pool_index(cache_index); 7.42 - Bytes::put_Java_u2(p, cp_index); 7.43 + rewrite_member_reference(bcp, offset, reverse); 7.44 + } 7.45 + } else { 7.46 + rewrite_member_reference(bcp, offset, reverse); 7.47 } 7.48 } 7.49 7.50 @@ -329,7 +330,7 @@ 7.51 7.52 7.53 // Rewrites a method given the index_map information 7.54 -void Rewriter::scan_method(Method* method, bool reverse, TRAPS) { 7.55 +void Rewriter::scan_method(Method* method, bool reverse, bool* invokespecial_error) { 7.56 7.57 int nof_jsrs = 0; 7.58 bool has_monitor_bytecodes = false; 7.59 @@ -391,15 +392,7 @@ 7.60 } 7.61 7.62 case Bytecodes::_invokespecial : { 7.63 - int offset = prefix_length + 1; 7.64 - address p = bcp + offset; 7.65 - int cp_index = Bytes::get_Java_u2(p); 7.66 - // InterfaceMethodref 7.67 - if (_pool->tag_at(cp_index).is_interface_method()) { 7.68 - rewrite_invokespecial(bcp, offset, reverse, CHECK); 7.69 - } else { 7.70 - rewrite_member_reference(bcp, offset, reverse); 7.71 - } 7.72 + rewrite_invokespecial(bcp, prefix_length+1, reverse, invokespecial_error); 7.73 break; 7.74 } 7.75 7.76 @@ -496,11 +489,20 @@ 7.77 7.78 // rewrite methods, in two passes 7.79 int len = _methods->length(); 7.80 + bool invokespecial_error = false; 7.81 7.82 for (int i = len-1; i >= 0; i--) { 7.83 Method* method = _methods->at(i); 7.84 - scan_method(method, false, CHECK); // If you get an error here, 7.85 - // there is no reversing bytecodes 7.86 + scan_method(method, false, &invokespecial_error); 7.87 + if (invokespecial_error) { 7.88 + // If you get an error here, there is no reversing bytecodes 7.89 + // This exception is stored for this class and no further attempt is 7.90 + // made at verifying or rewriting. 7.91 + THROW_MSG(vmSymbols::java_lang_InternalError(), 7.92 + "This classfile overflows invokespecial for interfaces " 7.93 + "and cannot be loaded"); 7.94 + return; 7.95 + } 7.96 } 7.97 7.98 // May have to fix invokedynamic bytecodes if invokestatic/InterfaceMethodref 7.99 @@ -513,7 +515,7 @@ 7.100 // Restore bytecodes to their unrewritten state if there are exceptions 7.101 // rewriting bytecodes or allocating the cpCache 7.102 if (HAS_PENDING_EXCEPTION) { 7.103 - restore_bytecodes(CATCH); 7.104 + restore_bytecodes(); 7.105 return; 7.106 } 7.107 7.108 @@ -530,7 +532,7 @@ 7.109 // relocating bytecodes. If some are relocated, that is ok because that 7.110 // doesn't affect constant pool to cpCache rewriting. 7.111 if (HAS_PENDING_EXCEPTION) { 7.112 - restore_bytecodes(CATCH); 7.113 + restore_bytecodes(); 7.114 return; 7.115 } 7.116 // Method might have gotten rewritten.
8.1 --- a/src/share/vm/interpreter/rewriter.hpp Wed Nov 20 12:46:08 2013 +0100 8.2 +++ b/src/share/vm/interpreter/rewriter.hpp Fri Nov 22 20:26:36 2013 +0100 8.3 @@ -189,18 +189,18 @@ 8.4 8.5 void compute_index_maps(); 8.6 void make_constant_pool_cache(TRAPS); 8.7 - void scan_method(Method* m, bool reverse, TRAPS); 8.8 + void scan_method(Method* m, bool reverse, bool* invokespecial_error); 8.9 void rewrite_Object_init(methodHandle m, TRAPS); 8.10 void rewrite_member_reference(address bcp, int offset, bool reverse); 8.11 void maybe_rewrite_invokehandle(address opc, int cp_index, int cache_index, bool reverse); 8.12 void rewrite_invokedynamic(address bcp, int offset, bool reverse); 8.13 void maybe_rewrite_ldc(address bcp, int offset, bool is_wide, bool reverse); 8.14 - void rewrite_invokespecial(address bcp, int offset, bool reverse, TRAPS); 8.15 + void rewrite_invokespecial(address bcp, int offset, bool reverse, bool* invokespecial_error); 8.16 8.17 void patch_invokedynamic_bytecodes(); 8.18 8.19 // Revert bytecodes in case of an exception. 8.20 - void restore_bytecodes(TRAPS); 8.21 + void restore_bytecodes(); 8.22 8.23 static methodHandle rewrite_jsrs(methodHandle m, TRAPS); 8.24 public:
9.1 --- a/src/share/vm/runtime/globals.cpp Wed Nov 20 12:46:08 2013 +0100 9.2 +++ b/src/share/vm/runtime/globals.cpp Fri Nov 22 20:26:36 2013 +0100 9.3 @@ -321,6 +321,8 @@ 9.4 { KIND_PRODUCT, "product" }, 9.5 { KIND_MANAGEABLE, "manageable" }, 9.6 { KIND_DIAGNOSTIC, "diagnostic" }, 9.7 + { KIND_EXPERIMENTAL, "experimental" }, 9.8 + { KIND_COMMERCIAL, "commercial" }, 9.9 { KIND_NOT_PRODUCT, "notproduct" }, 9.10 { KIND_DEVELOP, "develop" }, 9.11 { KIND_LP64_PRODUCT, "lp64_product" },
10.1 --- a/src/share/vm/runtime/globals.hpp Wed Nov 20 12:46:08 2013 +0100 10.2 +++ b/src/share/vm/runtime/globals.hpp Fri Nov 22 20:26:36 2013 +0100 10.3 @@ -3622,9 +3622,6 @@ 10.4 "Temporary flag for transition to AbstractMethodError wrapped " \ 10.5 "in InvocationTargetException. See 6531596") \ 10.6 \ 10.7 - develop(bool, VerifyLambdaBytecodes, false, \ 10.8 - "Force verification of jdk 8 lambda metafactory bytecodes") \ 10.9 - \ 10.10 develop(intx, FastSuperclassLimit, 8, \ 10.11 "Depth of hardwired instanceof accelerator array") \ 10.12 \
11.1 --- a/src/share/vm/runtime/reflection.cpp Wed Nov 20 12:46:08 2013 +0100 11.2 +++ b/src/share/vm/runtime/reflection.cpp Fri Nov 22 20:26:36 2013 +0100 11.3 @@ -470,12 +470,6 @@ 11.4 return true; 11.5 } 11.6 11.7 - // Also allow all accesses from 11.8 - // java/lang/invoke/MagicLambdaImpl subclasses to succeed trivially. 11.9 - if (current_class->is_subclass_of(SystemDictionary::lambda_MagicLambdaImpl_klass())) { 11.10 - return true; 11.11 - } 11.12 - 11.13 return can_relax_access_check_for(current_class, new_class, classloader_only); 11.14 } 11.15 11.16 @@ -570,12 +564,6 @@ 11.17 return true; 11.18 } 11.19 11.20 - // Also allow all accesses from 11.21 - // java/lang/invoke/MagicLambdaImpl subclasses to succeed trivially. 11.22 - if (current_class->is_subclass_of(SystemDictionary::lambda_MagicLambdaImpl_klass())) { 11.23 - return true; 11.24 - } 11.25 - 11.26 return can_relax_access_check_for( 11.27 current_class, field_class, classloader_only); 11.28 }
12.1 --- a/src/share/vm/services/threadService.cpp Wed Nov 20 12:46:08 2013 +0100 12.2 +++ b/src/share/vm/services/threadService.cpp Fri Nov 22 20:26:36 2013 +0100 12.3 @@ -200,6 +200,12 @@ 12.4 } 12.5 } 12.6 12.7 +void ThreadService::metadata_do(void f(Metadata*)) { 12.8 + for (ThreadDumpResult* dump = _threaddump_list; dump != NULL; dump = dump->next()) { 12.9 + dump->metadata_do(f); 12.10 + } 12.11 +} 12.12 + 12.13 void ThreadService::add_thread_dump(ThreadDumpResult* dump) { 12.14 MutexLocker ml(Management_lock); 12.15 if (_threaddump_list == NULL) { 12.16 @@ -451,9 +457,16 @@ 12.17 } 12.18 } 12.19 12.20 +void ThreadDumpResult::metadata_do(void f(Metadata*)) { 12.21 + for (ThreadSnapshot* ts = _snapshots; ts != NULL; ts = ts->next()) { 12.22 + ts->metadata_do(f); 12.23 + } 12.24 +} 12.25 + 12.26 StackFrameInfo::StackFrameInfo(javaVFrame* jvf, bool with_lock_info) { 12.27 _method = jvf->method(); 12.28 _bci = jvf->bci(); 12.29 + _class_holder = _method->method_holder()->klass_holder(); 12.30 _locked_monitors = NULL; 12.31 if (with_lock_info) { 12.32 ResourceMark rm; 12.33 @@ -477,6 +490,11 @@ 12.34 f->do_oop((oop*) _locked_monitors->adr_at(i)); 12.35 } 12.36 } 12.37 + f->do_oop(&_class_holder); 12.38 +} 12.39 + 12.40 +void StackFrameInfo::metadata_do(void f(Metadata*)) { 12.41 + f(_method); 12.42 } 12.43 12.44 void StackFrameInfo::print_on(outputStream* st) const { 12.45 @@ -620,6 +638,14 @@ 12.46 } 12.47 } 12.48 12.49 +void ThreadStackTrace::metadata_do(void f(Metadata*)) { 12.50 + int length = _frames->length(); 12.51 + for (int i = 0; i < length; i++) { 12.52 + _frames->at(i)->metadata_do(f); 12.53 + } 12.54 +} 12.55 + 12.56 + 12.57 ConcurrentLocksDump::~ConcurrentLocksDump() { 12.58 if (_retain_map_on_free) { 12.59 return; 12.60 @@ -823,6 +849,13 @@ 12.61 } 12.62 } 12.63 12.64 +void ThreadSnapshot::metadata_do(void f(Metadata*)) { 12.65 + if (_stack_trace != NULL) { 12.66 + _stack_trace->metadata_do(f); 12.67 + } 12.68 +} 12.69 + 12.70 + 12.71 DeadlockCycle::DeadlockCycle() { 12.72 _is_deadlock = false; 12.73 _threads = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<JavaThread*>(INITIAL_ARRAY_SIZE, true);
13.1 --- a/src/share/vm/services/threadService.hpp Wed Nov 20 12:46:08 2013 +0100 13.2 +++ b/src/share/vm/services/threadService.hpp Fri Nov 22 20:26:36 2013 +0100 13.3 @@ -113,6 +113,7 @@ 13.4 13.5 // GC support 13.6 static void oops_do(OopClosure* f); 13.7 + static void metadata_do(void f(Metadata*)); 13.8 }; 13.9 13.10 // Per-thread Statistics for synchronization 13.11 @@ -242,6 +243,7 @@ 13.12 void dump_stack_at_safepoint(int max_depth, bool with_locked_monitors); 13.13 void set_concurrent_locks(ThreadConcurrentLocks* l) { _concurrent_locks = l; } 13.14 void oops_do(OopClosure* f); 13.15 + void metadata_do(void f(Metadata*)); 13.16 }; 13.17 13.18 class ThreadStackTrace : public CHeapObj<mtInternal> { 13.19 @@ -265,6 +267,7 @@ 13.20 void dump_stack_at_safepoint(int max_depth); 13.21 Handle allocate_fill_stack_trace_element_array(TRAPS); 13.22 void oops_do(OopClosure* f); 13.23 + void metadata_do(void f(Metadata*)); 13.24 GrowableArray<oop>* jni_locked_monitors() { return _jni_locked_monitors; } 13.25 int num_jni_locked_monitors() { return (_jni_locked_monitors != NULL ? _jni_locked_monitors->length() : 0); } 13.26 13.27 @@ -280,6 +283,9 @@ 13.28 Method* _method; 13.29 int _bci; 13.30 GrowableArray<oop>* _locked_monitors; // list of object monitors locked by this frame 13.31 + // We need to save the mirrors in the backtrace to keep the class 13.32 + // from being unloaded while we still have this stack trace. 13.33 + oop _class_holder; 13.34 13.35 public: 13.36 13.37 @@ -289,9 +295,10 @@ 13.38 delete _locked_monitors; 13.39 } 13.40 }; 13.41 - Method* method() const { return _method; } 13.42 + Method* method() const { return _method; } 13.43 int bci() const { return _bci; } 13.44 void oops_do(OopClosure* f); 13.45 + void metadata_do(void f(Metadata*)); 13.46 13.47 int num_locked_monitors() { return (_locked_monitors != NULL ? _locked_monitors->length() : 0); } 13.48 GrowableArray<oop>* locked_monitors() { return _locked_monitors; } 13.49 @@ -354,6 +361,7 @@ 13.50 int num_snapshots() { return _num_snapshots; } 13.51 ThreadSnapshot* snapshots() { return _snapshots; } 13.52 void oops_do(OopClosure* f); 13.53 + void metadata_do(void f(Metadata*)); 13.54 }; 13.55 13.56 class DeadlockCycle : public CHeapObj<mtInternal> {
14.1 --- a/test/compiler/jsr292/ConcurrentClassLoadingTest.java Wed Nov 20 12:46:08 2013 +0100 14.2 +++ b/test/compiler/jsr292/ConcurrentClassLoadingTest.java Fri Nov 22 20:26:36 2013 +0100 14.3 @@ -172,7 +172,6 @@ 14.4 "java.lang.invoke.LambdaConversionException", 14.5 "java.lang.invoke.LambdaForm", 14.6 "java.lang.invoke.LambdaMetafactory", 14.7 - "java.lang.invoke.MagicLambdaImpl", 14.8 "java.lang.invoke.MemberName", 14.9 "java.lang.invoke.MethodHandle", 14.10 "java.lang.invoke.MethodHandleImpl",