-
Enhancement
-
Resolution: Fixed
-
P4
-
6
-
b54
-
generic
-
generic
>>The new thread dump output looks great but I wonder if one little
>>improvement is possible. When it puts out something like this:
>>
>> - locked <0xf495fbb8> (a java.lang.Class)
>>
>>is there no way to list the actual class?(e.g. in my case today it is
>>mostly java.util.logging.Logger) If the program is doing a lot of static
>>synchronization I'm left staring at and matching up hex numbers, a more
>>tiresome exercise.
>>
public class Foo extends Thread {
static Object o = new Foo();
public static void main(String[] args) {
try {
synchronized(Foo.class) {
Foo.class.wait();
}
} catch (InterruptedException e){
System.exit(0);
}
}
}
Just run this, then kill -3 (On Solaris it's control-\) and you'll see
something like:
- waiting on <0xd0c042f8> (a java.lang.Class)
And the RFE is asking to see "a Foo" instead of "a java.lang.Class".
>>improvement is possible. When it puts out something like this:
>>
>> - locked <0xf495fbb8> (a java.lang.Class)
>>
>>is there no way to list the actual class?(e.g. in my case today it is
>>mostly java.util.logging.Logger) If the program is doing a lot of static
>>synchronization I'm left staring at and matching up hex numbers, a more
>>tiresome exercise.
>>
public class Foo extends Thread {
static Object o = new Foo();
public static void main(String[] args) {
try {
synchronized(Foo.class) {
Foo.class.wait();
}
} catch (InterruptedException e){
System.exit(0);
}
}
}
Just run this, then kill -3 (On Solaris it's control-\) and you'll see
something like:
- waiting on <0xd0c042f8> (a java.lang.Class)
And the RFE is asking to see "a Foo" instead of "a java.lang.Class".
- relates to
-
JDK-8048353 jstack -l crashes VM when a Java mirror for a primitive type is locked
- Resolved