aboutsummaryrefslogtreecommitdiff
path: root/spark-common/src/main/java/me/lucko/spark/common
diff options
context:
space:
mode:
Diffstat (limited to 'spark-common/src/main/java/me/lucko/spark/common')
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java b/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java
index 5fd8b5b..fe719eb 100644
--- a/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java
+++ b/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java
@@ -56,6 +56,7 @@ public class SamplerModule<S> implements CommandModule<S> {
.aliases("start")
.argumentUsage("timeout", "timeout seconds")
.argumentUsage("thread", "thread name")
+ .argumentUsage("regex", null)
.argumentUsage("not-combined", null)
.argumentUsage("interval", "interval millis")
.argumentUsage("only-ticks-over", "tick length millis")
@@ -86,7 +87,12 @@ public class SamplerModule<S> implements CommandModule<S> {
} else if (threads.contains("*")) {
threadDumper = ThreadDumper.ALL;
} else {
- threadDumper = new ThreadDumper.Specific(threads);
+ if (arguments.boolFlag("regex")) {
+ threadDumper = new ThreadDumper.Regex(threads);
+ } else {
+ // specific matches
+ threadDumper = new ThreadDumper.Specific(threads);
+ }
}
ThreadGrouper threadGrouper;