--- a/hotspot/src/os/solaris/vm/os_solaris.cpp Thu May 19 11:39:53 2016 -0400
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp Fri May 20 14:57:18 2016 +0000
@@ -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/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp Thu May 19 11:39:53 2016 -0400
+++ b/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp Fri May 20 14:57:18 2016 +0000
@@ -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 Thu May 19 11:39:53 2016 -0400
+++ b/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp Fri May 20 14:57:18 2016 +0000
@@ -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/runtime/arguments.cpp Thu May 19 11:39:53 2016 -0400
+++ b/hotspot/src/share/vm/runtime/arguments.cpp Fri May 20 14:57:18 2016 +0000
@@ -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() {