--- a/hotspot/make/lib/CompileGtest.gmk Mon May 30 16:25:38 2016 +0200
+++ b/hotspot/make/lib/CompileGtest.gmk Tue May 31 09:41:15 2016 -0700
@@ -36,9 +36,6 @@
################################################################################
-GTEST_TEST_SRC_FILES := $(shell $(FIND) $(HOTSPOT_TOPDIR)/test/native -name \
- "test*.cpp" -type f)
-
ifeq ($(OPENJDK_TARGET_OS), windows)
GTEST_JVM_MAPFILE := $(JVM_MAPFILE)
else
@@ -58,10 +55,12 @@
TOOLCHAIN := $(JVM_TOOLCHAIN), \
LIBRARY := jvm, \
OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
- EXTRA_FILES := $(GTEST_TEST_SRC_FILES) \
- $(GTEST_FRAMEWORK_SRC)/src/gtest-all.cc \
- $(GTEST_TEST_SRC)/gtestMain.cpp, \
OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/objs, \
+ SRC := $(GTEST_TEST_SRC), \
+ EXCLUDES := $(JVM_EXCLUDES), \
+ EXCLUDE_FILES := gtestLauncher.cpp, \
+ EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \
+ EXTRA_FILES := $(GTEST_FRAMEWORK_SRC)/src/gtest-all.cc, \
EXTRA_OBJECT_FILES := $(filter-out %/operator_new$(OBJ_SUFFIX), \
$(BUILD_LIBJVM_ALL_OBJS)), \
CFLAGS := $(JVM_CFLAGS) -I$(GTEST_FRAMEWORK_SRC) \
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp Mon May 30 16:25:38 2016 +0200
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp Tue May 31 09:41:15 2016 -0700
@@ -756,15 +756,9 @@
}
}
- // If the creator called set priority before we started,
- // we need to call set_native_priority now that we have an lwp.
- // We used to get the priority from thr_getprio (we called
- // thr_setprio way back in create_thread) and pass it to
- // set_native_priority, but Solaris scales the priority
- // in java_to_os_priority, so when we read it back here,
- // we pass trash to set_native_priority instead of what's
- // in java_to_os_priority. So we save the native priority
- // in the osThread and recall it here.
+ // Our priority was set when we were created, and stored in the
+ // osthread, but couldn't be passed through to our LWP until now.
+ // So read back the priority and set it again.
if (osthr->thread_id() != -1) {
if (UseThreadPriorities) {
@@ -1044,6 +1038,10 @@
// Remember that we created this thread so we can set priority on it
osthread->set_vm_created();
+ // Most thread types will set an explicit priority before starting the thread,
+ // but for those that don't we need a valid value to read back in thread_native_entry.
+ osthread->set_native_priority(NormPriority);
+
// Initial thread state is INITIALIZED, not SUSPENDED
osthread->set_state(INITIALIZED);
--- a/hotspot/src/os/windows/vm/os_windows.cpp Mon May 30 16:25:38 2016 +0200
+++ b/hotspot/src/os/windows/vm/os_windows.cpp Tue May 31 09:41:15 2016 -0700
@@ -5277,7 +5277,8 @@
}
}
DWORD err = GetLastError();
- if (err != ERROR_NO_MORE_ITEMS && err != ERROR_CALL_NOT_IMPLEMENTED) {
+ if (err != ERROR_NO_MORE_ITEMS && err != ERROR_CALL_NOT_IMPLEMENTED &&
+ (err == ERROR_INVALID_FUNCTION && phe.lpData != NULL)) {
HeapUnlock(heap);
fatal("heap walk aborted with error %d", err);
}
--- a/hotspot/src/share/vm/classfile/classLoaderData.cpp Mon May 30 16:25:38 2016 +0200
+++ b/hotspot/src/share/vm/classfile/classLoaderData.cpp Tue May 31 09:41:15 2016 -0700
@@ -382,6 +382,10 @@
}
log->cr();
}
+
+ // In some rare cases items added to this list will not be freed elsewhere.
+ // To keep it simple, just free everything in it here.
+ free_deallocate_list();
}
PackageEntryTable* ClassLoaderData::packages() {
--- a/hotspot/src/share/vm/classfile/compactHashtable.cpp Mon May 30 16:25:38 2016 +0200
+++ b/hotspot/src/share/vm/classfile/compactHashtable.cpp Tue May 31 09:41:15 2016 -0700
@@ -38,6 +38,7 @@
CompactHashtableWriter::CompactHashtableWriter(int num_buckets,
CompactHashtableStats* stats) {
assert(DumpSharedSpaces, "dump-time only");
+ assert(num_buckets > 0, "no buckets");
_num_buckets = num_buckets;
_num_entries = 0;
_buckets = NEW_C_HEAP_ARRAY(GrowableArray<Entry>*, _num_buckets, mtSymbol);
--- a/hotspot/src/share/vm/classfile/stringTable.cpp Mon May 30 16:25:38 2016 +0200
+++ b/hotspot/src/share/vm/classfile/stringTable.cpp Tue May 31 09:41:15 2016 -0700
@@ -740,7 +740,8 @@
} else {
int num_buckets = the_table()->number_of_entries() /
SharedSymbolTableBucketSize;
- CompactStringTableWriter writer(num_buckets,
+ // calculation of num_buckets can result in zero buckets, we need at least one
+ CompactStringTableWriter writer(num_buckets > 1 ? num_buckets : 1,
&MetaspaceShared::stats()->string);
// Copy the interned strings into the "string space" within the java heap
--- a/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp Mon May 30 16:25:38 2016 +0200
+++ b/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp Tue May 31 09:41:15 2016 -0700
@@ -545,6 +545,8 @@
}
assert((_conc_workers != NULL) == (ConcGCThreads > 1),
"Inconsistency");
+ log_debug(gc)("ConcGCThreads: %u", ConcGCThreads);
+ log_debug(gc)("ParallelGCThreads: %u", ParallelGCThreads);
// Parallel task queues; these are shared for the
// concurrent and stop-world phases of CMS, but
--- a/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp Mon May 30 16:25:38 2016 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp Tue May 31 09:41:15 2016 -0700
@@ -438,6 +438,8 @@
}
assert(ConcGCThreads > 0, "Should have been set");
+ log_debug(gc)("ConcGCThreads: %u", ConcGCThreads);
+ log_debug(gc)("ParallelGCThreads: %u", ParallelGCThreads);
_parallel_marking_threads = ConcGCThreads;
_max_parallel_marking_threads = _parallel_marking_threads;
--- a/hotspot/src/share/vm/logging/log.cpp Mon May 30 16:25:38 2016 +0200
+++ b/hotspot/src/share/vm/logging/log.cpp Tue May 31 09:41:15 2016 -0700
@@ -578,11 +578,6 @@
LogConfiguration::disable_logging();
assert(Test_logconfiguration_subscribe_triggered == 3, "subscription not triggered (3)");
-
- // We need to renable stderr error logging since "disable_logging" disable it all.
- // TestLogSavedConfig log_cfg will only renable stdout for us.
- LogConfiguration::parse_log_arguments("stderr", "all=warning", NULL, NULL, log.error_stream());
- assert(Test_logconfiguration_subscribe_triggered == 4, "subscription not triggered (3)");
}
#define LOG_PREFIX_STR "THE_PREFIX "
--- a/hotspot/src/share/vm/logging/logFileStreamOutput.hpp Mon May 30 16:25:38 2016 +0200
+++ b/hotspot/src/share/vm/logging/logFileStreamOutput.hpp Tue May 31 09:41:15 2016 -0700
@@ -54,7 +54,7 @@
private:
static LogStdoutOutput _instance;
LogStdoutOutput() : LogFileStreamOutput(stdout) {
- set_config_string("all=off");
+ set_config_string("all=warning");
}
virtual bool initialize(const char* options, outputStream* errstream) {
return false;
@@ -70,7 +70,7 @@
private:
static LogStderrOutput _instance;
LogStderrOutput() : LogFileStreamOutput(stderr) {
- set_config_string("all=warning");
+ set_config_string("all=off");
}
virtual bool initialize(const char* options, outputStream* errstream) {
return false;
--- a/hotspot/src/share/vm/logging/logTagSet.cpp Mon May 30 16:25:38 2016 +0200
+++ b/hotspot/src/share/vm/logging/logTagSet.cpp Tue May 31 09:41:15 2016 -0700
@@ -50,7 +50,7 @@
_ntagsets++;
// Set the default output to warning and error level for all new tagsets.
- _output_list.set_output_level(LogOutput::Stderr, LogLevel::Default);
+ _output_list.set_output_level(LogOutput::Stdout, LogLevel::Default);
}
void LogTagSet::update_decorators(const LogDecorators& decorator) {
--- a/hotspot/src/share/vm/memory/metaspaceShared.hpp Mon May 30 16:25:38 2016 +0200
+++ b/hotspot/src/share/vm/memory/metaspaceShared.hpp Tue May 31 09:41:15 2016 -0700
@@ -43,11 +43,11 @@
// for the x64 platform
#define DEFAULT_VTBL_COMMON_CODE_SIZE (1*K) // conservative size of the "common_code" for the x64 platform
-#define DEFAULT_SHARED_READ_WRITE_SIZE (NOT_LP64(9*M) LP64_ONLY(10*M))
-#define MIN_SHARED_READ_WRITE_SIZE (NOT_LP64(7*M) LP64_ONLY(10*M))
+#define DEFAULT_SHARED_READ_WRITE_SIZE (NOT_LP64(6*M) LP64_ONLY(10*M))
+#define MIN_SHARED_READ_WRITE_SIZE (NOT_LP64(6*M) LP64_ONLY(10*M))
-#define DEFAULT_SHARED_READ_ONLY_SIZE (NOT_LP64(9*M) LP64_ONLY(10*M))
-#define MIN_SHARED_READ_ONLY_SIZE (NOT_LP64(9*M) LP64_ONLY(10*M))
+#define DEFAULT_SHARED_READ_ONLY_SIZE (NOT_LP64(6*M) LP64_ONLY(10*M))
+#define MIN_SHARED_READ_ONLY_SIZE (NOT_LP64(6*M) LP64_ONLY(10*M))
// the MIN_SHARED_MISC_DATA_SIZE and MIN_SHARED_MISC_CODE_SIZE estimates are based on
// the sizes required for dumping the archive using the default classlist. The sizes
--- a/hotspot/src/share/vm/runtime/arguments.cpp Mon May 30 16:25:38 2016 +0200
+++ b/hotspot/src/share/vm/runtime/arguments.cpp Tue May 31 09:41:15 2016 -0700
@@ -1641,7 +1641,6 @@
}
log_trace(gc)("MarkStackSize: %uk MarkStackSizeMax: %uk", (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
- log_trace(gc)("ConcGCThreads: %u", ConcGCThreads);
}
#endif // INCLUDE_ALL_GCS
@@ -1949,7 +1948,6 @@
}
log_trace(gc)("MarkStackSize: %uk MarkStackSizeMax: %uk", (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
- log_trace(gc)("ConcGCThreads: %u", ConcGCThreads);
}
void Arguments::set_gc_specific_flags() {
--- a/hotspot/test/gc/g1/Test2GbHeap.java Mon May 30 16:25:38 2016 +0200
+++ b/hotspot/test/gc/g1/Test2GbHeap.java Tue May 31 09:41:15 2016 -0700
@@ -25,9 +25,9 @@
* @test Test2GbHeap
* @bug 8031686
* @summary Regression test to ensure we can start G1 with 2gb heap.
- * Skip test on 32 bit Windows: it typically does not support the many and large virtual memory reservations needed.
+ * Skip test on 32 bit system: it typically does not support the many and large virtual memory reservations needed.
* @requires (vm.gc == "G1" | vm.gc == "null")
- * @requires !((sun.arch.data.model == "32") & (os.family == "windows"))
+ * @requires vm.bits != "32"
* @key gc
* @key regression
* @library /testlibrary
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/serviceability/logging/TestDefaultLogOutput.java Tue May 31 09:41:15 2016 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test TestDefaultLogOutput
+ * @summary Ensure logging is default on stdout.
+ * @modules java.base/jdk.internal.misc
+ * @library /testlibrary
+ */
+
+import jdk.test.lib.ProcessTools;
+import jdk.test.lib.OutputAnalyzer;
+
+public class TestDefaultLogOutput {
+
+ public static void main(String[] args) throws Exception {
+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:badTag");
+ OutputAnalyzer output = new OutputAnalyzer(pb.start());
+ output.stdoutShouldMatch("\\[error *\\]\\[logging *\\]");
+ output.shouldHaveExitValue(1);
+ }
+}
+
--- a/hotspot/test/testlibrary_tests/SimpleClassFileLoadHookTest.java Mon May 30 16:25:38 2016 +0200
+++ b/hotspot/test/testlibrary_tests/SimpleClassFileLoadHookTest.java Tue May 31 09:41:15 2016 -0700
@@ -24,7 +24,7 @@
/*
* @test
* @library /testlibrary
- *
+ * @requires vm.flavor != "minimal"
* @run main/othervm/native -agentlib:SimpleClassFileLoadHook=Foo,XXX,YYY
* SimpleClassFileLoadHookTest
*/