RFR: 7194254 jstack reports wrong thread priorities
david.holmes at oracle.com
Thu Sep 6 23:54:32 PDT 2012
This is a formal request for review for the patch contributed by Dymtro
Sheyko as discussed previously here:
I am one reviewer of course.
The webrev is here:
The fix has two components:
1. It fixes a bug in os::get_priority that assumed a more positive
integer was always higher priority than a less positive one.
2. It addresses the problem that os::get_priority is often inexact when
desiring the Java thread priority (because the mapping from Java
priority to OS priority is often M:1) by not using it in
Threads::print_on. Instead Threads::print_on will always report the
native OS priority, and JavaThread::print_on() will print the
java.lang.Thread.getId() value together with the
This change in output affects all stackdumps including crash logs and
thread dumps (including those shown by jstack).
There is also a test program to check jstack output. I'll be doing some
additional validation while the RFR is in progress.
More information about the hotspot-dev