mirror of
https://github.com/alibaba/arthas.git
synced 2024-04-21 10:21:39 +00:00
Make thread id uniformly displayed in decimal format
This commit is contained in:
@@ -89,10 +89,10 @@ public class TraceView extends ResultView<TraceModel> {
|
||||
//render thread info
|
||||
ThreadNode threadNode = (ThreadNode) node;
|
||||
//ts=2020-04-29 10:34:00;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@18b4aac2
|
||||
sb.append(format("ts=%s;thread_name=%s;id=%s;is_daemon=%s;priority=%d;TCCL=%s",
|
||||
sb.append(format("ts=%s;thread_name=%s;id=%d;is_daemon=%s;priority=%d;TCCL=%s",
|
||||
DateUtils.formatDate(threadNode.getTimestamp()),
|
||||
threadNode.getThreadName(),
|
||||
Long.toHexString(threadNode.getThreadId()),
|
||||
threadNode.getThreadId(),
|
||||
threadNode.isDaemon(),
|
||||
threadNode.getPriority(),
|
||||
threadNode.getClassloader()));
|
||||
|
||||
@@ -399,7 +399,7 @@ abstract public class ThreadUtil {
|
||||
public static StackModel getThreadStackModel(ClassLoader loader, Thread currentThread) {
|
||||
StackModel stackModel = new StackModel();
|
||||
stackModel.setThreadName(currentThread.getName());
|
||||
stackModel.setThreadId(Long.toHexString(currentThread.getId()));
|
||||
stackModel.setThreadId(Long.toString(currentThread.getId()));
|
||||
stackModel.setDaemon(currentThread.isDaemon());
|
||||
stackModel.setPriority(currentThread.getPriority());
|
||||
stackModel.setClassloader(getTCCL(currentThread));
|
||||
|
||||
Reference in New Issue
Block a user