Merged gcj-eclipse branch to trunk.
From-SVN: r120621
This commit is contained in:
parent
c648dedbde
commit
97b8365caf
17478 changed files with 606493 additions and 100744 deletions
|
@ -102,7 +102,7 @@ public class ThreadInfo
|
|||
/**
|
||||
* The state of the thread which this instance concerns.
|
||||
*/
|
||||
private String threadState;
|
||||
private Thread.State threadState;
|
||||
|
||||
/**
|
||||
* The number of times the thread has been blocked.
|
||||
|
@ -200,10 +200,12 @@ public class ThreadInfo
|
|||
long waitedTime, boolean isInNative, boolean isSuspended,
|
||||
StackTraceElement[] trace)
|
||||
{
|
||||
this(thread.getId(), thread.getName(), thread.getState(), blockedCount,
|
||||
blockedTime, lock.getClass().getName() + "@" +
|
||||
Integer.toHexString(System.identityHashCode(lock)), lockOwner.getId(),
|
||||
lockOwner.getName(), waitedCount, waitedTime, isInNative, isSuspended,
|
||||
this(thread.getId(), thread.getName(), thread.getState(), blockedCount, blockedTime,
|
||||
lock == null ? null : lock.getClass().getName() + "@" +
|
||||
Integer.toHexString(System.identityHashCode(lock)),
|
||||
lockOwner == null ? -1 : lockOwner.getId(),
|
||||
lockOwner == null ? null : lockOwner.getName(),
|
||||
waitedCount, waitedTime, isInNative, isSuspended,
|
||||
trace);
|
||||
}
|
||||
|
||||
|
@ -240,7 +242,7 @@ public class ThreadInfo
|
|||
* @param trace the stack trace of the thread to a pre-determined
|
||||
* depth (see VMThreadMXBeanImpl)
|
||||
*/
|
||||
private ThreadInfo(long threadId, String threadName, String threadState,
|
||||
private ThreadInfo(long threadId, String threadName, Thread.State threadState,
|
||||
long blockedCount, long blockedTime, String lockName,
|
||||
long lockOwnerId, String lockOwnerName, long waitedCount,
|
||||
long waitedTime, boolean isInNative, boolean isSuspended,
|
||||
|
@ -387,7 +389,7 @@ public class ThreadInfo
|
|||
dTraces[a].get("lineNumber")).intValue());
|
||||
return new ThreadInfo(((Long) data.get("threadId")).longValue(),
|
||||
(String) data.get("threadName"),
|
||||
(String) data.get("threadState"),
|
||||
Thread.State.valueOf((String) data.get("threadState")),
|
||||
((Long) data.get("blockedCount")).longValue(),
|
||||
((Long) data.get("blockedTime")).longValue(),
|
||||
(String) data.get("lockName"),
|
||||
|
@ -484,7 +486,7 @@ public class ThreadInfo
|
|||
*/
|
||||
public String getLockName()
|
||||
{
|
||||
if (threadState.equals("BLOCKED"))
|
||||
if (threadState != Thread.State.BLOCKED)
|
||||
return null;
|
||||
return lockName;
|
||||
}
|
||||
|
@ -502,7 +504,7 @@ public class ThreadInfo
|
|||
*/
|
||||
public long getLockOwnerId()
|
||||
{
|
||||
if (threadState.equals("BLOCKED"))
|
||||
if (threadState != Thread.State.BLOCKED)
|
||||
return -1;
|
||||
return lockOwnerId;
|
||||
}
|
||||
|
@ -520,7 +522,7 @@ public class ThreadInfo
|
|||
*/
|
||||
public String getLockOwnerName()
|
||||
{
|
||||
if (threadState.equals("BLOCKED"))
|
||||
if (threadState != Thread.State.BLOCKED)
|
||||
return null;
|
||||
return lockOwnerName;
|
||||
}
|
||||
|
@ -577,7 +579,7 @@ public class ThreadInfo
|
|||
*
|
||||
* @return the thread's state.
|
||||
*/
|
||||
public String getThreadState()
|
||||
public Thread.State getThreadState()
|
||||
{
|
||||
return threadState;
|
||||
}
|
||||
|
@ -695,7 +697,7 @@ public class ThreadInfo
|
|||
", waitedCount=" + waitedCount +
|
||||
", isInNative=" + isInNative +
|
||||
", isSuspended=" + isSuspended +
|
||||
(threadState.equals("BLOCKED") ?
|
||||
(threadState == Thread.State.BLOCKED ?
|
||||
", lockOwnerId=" + lockOwnerId +
|
||||
", lockOwnerName=" + lockOwnerName : "") +
|
||||
"]";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue