Tue, 12 Apr 2011 14:18:53 -0700
Merge
1.1 --- a/agent/src/share/classes/sun/jvm/hotspot/HelloWorld.java Sat Apr 09 21:16:12 2011 -0700 1.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/HelloWorld.java Tue Apr 12 14:18:53 2011 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2000, 2011, 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 @@ -55,7 +55,7 @@ 1.11 synchronized(lock) { 1.12 if (useMethodInvoke) { 1.13 try { 1.14 - Method method = HelloWorld.class.getMethod("e", null); 1.15 + Method method = HelloWorld.class.getMethod("e"); 1.16 Integer result = (Integer) method.invoke(null, new Object[0]); 1.17 return result.intValue(); 1.18 }
2.1 --- a/agent/src/share/classes/sun/jvm/hotspot/jdi/ByteValueImpl.java Sat Apr 09 21:16:12 2011 -0700 2.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/jdi/ByteValueImpl.java Tue Apr 12 14:18:53 2011 -0700 2.3 @@ -1,5 +1,5 @@ 2.4 /* 2.5 - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. 2.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 2.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.8 * 2.9 * This code is free software; you can redistribute it and/or modify it 2.10 @@ -52,12 +52,10 @@ 2.11 return intValue(); 2.12 } 2.13 2.14 - public int compareTo(Object obj) { 2.15 - byte other = ((ByteValue)obj).value(); 2.16 - return value() - other; 2.17 + public int compareTo(ByteValue byteVal) { 2.18 + return value() - byteVal.value(); 2.19 } 2.20 2.21 - 2.22 public Type type() { 2.23 return vm.theByteType(); 2.24 }
3.1 --- a/agent/src/share/classes/sun/jvm/hotspot/jdi/CharValueImpl.java Sat Apr 09 21:16:12 2011 -0700 3.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/jdi/CharValueImpl.java Tue Apr 12 14:18:53 2011 -0700 3.3 @@ -1,5 +1,5 @@ 3.4 /* 3.5 - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. 3.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 3.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3.8 * 3.9 * This code is free software; you can redistribute it and/or modify it 3.10 @@ -52,9 +52,8 @@ 3.11 return intValue(); 3.12 } 3.13 3.14 - public int compareTo(Object obj) { 3.15 - char other = ((CharValue)obj).value(); 3.16 - return value() - other; 3.17 + public int compareTo(CharValue charVal) { 3.18 + return value() - charVal.value(); 3.19 } 3.20 3.21 public Type type() {
4.1 --- a/agent/src/share/classes/sun/jvm/hotspot/jdi/ConnectorImpl.java Sat Apr 09 21:16:12 2011 -0700 4.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/jdi/ConnectorImpl.java Tue Apr 12 14:18:53 2011 -0700 4.3 @@ -1,5 +1,5 @@ 4.4 /* 4.5 - * Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved. 4.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 4.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4.8 * 4.9 * This code is free software; you can redistribute it and/or modify it 4.10 @@ -186,7 +186,7 @@ 4.11 // assert isVMVersionMismatch(throwable), "not a VMVersionMismatch" 4.12 Class expClass = throwable.getClass(); 4.13 Method targetVersionMethod = expClass.getMethod("getTargetVersion", new Class[0]); 4.14 - return (String) targetVersionMethod.invoke(throwable, null); 4.15 + return (String) targetVersionMethod.invoke(throwable); 4.16 } 4.17 4.18 /** If the causal chain has a sun.jvm.hotspot.runtime.VMVersionMismatchException,
5.1 --- a/agent/src/share/classes/sun/jvm/hotspot/jdi/DoubleValueImpl.java Sat Apr 09 21:16:12 2011 -0700 5.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/jdi/DoubleValueImpl.java Tue Apr 12 14:18:53 2011 -0700 5.3 @@ -1,5 +1,5 @@ 5.4 /* 5.5 - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. 5.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 5.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5.8 * 5.9 * This code is free software; you can redistribute it and/or modify it 5.10 @@ -45,8 +45,8 @@ 5.11 } 5.12 } 5.13 5.14 - public int compareTo(Object obj) { 5.15 - double other = ((DoubleValue)obj).value(); 5.16 + public int compareTo(DoubleValue doubleVal) { 5.17 + double other = doubleVal.value(); 5.18 if (value() < other) { 5.19 return -1; 5.20 } else if (value() == other) {
6.1 --- a/agent/src/share/classes/sun/jvm/hotspot/jdi/FieldImpl.java Sat Apr 09 21:16:12 2011 -0700 6.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/jdi/FieldImpl.java Tue Apr 12 14:18:53 2011 -0700 6.3 @@ -145,8 +145,7 @@ 6.4 } 6.5 6.6 // From interface Comparable 6.7 - public int compareTo(Object object) { 6.8 - Field field = (Field)object; 6.9 + public int compareTo(Field field) { 6.10 ReferenceTypeImpl declaringType = (ReferenceTypeImpl)declaringType(); 6.11 int rc = declaringType.compareTo(field.declaringType()); 6.12 if (rc == 0) {
7.1 --- a/agent/src/share/classes/sun/jvm/hotspot/jdi/FloatValueImpl.java Sat Apr 09 21:16:12 2011 -0700 7.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/jdi/FloatValueImpl.java Tue Apr 12 14:18:53 2011 -0700 7.3 @@ -1,5 +1,5 @@ 7.4 /* 7.5 - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. 7.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 7.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7.8 * 7.9 * This code is free software; you can redistribute it and/or modify it 7.10 @@ -52,8 +52,8 @@ 7.11 return intValue(); 7.12 } 7.13 7.14 - public int compareTo(Object obj) { 7.15 - float other = ((FloatValue)obj).value(); 7.16 + public int compareTo(FloatValue floatVal) { 7.17 + float other = floatVal.value(); 7.18 if (value() < other) { 7.19 return -1; 7.20 } else if (value() == other) {
8.1 --- a/agent/src/share/classes/sun/jvm/hotspot/jdi/IntegerValueImpl.java Sat Apr 09 21:16:12 2011 -0700 8.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/jdi/IntegerValueImpl.java Tue Apr 12 14:18:53 2011 -0700 8.3 @@ -1,5 +1,5 @@ 8.4 /* 8.5 - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. 8.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 8.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 8.8 * 8.9 * This code is free software; you can redistribute it and/or modify it 8.10 @@ -52,9 +52,8 @@ 8.11 return intValue(); 8.12 } 8.13 8.14 - public int compareTo(Object obj) { 8.15 - int other = ((IntegerValue)obj).value(); 8.16 - return value() - other; 8.17 + public int compareTo(IntegerValue integerVal) { 8.18 + return value() - integerVal.value(); 8.19 } 8.20 8.21 public Type type() {
9.1 --- a/agent/src/share/classes/sun/jvm/hotspot/jdi/LocalVariableImpl.java Sat Apr 09 21:16:12 2011 -0700 9.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/jdi/LocalVariableImpl.java Tue Apr 12 14:18:53 2011 -0700 9.3 @@ -1,5 +1,5 @@ 9.4 /* 9.5 - * Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved. 9.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 9.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 9.8 * 9.9 * This code is free software; you can redistribute it and/or modify it 9.10 @@ -67,8 +67,8 @@ 9.11 return (int)method.hashCode() + slot(); 9.12 } 9.13 9.14 - public int compareTo(Object object) { 9.15 - LocalVariableImpl other = (LocalVariableImpl)object; 9.16 + public int compareTo(LocalVariable localVar) { 9.17 + LocalVariableImpl other = (LocalVariableImpl) localVar; 9.18 int rc = method.compareTo(other.method); 9.19 if (rc == 0) { 9.20 rc = slot() - other.slot();
10.1 --- a/agent/src/share/classes/sun/jvm/hotspot/jdi/LocationImpl.java Sat Apr 09 21:16:12 2011 -0700 10.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/jdi/LocationImpl.java Tue Apr 12 14:18:53 2011 -0700 10.3 @@ -1,5 +1,5 @@ 10.4 /* 10.5 - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. 10.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 10.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 10.8 * 10.9 * This code is free software; you can redistribute it and/or modify it 10.10 @@ -78,8 +78,7 @@ 10.11 return method().hashCode() + (int)codeIndex(); 10.12 } 10.13 10.14 - public int compareTo(Object object) { 10.15 - LocationImpl other = (LocationImpl)object; 10.16 + public int compareTo(Location other) { 10.17 int rc = method().compareTo(other.method()); 10.18 if (rc == 0) { 10.19 long diff = codeIndex() - other.codeIndex();
11.1 --- a/agent/src/share/classes/sun/jvm/hotspot/jdi/LongValueImpl.java Sat Apr 09 21:16:12 2011 -0700 11.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/jdi/LongValueImpl.java Tue Apr 12 14:18:53 2011 -0700 11.3 @@ -1,5 +1,5 @@ 11.4 /* 11.5 - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. 11.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 11.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 11.8 * 11.9 * This code is free software; you can redistribute it and/or modify it 11.10 @@ -52,8 +52,8 @@ 11.11 return intValue(); 11.12 } 11.13 11.14 - public int compareTo(Object obj) { 11.15 - long other = ((LongValue)obj).value(); 11.16 + public int compareTo(LongValue longVal) { 11.17 + long other = longVal.value(); 11.18 if (value() < other) { 11.19 return -1; 11.20 } else if (value() == other) {
12.1 --- a/agent/src/share/classes/sun/jvm/hotspot/jdi/MethodImpl.java Sat Apr 09 21:16:12 2011 -0700 12.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/jdi/MethodImpl.java Tue Apr 12 14:18:53 2011 -0700 12.3 @@ -1,5 +1,5 @@ 12.4 /* 12.5 - * Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved. 12.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 12.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 12.8 * 12.9 * This code is free software; you can redistribute it and/or modify it 12.10 @@ -200,8 +200,7 @@ 12.11 } 12.12 12.13 // From interface Comparable 12.14 - public int compareTo(Object object) { 12.15 - Method method = (Method)object; 12.16 + public int compareTo(Method method) { 12.17 ReferenceTypeImpl declaringType = (ReferenceTypeImpl)declaringType(); 12.18 int rc = declaringType.compareTo(method.declaringType()); 12.19 if (rc == 0) {
13.1 --- a/agent/src/share/classes/sun/jvm/hotspot/jdi/ReferenceTypeImpl.java Sat Apr 09 21:16:12 2011 -0700 13.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/jdi/ReferenceTypeImpl.java Tue Apr 12 14:18:53 2011 -0700 13.3 @@ -1,5 +1,5 @@ 13.4 /* 13.5 - * Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved. 13.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 13.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 13.8 * 13.9 * This code is free software; you can redistribute it and/or modify it 13.10 @@ -99,7 +99,7 @@ 13.11 return saKlass.hashCode(); 13.12 } 13.13 13.14 - public int compareTo(Object object) { 13.15 + public int compareTo(ReferenceType refType) { 13.16 /* 13.17 * Note that it is critical that compareTo() == 0 13.18 * implies that equals() == true. Otherwise, TreeSet 13.19 @@ -108,7 +108,7 @@ 13.20 * (Classes of the same name loaded by different class loaders 13.21 * or in different VMs must not return 0). 13.22 */ 13.23 - ReferenceTypeImpl other = (ReferenceTypeImpl)object; 13.24 + ReferenceTypeImpl other = (ReferenceTypeImpl)refType; 13.25 int comp = name().compareTo(other.name()); 13.26 if (comp == 0) { 13.27 Oop rf1 = ref();
14.1 --- a/agent/src/share/classes/sun/jvm/hotspot/jdi/ShortValueImpl.java Sat Apr 09 21:16:12 2011 -0700 14.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/jdi/ShortValueImpl.java Tue Apr 12 14:18:53 2011 -0700 14.3 @@ -1,5 +1,5 @@ 14.4 /* 14.5 - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. 14.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 14.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 14.8 * 14.9 * This code is free software; you can redistribute it and/or modify it 14.10 @@ -52,9 +52,8 @@ 14.11 return intValue(); 14.12 } 14.13 14.14 - public int compareTo(Object obj) { 14.15 - short other = ((ShortValue)obj).value(); 14.16 - return value() - other; 14.17 + public int compareTo(ShortValue shortVal) { 14.18 + return value() - shortVal.value(); 14.19 } 14.20 14.21 public Type type() {
15.1 --- a/agent/src/share/classes/sun/jvm/hotspot/jdi/VirtualMachineImpl.java Sat Apr 09 21:16:12 2011 -0700 15.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/jdi/VirtualMachineImpl.java Tue Apr 12 14:18:53 2011 -0700 15.3 @@ -1,5 +1,5 @@ 15.4 /* 15.5 - * Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved. 15.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 15.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 15.8 * 15.9 * This code is free software; you can redistribute it and/or modify it 15.10 @@ -798,12 +798,11 @@ 15.11 } 15.12 15.13 public String description() { 15.14 - String[] versionParts = {"" + vmmgr.majorInterfaceVersion(), 15.15 - "" + vmmgr.minorInterfaceVersion(), 15.16 - name()}; 15.17 return java.text.MessageFormat.format(java.util.ResourceBundle. 15.18 getBundle("com.sun.tools.jdi.resources.jdi").getString("version_format"), 15.19 - versionParts); 15.20 + "" + vmmgr.majorInterfaceVersion(), 15.21 + "" + vmmgr.minorInterfaceVersion(), 15.22 + name()); 15.23 } 15.24 15.25 public String version() {
16.1 --- a/make/linux/makefiles/sa.make Sat Apr 09 21:16:12 2011 -0700 16.2 +++ b/make/linux/makefiles/sa.make Tue Apr 12 14:18:53 2011 -0700 16.3 @@ -1,5 +1,5 @@ 16.4 # 16.5 -# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 16.6 +# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. 16.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 16.8 # 16.9 # This code is free software; you can redistribute it and/or modify it 16.10 @@ -97,8 +97,8 @@ 16.11 $(foreach file,$(AGENT_FILES1),$(shell echo $(file) >> $(AGENT_FILES1_LIST))) 16.12 $(foreach file,$(AGENT_FILES2),$(shell echo $(file) >> $(AGENT_FILES2_LIST))) 16.13 16.14 - $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES1_LIST) 16.15 - $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES2_LIST) 16.16 + $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES1_LIST) 16.17 + $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES2_LIST) 16.18 16.19 $(QUIETLY) $(REMOTE) $(COMPILE.RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer 16.20 $(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
17.1 --- a/make/linux/makefiles/vm.make Sat Apr 09 21:16:12 2011 -0700 17.2 +++ b/make/linux/makefiles/vm.make Tue Apr 12 14:18:53 2011 -0700 17.3 @@ -142,13 +142,15 @@ 17.4 COMPILER2_PATHS += $(HS_COMMON_SRC)/share/vm/libadt 17.5 COMPILER2_PATHS += $(GENERATED)/adfiles 17.6 17.7 +SHARK_PATHS := $(GAMMADIR)/src/share/vm/shark 17.8 + 17.9 # Include dirs per type. 17.10 Src_Dirs/CORE := $(CORE_PATHS) 17.11 Src_Dirs/COMPILER1 := $(CORE_PATHS) $(COMPILER1_PATHS) 17.12 Src_Dirs/COMPILER2 := $(CORE_PATHS) $(COMPILER2_PATHS) 17.13 Src_Dirs/TIERED := $(CORE_PATHS) $(COMPILER1_PATHS) $(COMPILER2_PATHS) 17.14 Src_Dirs/ZERO := $(CORE_PATHS) 17.15 -Src_Dirs/SHARK := $(CORE_PATHS) 17.16 +Src_Dirs/SHARK := $(CORE_PATHS) $(SHARK_PATHS) 17.17 Src_Dirs := $(Src_Dirs/$(TYPE)) 17.18 17.19 COMPILER2_SPECIFIC_FILES := opto libadt bcEscapeAnalyzer.cpp chaitin\* c2_\* runtime_\*
18.1 --- a/make/solaris/makefiles/sa.make Sat Apr 09 21:16:12 2011 -0700 18.2 +++ b/make/solaris/makefiles/sa.make Tue Apr 12 14:18:53 2011 -0700 18.3 @@ -1,5 +1,5 @@ 18.4 # 18.5 -# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 18.6 +# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. 18.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 18.8 # 18.9 # This code is free software; you can redistribute it and/or modify it 18.10 @@ -88,8 +88,8 @@ 18.11 $(foreach file,$(AGENT_FILES1),$(shell echo $(file) >> $(AGENT_FILES1_LIST))) 18.12 $(foreach file,$(AGENT_FILES2),$(shell echo $(file) >> $(AGENT_FILES2_LIST))) 18.13 18.14 - $(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES1_LIST) 18.15 - $(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES2_LIST) 18.16 + $(QUIETLY) $(COMPILE.JAVAC) -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES1_LIST) 18.17 + $(QUIETLY) $(COMPILE.JAVAC) -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES2_LIST) 18.18 18.19 $(QUIETLY) $(COMPILE.RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer 18.20 $(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
19.1 --- a/make/windows/makefiles/sa.make Sat Apr 09 21:16:12 2011 -0700 19.2 +++ b/make/windows/makefiles/sa.make Tue Apr 12 14:18:53 2011 -0700 19.3 @@ -1,5 +1,5 @@ 19.4 # 19.5 -# Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved. 19.6 +# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. 19.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 19.8 # 19.9 # This code is free software; you can redistribute it and/or modify it 19.10 @@ -55,9 +55,9 @@ 19.11 $(GENERATED)\sa-jdi.jar: $(AGENT_FILES1:/=\) $(AGENT_FILES2:/=\) 19.12 @if not exist $(SA_CLASSDIR) mkdir $(SA_CLASSDIR) 19.13 @echo ...Building sa-jdi.jar 19.14 - @echo ...$(COMPILE_JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -d $(SA_CLASSDIR) .... 19.15 - @$(COMPILE_JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES1:/=\) 19.16 - @$(COMPILE_JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES2:/=\) 19.17 + @echo ...$(COMPILE_JAVAC) -classpath $(SA_CLASSPATH) -d $(SA_CLASSDIR) .... 19.18 + @$(COMPILE_JAVAC) -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES1:/=\) 19.19 + @$(COMPILE_JAVAC) -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES2:/=\) 19.20 $(COMPILE_RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer 19.21 $(QUIETLY) echo $(SA_BUILD_VERSION_PROP)> $(SA_PROPERTIES) 19.22 $(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js
20.1 --- a/src/os/linux/vm/os_linux.cpp Sat Apr 09 21:16:12 2011 -0700 20.2 +++ b/src/os/linux/vm/os_linux.cpp Tue Apr 12 14:18:53 2011 -0700 20.3 @@ -2648,45 +2648,39 @@ 20.4 // writing thread stacks don't use growable mappings (i.e. those 20.5 // creeated with MAP_GROWSDOWN), and aren't marked "[stack]", so this 20.6 // only applies to the main thread. 20.7 -static bool 20.8 -get_stack_bounds(uintptr_t *bottom, uintptr_t *top) 20.9 -{ 20.10 - FILE *f = fopen("/proc/self/maps", "r"); 20.11 - if (f == NULL) 20.12 + 20.13 +static 20.14 +bool get_stack_bounds(uintptr_t *bottom, uintptr_t *top) { 20.15 + 20.16 + char buf[128]; 20.17 + int fd, sz; 20.18 + 20.19 + if ((fd = ::open("/proc/self/maps", O_RDONLY)) < 0) { 20.20 return false; 20.21 - 20.22 - while (!feof(f)) { 20.23 - size_t dummy; 20.24 - char *str = NULL; 20.25 - ssize_t len = getline(&str, &dummy, f); 20.26 - if (len == -1) { 20.27 - fclose(f); 20.28 - return false; 20.29 - } 20.30 - 20.31 - if (len > 0 && str[len-1] == '\n') { 20.32 - str[len-1] = 0; 20.33 - len--; 20.34 - } 20.35 - 20.36 - static const char *stack_str = "[stack]"; 20.37 - if (len > (ssize_t)strlen(stack_str) 20.38 - && (strcmp(str + len - strlen(stack_str), stack_str) == 0)) { 20.39 - if (sscanf(str, "%" SCNxPTR "-%" SCNxPTR, bottom, top) == 2) { 20.40 - uintptr_t sp = (uintptr_t)__builtin_frame_address(0); 20.41 - if (sp >= *bottom && sp <= *top) { 20.42 - free(str); 20.43 - fclose(f); 20.44 - return true; 20.45 + } 20.46 + 20.47 + const char kw[] = "[stack]"; 20.48 + const int kwlen = sizeof(kw)-1; 20.49 + 20.50 + // Address part of /proc/self/maps couldn't be more than 128 bytes 20.51 + while ((sz = os::get_line_chars(fd, buf, sizeof(buf))) > 0) { 20.52 + if (sz > kwlen && ::memcmp(buf+sz-kwlen, kw, kwlen) == 0) { 20.53 + // Extract addresses 20.54 + if (sscanf(buf, "%" SCNxPTR "-%" SCNxPTR, bottom, top) == 2) { 20.55 + uintptr_t sp = (uintptr_t) __builtin_frame_address(0); 20.56 + if (sp >= *bottom && sp <= *top) { 20.57 + ::close(fd); 20.58 + return true; 20.59 + } 20.60 } 20.61 - } 20.62 - } 20.63 - free(str); 20.64 + } 20.65 } 20.66 - fclose(f); 20.67 + 20.68 + ::close(fd); 20.69 return false; 20.70 } 20.71 20.72 + 20.73 // If the (growable) stack mapping already extends beyond the point 20.74 // where we're going to put our guard pages, truncate the mapping at 20.75 // that point by munmap()ping it. This ensures that when we later
21.1 --- a/src/share/tools/ProjectCreator/WinGammaPlatformVC10.java Sat Apr 09 21:16:12 2011 -0700 21.2 +++ b/src/share/tools/ProjectCreator/WinGammaPlatformVC10.java Tue Apr 12 14:18:53 2011 -0700 21.3 @@ -497,6 +497,9 @@ 21.4 addAttr(rv, "TargetMachine", "MachineX64"); 21.5 } 21.6 21.7 + // We always want the /DEBUG option to get full symbol information in the pdb files 21.8 + addAttr(rv, "GenerateDebugInformation", "true"); 21.9 + 21.10 return rv; 21.11 } 21.12 21.13 @@ -504,8 +507,7 @@ 21.14 Vector getDebugLinkerFlags() { 21.15 Vector rv = new Vector(); 21.16 21.17 - // /DEBUG option 21.18 - addAttr(rv, "GenerateDebugInformation", "true"); 21.19 + // Empty now that /DEBUG option is used by all configs 21.20 21.21 return rv; 21.22 }
22.1 --- a/src/share/vm/classfile/javaClasses.cpp Sat Apr 09 21:16:12 2011 -0700 22.2 +++ b/src/share/vm/classfile/javaClasses.cpp Tue Apr 12 14:18:53 2011 -0700 22.3 @@ -1431,32 +1431,41 @@ 22.4 } 22.5 } 22.6 #ifdef ASSERT 22.7 - assert(st_method() == method && st.bci() == bci, 22.8 - "Wrong stack trace"); 22.9 - st.next(); 22.10 - // vframeStream::method isn't GC-safe so store off a copy 22.11 - // of the methodOop in case we GC. 22.12 - if (!st.at_end()) { 22.13 - st_method = st.method(); 22.14 - } 22.15 + assert(st_method() == method && st.bci() == bci, 22.16 + "Wrong stack trace"); 22.17 + st.next(); 22.18 + // vframeStream::method isn't GC-safe so store off a copy 22.19 + // of the methodOop in case we GC. 22.20 + if (!st.at_end()) { 22.21 + st_method = st.method(); 22.22 + } 22.23 #endif 22.24 + 22.25 + // the format of the stacktrace will be: 22.26 + // - 1 or more fillInStackTrace frames for the exception class (skipped) 22.27 + // - 0 or more <init> methods for the exception class (skipped) 22.28 + // - rest of the stack 22.29 + 22.30 if (!skip_fillInStackTrace_check) { 22.31 - // check "fillInStackTrace" only once, so we negate the flag 22.32 - // after the first time check. 22.33 - skip_fillInStackTrace_check = true; 22.34 - if (method->name() == vmSymbols::fillInStackTrace_name()) { 22.35 + if ((method->name() == vmSymbols::fillInStackTrace_name() || 22.36 + method->name() == vmSymbols::fillInStackTrace0_name()) && 22.37 + throwable->is_a(method->method_holder())) { 22.38 continue; 22.39 } 22.40 + else { 22.41 + skip_fillInStackTrace_check = true; // gone past them all 22.42 + } 22.43 } 22.44 - // skip <init> methods of the exceptions klass. If there is <init> methods 22.45 - // that belongs to a superclass of the exception we are going to skipping 22.46 - // them in stack trace. This is simlar to classic VM. 22.47 if (!skip_throwableInit_check) { 22.48 + assert(skip_fillInStackTrace_check, "logic error in backtrace filtering"); 22.49 + 22.50 + // skip <init> methods of the exception class and superclasses 22.51 + // This is simlar to classic VM. 22.52 if (method->name() == vmSymbols::object_initializer_name() && 22.53 throwable->is_a(method->method_holder())) { 22.54 continue; 22.55 } else { 22.56 - // if no "Throwable.init()" method found, we stop checking it next time. 22.57 + // there are none or we've seen them all - either way stop checking 22.58 skip_throwableInit_check = true; 22.59 } 22.60 }
23.1 --- a/src/share/vm/classfile/stackMapFrame.cpp Sat Apr 09 21:16:12 2011 -0700 23.2 +++ b/src/share/vm/classfile/stackMapFrame.cpp Tue Apr 12 14:18:53 2011 -0700 23.3 @@ -208,8 +208,10 @@ 23.4 return true; 23.5 } 23.6 23.7 -bool StackMapFrame::is_assignable_to(const StackMapFrame* target, TRAPS) const { 23.8 - if (_max_locals != target->max_locals() || _stack_size != target->stack_size()) { 23.9 +bool StackMapFrame::is_assignable_to( 23.10 + const StackMapFrame* target, bool is_exception_handler, TRAPS) const { 23.11 + if (_max_locals != target->max_locals() || 23.12 + _stack_size != target->stack_size()) { 23.13 return false; 23.14 } 23.15 // Only need to compare type elements up to target->locals() or target->stack(). 23.16 @@ -222,7 +224,7 @@ 23.17 bool match_flags = (_flags | target->flags()) == target->flags(); 23.18 23.19 return match_locals && match_stack && 23.20 - (match_flags || has_flag_match_exception(target)); 23.21 + (match_flags || (is_exception_handler && has_flag_match_exception(target))); 23.22 } 23.23 23.24 VerificationType StackMapFrame::pop_stack_ex(VerificationType type, TRAPS) {
24.1 --- a/src/share/vm/classfile/stackMapFrame.hpp Sat Apr 09 21:16:12 2011 -0700 24.2 +++ b/src/share/vm/classfile/stackMapFrame.hpp Tue Apr 12 14:18:53 2011 -0700 24.3 @@ -134,7 +134,8 @@ 24.4 void copy_stack(const StackMapFrame* src); 24.5 24.6 // Return true if this stack map frame is assignable to target. 24.7 - bool is_assignable_to(const StackMapFrame* target, TRAPS) const; 24.8 + bool is_assignable_to(const StackMapFrame* target, 24.9 + bool is_exception_handler, TRAPS) const; 24.10 24.11 // Push type into stack type array. 24.12 inline void push_stack(VerificationType type, TRAPS) {
25.1 --- a/src/share/vm/classfile/stackMapTable.cpp Sat Apr 09 21:16:12 2011 -0700 25.2 +++ b/src/share/vm/classfile/stackMapTable.cpp Tue Apr 12 14:18:53 2011 -0700 25.3 @@ -98,10 +98,13 @@ 25.4 bool result = true; 25.5 StackMapFrame *stackmap_frame = _frame_array[frame_index]; 25.6 if (match) { 25.7 + // when checking handler target, match == true && update == false 25.8 + bool is_exception_handler = !update; 25.9 // Has direct control flow from last instruction, need to match the two 25.10 // frames. 25.11 result = frame->is_assignable_to( 25.12 - stackmap_frame, CHECK_VERIFY_(frame->verifier(), false)); 25.13 + stackmap_frame, is_exception_handler, 25.14 + CHECK_VERIFY_(frame->verifier(), false)); 25.15 } 25.16 if (update) { 25.17 // Use the frame in stackmap table as current frame
26.1 --- a/src/share/vm/classfile/vmSymbols.hpp Sat Apr 09 21:16:12 2011 -0700 26.2 +++ b/src/share/vm/classfile/vmSymbols.hpp Tue Apr 12 14:18:53 2011 -0700 26.3 @@ -301,6 +301,7 @@ 26.4 template(dispatch_name, "dispatch") \ 26.5 template(getSystemClassLoader_name, "getSystemClassLoader") \ 26.6 template(fillInStackTrace_name, "fillInStackTrace") \ 26.7 + template(fillInStackTrace0_name, "fillInStackTrace0") \ 26.8 template(getCause_name, "getCause") \ 26.9 template(initCause_name, "initCause") \ 26.10 template(setProperty_name, "setProperty") \
27.1 --- a/src/share/vm/runtime/arguments.cpp Sat Apr 09 21:16:12 2011 -0700 27.2 +++ b/src/share/vm/runtime/arguments.cpp Tue Apr 12 14:18:53 2011 -0700 27.3 @@ -59,7 +59,8 @@ 27.4 #include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp" 27.5 #endif 27.6 27.7 -#define DEFAULT_VENDOR_URL_BUG "http://java.sun.com/webapps/bugreport/crash.jsp" 27.8 +// Note: This is a special bug reporting site for the JVM 27.9 +#define DEFAULT_VENDOR_URL_BUG "http://bugreport.sun.com/bugreport/crash.jsp" 27.10 #define DEFAULT_JAVA_LAUNCHER "generic" 27.11 27.12 char** Arguments::_jvm_flags_array = NULL;
28.1 --- a/src/share/vm/runtime/os.cpp Sat Apr 09 21:16:12 2011 -0700 28.2 +++ b/src/share/vm/runtime/os.cpp Tue Apr 12 14:18:53 2011 -0700 28.3 @@ -1291,3 +1291,41 @@ 28.4 } 28.5 return result; 28.6 } 28.7 + 28.8 +// Read file line by line, if line is longer than bsize, 28.9 +// skip rest of line. 28.10 +int os::get_line_chars(int fd, char* buf, const size_t bsize){ 28.11 + size_t sz, i = 0; 28.12 + 28.13 + // read until EOF, EOL or buf is full 28.14 + while ((sz = (int) read(fd, &buf[i], 1)) == 1 && i < (bsize-1) && buf[i] != '\n') { 28.15 + ++i; 28.16 + } 28.17 + 28.18 + if (buf[i] == '\n') { 28.19 + // EOL reached so ignore EOL character and return 28.20 + 28.21 + buf[i] = 0; 28.22 + return (int) i; 28.23 + } 28.24 + 28.25 + buf[i+1] = 0; 28.26 + 28.27 + if (sz != 1) { 28.28 + // EOF reached. if we read chars before EOF return them and 28.29 + // return EOF on next call otherwise return EOF 28.30 + 28.31 + return (i == 0) ? -1 : (int) i; 28.32 + } 28.33 + 28.34 + // line is longer than size of buf, skip to EOL 28.35 + int ch; 28.36 + while (read(fd, &ch, 1) == 1 && ch != '\n') { 28.37 + // Do nothing 28.38 + } 28.39 + 28.40 + // return initial part of line that fits in buf. 28.41 + // If we reached EOF, it will be returned on next call. 28.42 + 28.43 + return (int) i; 28.44 +}
29.1 --- a/src/share/vm/runtime/os.hpp Sat Apr 09 21:16:12 2011 -0700 29.2 +++ b/src/share/vm/runtime/os.hpp Tue Apr 12 14:18:53 2011 -0700 29.3 @@ -658,6 +658,10 @@ 29.4 // Hook for os specific jvm options that we don't want to abort on seeing 29.5 static bool obsolete_option(const JavaVMOption *option); 29.6 29.7 + // Read file line by line. If line is longer than bsize, 29.8 + // rest of line is skipped. Returns number of bytes read or -1 on EOF 29.9 + static int get_line_chars(int fd, char *buf, const size_t bsize); 29.10 + 29.11 // Platform dependent stuff 29.12 #ifdef TARGET_OS_FAMILY_linux 29.13 # include "os_linux.hpp"
30.1 --- a/test/compiler/6795161/Test.java Sat Apr 09 21:16:12 2011 -0700 30.2 +++ b/test/compiler/6795161/Test.java Tue Apr 12 14:18:53 2011 -0700 30.3 @@ -1,5 +1,5 @@ 30.4 /* 30.5 - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. 30.6 + * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. 30.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 30.8 * 30.9 * This code is free software; you can redistribute it and/or modify it 30.10 @@ -26,7 +26,7 @@ 30.11 * @test 30.12 * @bug 6795161 30.13 * @summary Escape analysis leads to data corruption 30.14 - * @run main/othervm -server -Xcomp -XX:CompileOnly=Test -XX:+DoEscapeAnalysis Test 30.15 + * @run main/othervm -server -XX:+IgnoreUnrecognizedVMOptions -Xcomp -XX:CompileOnly=Test -XX:+DoEscapeAnalysis Test 30.16 */ 30.17 30.18 class Test_Class_1 {