I'm looking at a thread dump of my Java application, and have noticed that sometimes instead of showing "locked", I see the keyword "eliminated", as seen below:
"Worker [4]" prio=10 tid=0x00007fb1262d8800 nid=0x89a0 in Object.wait() [0x00007fb15b147000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at com.myapp.common.util.WaitableQueue.getAll(WaitableQueue.java:152)
- eliminated <0x00000004d0d28e18> (a com.myapp.common.util.balq.SingleQueueQController$_WorkerQueue)
at com.myapp.common.util.balq.SingleQueueQController$_WorkerQueue.getAll(SingleQueueQController.java:3527)
- locked <0x00000004d0d28e18> (a com.myapp.common.util.balq.SingleQueueQController$_WorkerQueue)
at com.myapp.common.util.AbstractWorker.read(AbstractWorker.java:678)
at com.myapp.common.util.AbstractWorker.runBulk(AbstractWorker.java:541)
at com.myapp.common.util.AbstractWorker.run(AbstractWorker.java:343)
Surprisingly, I can't find anything on Google about this. What is the difference between the "locked" and "eliminated" keywords?
Copyright Notice:Content Author:「zedix」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/21631052/what-does-eliminated-mean-in-a-java-stack-trace