--- a/jdk/src/java.base/share/classes/java/lang/Thread.java Thu Apr 28 09:38:19 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/Thread.java Thu Apr 28 14:44:55 2016 -0700
@@ -341,6 +341,45 @@
}
/**
+ * Indicates that the caller is momentarily unable to progress, until the
+ * occurrence of one or more actions on the part of other activities. By
+ * invoking this method within each iteration of a spin-wait loop construct,
+ * the calling thread indicates to the runtime that it is busy-waiting.
+ * The runtime may take action to improve the performance of invoking
+ * spin-wait loop constructions.
+ * <p>
+ * @apiNote
+ * As an example consider a method in a class that spins in a loop until
+ * some flag is set outside of that method. A call to the {@code onSpinWait}
+ * method should be placed inside the spin loop.
+ * <pre>{@code
+ * class EventHandler {
+ * volatile boolean eventNotificationNotReceived;
+ * void waitForEventAndHandleIt() {
+ * while ( eventNotificationNotReceived ) {
+ * java.lang.Thread.onSpinWait();
+ * }
+ * readAndProcessEvent();
+ * }
+ *
+ * void readAndProcessEvent() {
+ * // Read event from some source and process it
+ * . . .
+ * }
+ * }
+ * }</pre>
+ * <p>
+ * The code above would remain correct even if the {@code onSpinWait}
+ * method was not called at all. However on some architectures the Java
+ * Virtual Machine may issue the processor instructions to address such
+ * code patterns in a more beneficial way.
+ * <p>
+ * @since 9
+ */
+ @HotSpotIntrinsicCandidate
+ public static void onSpinWait() {}
+
+ /**
* Initializes a Thread with the current AccessControlContext.
* @see #init(ThreadGroup,Runnable,String,long,AccessControlContext,boolean)
*/
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties Thu Apr 28 09:38:19 2016 -0700
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties Thu Apr 28 14:44:55 2016 -0700
@@ -99,7 +99,6 @@
\ -Xdiag show additional diagnostic messages\n\
\ -Xdiag:resolver show resolver diagnostic messages\n\
\ -Xnoclassgc disable class garbage collection\n\
-\ -Xincgc enable incremental garbage collection\n\
\ -Xloggc:<file> log GC status to a file with time stamps\n\
\ -Xbatch disable background compilation\n\
\ -Xms<size> set initial Java heap size\n\
--- a/jdk/src/java.instrument/share/native/libinstrument/InvocationAdapter.c Thu Apr 28 09:38:19 2016 -0700
+++ b/jdk/src/java.instrument/share/native/libinstrument/InvocationAdapter.c Thu Apr 28 14:44:55 2016 -0700
@@ -518,18 +518,22 @@
splitPathList(const char* str, int* pathCount, char*** paths) {
int count = 0;
char** segments = NULL;
+ char** new_segments;
char* c = (char*) str;
while (*c != '\0') {
while (*c == ' ') c++; /* skip leading spaces */
if (*c == '\0') {
break;
}
- if (segments == NULL) {
- segments = (char**)malloc( sizeof(char**) );
- } else {
- segments = (char**)realloc( segments, (count+1)*sizeof(char**) );
+ new_segments = (char**)realloc(segments, (count+1)*sizeof(char*));
+ if (new_segments == NULL) {
+ jplis_assert(0);
+ free(segments);
+ count = 0;
+ segments = NULL;
+ break;
}
- jplis_assert(segments != (char**)NULL);
+ segments = new_segments;
segments[count++] = c;
c = strchr(c, ' ');
if (c == NULL) {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/Commands.java Thu Apr 28 09:38:19 2016 -0700
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/Commands.java Thu Apr 28 14:44:55 2016 -0700
@@ -1534,7 +1534,6 @@
PathSearchingVirtualMachine vm = (PathSearchingVirtualMachine)Env.vm();
MessageOutput.println("base directory:", vm.baseDirectory());
MessageOutput.println("classpath:", vm.classPath().toString());
- MessageOutput.println("bootclasspath:", vm.bootClassPath().toString());
} else {
MessageOutput.println("The VM does not use paths");
}
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources.java Thu Apr 28 09:38:19 2016 -0700
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources.java Thu Apr 28 14:44:55 2016 -0700
@@ -74,7 +74,6 @@
{"Array element is not a method", "Array element is not a method"},
{"Array index must be a integer type", "Array index must be a integer type"},
{"base directory:", "base directory: {0}"},
- {"bootclasspath:", "bootclasspath: {0}"},
{"Breakpoint hit:", "Breakpoint hit: "},
{"breakpoint", "breakpoint {0}"},
{"Breakpoints set:", "Breakpoints set:"},
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources_ja.java Thu Apr 28 09:38:19 2016 -0700
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources_ja.java Thu Apr 28 14:44:55 2016 -0700
@@ -74,7 +74,6 @@
{"Array element is not a method", "\u914D\u5217\u8981\u7D20\u306F\u30E1\u30BD\u30C3\u30C9\u3067\u306F\u3042\u308A\u307E\u305B\u3093"},
{"Array index must be a integer type", "\u914D\u5217\u306E\u6DFB\u3048\u5B57\u306F\u6574\u6570\u578B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"},
{"base directory:", "\u30D9\u30FC\u30B9\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA: {0}"},
- {"bootclasspath:", "\u30D6\u30FC\u30C8\u30FB\u30AF\u30E9\u30B9\u30D1\u30B9: {0}"},
{"Breakpoint hit:", "\u30D2\u30C3\u30C8\u3057\u305F\u30D6\u30EC\u30FC\u30AF\u30DD\u30A4\u30F3\u30C8: "},
{"breakpoint", "\u30D6\u30EC\u30FC\u30AF\u30DD\u30A4\u30F3\u30C8{0}"},
{"Breakpoints set:", "\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u30D6\u30EC\u30FC\u30AF\u30DD\u30A4\u30F3\u30C8:"},
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources_zh_CN.java Thu Apr 28 09:38:19 2016 -0700
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources_zh_CN.java Thu Apr 28 14:44:55 2016 -0700
@@ -74,7 +74,6 @@
{"Array element is not a method", "\u6570\u7EC4\u5143\u7D20\u4E0D\u662F\u65B9\u6CD5"},
{"Array index must be a integer type", "\u6570\u7EC4\u7D22\u5F15\u5FC5\u987B\u4E3A\u6574\u6570\u7C7B\u578B"},
{"base directory:", "\u57FA\u76EE\u5F55: {0}"},
- {"bootclasspath:", "\u5F15\u5BFC\u7C7B\u8DEF\u5F84: {0}"},
{"Breakpoint hit:", "\u65AD\u70B9\u547D\u4E2D: "},
{"breakpoint", "\u65AD\u70B9{0}"},
{"Breakpoints set:", "\u65AD\u70B9\u96C6:"},
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java Thu Apr 28 09:38:19 2016 -0700
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java Thu Apr 28 14:44:55 2016 -0700
@@ -1439,7 +1439,7 @@
}
public List<String> bootClassPath() {
- return Arrays.asList(getClasspath().bootclasspaths);
+ return Collections.emptyList();
}
public String baseDirectory() {
--- a/jdk/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c Thu Apr 28 09:38:19 2016 -0700
+++ b/jdk/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c Thu Apr 28 14:44:55 2016 -0700
@@ -126,7 +126,7 @@
int writtenCount = 0;
int i;
- for (i=0; i<classCount; i++) {
+ for (i = 0; i < classCount; i++) {
jclass clazz = theClasses[i];
jint status = classStatus(clazz);
char *candidate_signature = NULL;
@@ -141,7 +141,13 @@
error = classSignature(clazz, &candidate_signature, NULL);
if (error != JVMTI_ERROR_NONE) {
- break;
+ // Clazz become invalid since the time we get the class list
+ // Skip this entry
+ if (error == JVMTI_ERROR_INVALID_CLASS) {
+ continue;
+ }
+
+ break;
}
if (strcmp(candidate_signature, signature) == 0) {