Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/io/airlift/stackfold/StackFolder.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

public final class StackFolder
{
private static final Pattern THREAD_INFO_PATTERN = Pattern.compile("^\"(.*)\"\\s*(?:#(\\d+))?\\s*(daemon)?\\s*prio=(\\d+)\\s*(?:os_prio=(\\d+))?\\s*tid=(\\w+)\\s*nid=(\\w+)\\s*([^\\[]*)(?:\\[([^\\]]*)\\])?$");
private static final Pattern THREAD_INFO_PATTERN = Pattern.compile("^\"(.*)\"\\s*(?:#(\\d+))?\\s*(daemon)?\\s*prio=(\\d+)\\s*(?:os_prio=(\\d+))?\\s*(?:cpu=([\\w\\.]+))?\\s*(?:elapsed=([\\w\\.]+))?\\s*tid=(\\w+)\\s*nid=(\\w+)\\s*([^\\[]*)(?:\\[([^\\]]*)\\])?$");
private static final Pattern STACK_ELEMENT_PATTERN = Pattern.compile("(?:at)?\\s*([^\\(]+)\\.([^\\(]+)(?:\\(([^:]+)(?::(\\d+))?\\))?");
private static final Pattern WAIT_ON_PATTERN = Pattern.compile("- parking to wait for <(\\w+)> \\(a (\\S+)\\)");
private static final Pattern LOCKED_PATTERN = Pattern.compile("- locked <(\\w+)> \\(a (\\S+)\\)");
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/stack.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Full thread dump Java HotSpot(TM) 64-Bit Server VM (23.25-b01 mixed mode):
java.lang.Thread.State: RUNNABLE
No compile task

"Signal Dispatcher" daemon prio=5 tid=0x00007fda14895800 nid=0x5003 runnable [0x0000000000000000]
"Signal Dispatcher" #4 daemon prio=9 os_prio=0 cpu=0.26ms elapsed=27760.92s tid=0x00007f76101acdf0 nid=0x193 runnable [0x0000000000000000]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of editing this file, please add a new file and a new test method.

just make sure to do it on a small application (eg Hello World -style that just sleeps)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See also #6

java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=5 tid=0x00007fda14858000 nid=0x3f03 in Object.wait() [0x000000018d8a5000]
Expand Down