# HG changeset patch # User zgu # Date 1336688393 14400 # Node ID 2f4819f92dc73c643bb218e3d9651ba3e7f172b7 # Parent 78d2ae5ab35b9b0086969a28383be2204c01d64d# Parent 2766551175a024338344350b9c279797b4a7d8ac Merge diff -r 2766551175a0 -r 2f4819f92dc7 agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java --- a/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java Wed May 09 10:54:29 2012 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java Thu May 10 18:19:53 2012 -0400 @@ -572,10 +572,10 @@ if (cpu.equals("x86")) { machDesc = new MachineDescriptionIntelX86(); - } else if (cpu.equals("amd64")) { + } else if (cpu.equals("amd64") || cpu.equals("x86_64")) { machDesc = new MachineDescriptionAMD64(); } else { - throw new DebuggerException("BSD only supported on x86/amd64"); + throw new DebuggerException("BSD only supported on x86/x86_64. Current arch: " + cpu); } BsdDebuggerLocal dbg = new BsdDebuggerLocal(machDesc, !isServer); diff -r 2766551175a0 -r 2f4819f92dc7 agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java --- a/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java Wed May 09 10:54:29 2012 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java Thu May 10 18:19:53 2012 -0400 @@ -762,10 +762,10 @@ if (cpu.equals("x86")) { machDesc = new MachineDescriptionIntelX86(); - } else if (cpu.equals("amd64")) { + } else if (cpu.equals("amd64") || (cpu.equals("x86_64"))) { machDesc = new MachineDescriptionAMD64(); } else { - throw new DebuggerException("Bsd only supported on x86/amd64"); + throw new DebuggerException("Bsd only supported on x86/x86_64. Current arch: " + cpu); } // Note we do not use a cache for the local debugger in server diff -r 2766551175a0 -r 2f4819f92dc7 agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdCDebugger.java --- a/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdCDebugger.java Wed May 09 10:54:29 2012 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdCDebugger.java Thu May 10 18:19:53 2012 -0400 @@ -90,7 +90,7 @@ Address pc = context.getRegisterAsAddress(X86ThreadContext.EIP); if (pc == null) return null; return new BsdX86CFrame(dbg, ebp, pc); - } else if (cpu.equals("amd64")) { + } else if (cpu.equals("amd64") || cpu.equals("x86_64")) { AMD64ThreadContext context = (AMD64ThreadContext) thread.getContext(); Address rbp = context.getRegisterAsAddress(AMD64ThreadContext.RBP); if (rbp == null) return null; diff -r 2766551175a0 -r 2f4819f92dc7 agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThreadContextFactory.java --- a/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThreadContextFactory.java Wed May 09 10:54:29 2012 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThreadContextFactory.java Thu May 10 18:19:53 2012 -0400 @@ -33,7 +33,7 @@ String cpu = dbg.getCPU(); if (cpu.equals("x86")) { return new BsdX86ThreadContext(dbg); - } else if (cpu.equals("amd64")) { + } else if (cpu.equals("amd64") || cpu.equals("x86_64")) { return new BsdAMD64ThreadContext(dbg); } else { throw new RuntimeException("cpu " + cpu + " is not yet supported"); diff -r 2766551175a0 -r 2f4819f92dc7 agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java --- a/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java Wed May 09 10:54:29 2012 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java Thu May 10 18:19:53 2012 -0400 @@ -81,7 +81,7 @@ pcRegIndex = X86ThreadContext.EIP; fpRegIndex = X86ThreadContext.EBP; unalignedAccessesOkay = true; - } else if (cpu.equals("amd64")) { + } else if (cpu.equals("amd64") || cpu.equals("x86_64")) { threadFactory = new ProcAMD64ThreadFactory(this); pcRegIndex = AMD64ThreadContext.RIP; fpRegIndex = AMD64ThreadContext.RBP; diff -r 2766551175a0 -r 2f4819f92dc7 agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java --- a/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java Wed May 09 10:54:29 2012 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java Thu May 10 18:19:53 2012 -0400 @@ -64,7 +64,7 @@ cachePageSize = 4096; cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize); unalignedAccessesOkay = true; - } else if (cpu.equals("amd64")) { + } else if (cpu.equals("amd64") || cpu.equals("x86_64")) { threadFactory = new RemoteAMD64ThreadFactory(this); cachePageSize = 4096; cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize); diff -r 2766551175a0 -r 2f4819f92dc7 agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java --- a/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java Wed May 09 10:54:29 2012 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java Thu May 10 18:19:53 2012 -0400 @@ -95,7 +95,7 @@ } else if (os.equals("bsd")) { if (cpu.equals("x86")) { access = new BsdX86JavaThreadPDAccess(); - } else if (cpu.equals("amd64")) { + } else if (cpu.equals("amd64") || cpu.equals("x86_64")) { access = new BsdAMD64JavaThreadPDAccess(); } } diff -r 2766551175a0 -r 2f4819f92dc7 agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java --- a/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java Wed May 09 10:54:29 2012 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java Thu May 10 18:19:53 2012 -0400 @@ -199,7 +199,7 @@ cpuHelper = new SPARCHelper(); } else if (cpu.equals("x86")) { cpuHelper = new X86Helper(); - } else if (cpu.equals("amd64")) { + } else if (cpu.equals("amd64") || cpu.equals("x86_64")) { cpuHelper = new AMD64Helper(); } else if (cpu.equals("ia64")) { cpuHelper = new IA64Helper(); diff -r 2766551175a0 -r 2f4819f92dc7 agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaFrame.java --- a/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaFrame.java Wed May 09 10:54:29 2012 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaFrame.java Thu May 10 18:19:53 2012 -0400 @@ -153,7 +153,8 @@ List visibleVars = new ArrayList(0); for (int i = 0; i < localVars.length; i++) { LocalVariableTableElement cur = localVars[i]; - if (cur.getStartBCI() >= bci && cur.getLength() > 0) { + int startBCI = cur.getStartBCI(); + if (startBCI <= bci && bci < startBCI + cur.getLength()) { visibleVars.add(cur); } } diff -r 2766551175a0 -r 2f4819f92dc7 src/cpu/zero/vm/cppInterpreter_zero.cpp --- a/src/cpu/zero/vm/cppInterpreter_zero.cpp Wed May 09 10:54:29 2012 -0700 +++ b/src/cpu/zero/vm/cppInterpreter_zero.cpp Thu May 10 18:19:53 2012 -0400 @@ -1026,6 +1026,16 @@ java_lang_invoke_AdapterMethodHandle::vmargslot(method_handle); oop arg = VMSLOTS_OBJECT(arg_slot); jvalue arg_value; + if (arg == NULL) { + // queue a nullpointer exception for the caller + stack->set_sp(calculate_unwind_sp(stack, method_handle)); + CALL_VM_NOCHECK_NOFIX( + throw_exception( + thread, vmSymbols::java_lang_NullPointerException())); + // NB all oops trashed! + assert(HAS_PENDING_EXCEPTION, "should do"); + return; + } BasicType arg_type = java_lang_boxing_object::get_value(arg, &arg_value); if (arg_type == T_LONG || arg_type == T_DOUBLE) { intptr_t *unwind_sp = calculate_unwind_sp(stack, method_handle); @@ -1112,6 +1122,15 @@ case T_SHORT: return; } + // INT results sometimes need narrowing + case T_BOOLEAN: + case T_CHAR: + case T_BYTE: + case T_SHORT: + switch (src_rtype) { + case T_INT: + return; + } } tty->print_cr("unhandled conversion:");