RFR: JDK-8140031: SA: Searching for a value in Threads does not work

Poonam Bajaj Parhar poonam.bajaj at oracle.com
Thu Dec 3 22:31:18 UTC 2015


Hello,

Please review the changes for the following fix:

Bug: JDK-8140031: SA: Searching for a value in Threads does not work

Fix: These changes improve the threads related commands in clhsdb
1. 'threads' command now prints the detailed information about threads.
2. 'thread' command now prints the detailed info along with its ID.
3. fixed the Stack base address. getBaseOfStackPointer() gives null base 
pointer.
4. Fixed the output of searching for a value in thread stacks.

Webrev: http://cr.openjdk.java.net/~poonam/8140031/webrev.00/

Output after changes:
hsdb> search threads 0x00000007a2211ec8
found on the stack of thread 30682 at 0x00007f8b45acdc68
hsdb> mem 0x00007f8b45acdc68
0x00007f8b45acdc68: 0x00000007a2211ec8
hsdb> thread 30682
Thread 30682 Address 0x00007f8be85f2000
State: BLOCKED
Stack in use by Java: 0x00007f8b45accef0 .. 0x00007f8b45acf7c0
Base of Stack: 0x00007f8b45ad1000
Last_Java_SP: 0x00007f8b45accef0
Last_Java_FP: null
Last_Java_PC: 0x00007f8ca6e672d1
Thread id: 30682
hsdb> threads
21344 [STANDBY] ExecuteThread: '521' for queue: 'weblogic.kernel.Default 
(self-tuning)'
State: BLOCKED
Stack in use by Java: 0x00007f8b37bb92d0 .. 0x00007f8b37bba840
Base of Stack: 0x00007f8b37bbc000
Last_Java_SP: 0x00007f8b37bb92d0
Last_Java_FP: null
Last_Java_PC: null
Thread id: 21344
...
21336 [STANDBY] ExecuteThread: '520' for queue: 'weblogic.kernel.Default 
(self-tuning)'
State: BLOCKED
Stack in use by Java: 0x00007f8b41adabb0 .. 0x00007f8b41ae17c0
Base of Stack: 0x00007f8b41ae3000
Last_Java_SP: 0x00007f8b41adabb0
Last_Java_FP: null
Last_Java_PC: null
Thread id: 21336
...
21227 [STANDBY] ExecuteThread: '519' for queue: 'weblogic.kernel.Default 
(self-tuning)'
State: BLOCKED
Stack in use by Java: 0x00007f8b424e4b30 .. 0x00007f8b424eb740
Base of Stack: 0x00007f8b424ed000
Last_Java_SP: 0x00007f8b424e4b30
Last_Java_FP: null
Last_Java_PC: null
Thread id: 21227
...

Testing:
Tested CLHSDB with a core file and executed thread, threads and search 
threads commands.

Thanks,
Poonam



More information about the serviceability-dev mailing list