mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
speedup threads sorting
GitOrigin-RevId: 043665c84b2bc62af8fcae5fdf8d44fde2f88151
This commit is contained in:
committed by
intellij-monorepo-bot
parent
daa0362f22
commit
de2736ffcc
@@ -129,7 +129,7 @@ public class ThreadDumpParser {
|
||||
if (state.getOperation() == ThreadOperation.Socket) {
|
||||
return -1;
|
||||
}
|
||||
return StringUtil.countNewLines(state.getStackTrace());
|
||||
return state.getStackDepth();
|
||||
}
|
||||
|
||||
static boolean isKnownJdkThread(@NotNull String stackTrace) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.intellij.unscramble;
|
||||
|
||||
import com.intellij.diagnostic.ThreadDumper;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -30,6 +31,7 @@ public class ThreadState {
|
||||
@Nullable
|
||||
private ThreadOperation myOperation;
|
||||
private boolean myKnownJDKThread;
|
||||
private int myStackDepth;
|
||||
|
||||
public ThreadState(final String name, final String state) {
|
||||
myName = name;
|
||||
@@ -52,6 +54,11 @@ public class ThreadState {
|
||||
myStackTrace = stackTrace;
|
||||
myEmptyStackTrace = isEmpty;
|
||||
myKnownJDKThread = ThreadDumpParser.isKnownJdkThread(stackTrace);
|
||||
myStackDepth = StringUtil.countNewLines(myStackTrace);
|
||||
}
|
||||
|
||||
int getStackDepth() {
|
||||
return myStackDepth;
|
||||
}
|
||||
|
||||
public boolean isKnownJDKThread() {
|
||||
|
||||
Reference in New Issue
Block a user