diff options
author | Luck <git@lucko.me> | 2020-04-24 14:25:09 +0100 |
---|---|---|
committer | Luck <git@lucko.me> | 2020-04-24 14:25:09 +0100 |
commit | bdc2641e0997775f87fd413d9cb12716f0abd2f5 (patch) | |
tree | f437a19f313470e79960d927a333db724a7d956c /spark-common/src/main/java/me/lucko/spark/common/command | |
parent | 88d39cfa0afd3b1388a5806396e9da7184abea49 (diff) | |
download | spark-bdc2641e0997775f87fd413d9cb12716f0abd2f5.tar.gz spark-bdc2641e0997775f87fd413d9cb12716f0abd2f5.tar.bz2 spark-bdc2641e0997775f87fd413d9cb12716f0abd2f5.zip |
Improve --ignore-sleeping flag, add --ignore-native flag
Diffstat (limited to 'spark-common/src/main/java/me/lucko/spark/common/command')
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java | 6 |
1 files changed, 5 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 b2b7a16..b8d8cc6 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 @@ -81,6 +81,7 @@ public class SamplerModule implements CommandModule { .argumentUsage("interval", "interval millis") .argumentUsage("only-ticks-over", "tick length millis") .argumentUsage("ignore-sleeping", null) + .argumentUsage("ignore-native", null) .argumentUsage("order-by-time", null) .argumentUsage("separate-parent-calls", null) .executor((platform, sender, resp, arguments) -> { @@ -146,6 +147,7 @@ public class SamplerModule implements CommandModule { } boolean ignoreSleeping = arguments.boolFlag("ignore-sleeping"); + boolean ignoreNative = arguments.boolFlag("ignore-native"); Set<String> threads = arguments.stringFlag("thread"); ThreadDumper threadDumper; @@ -197,6 +199,7 @@ public class SamplerModule implements CommandModule { } builder.samplingInterval(intervalMillis); builder.ignoreSleeping(ignoreSleeping); + builder.ignoreNative(ignoreNative); if (ticksOver != -1) { builder.ticksOver(ticksOver, tickHook); } @@ -249,7 +252,8 @@ public class SamplerModule implements CommandModule { List<String> opts = new ArrayList<>(Arrays.asList("--info", "--stop", "--cancel", "--timeout", "--regex", "--combine-all", "--not-combined", "--interval", - "--only-ticks-over", "--ignore-sleeping", "--order-by-time", "--separate-parent-calls", "--comment")); + "--only-ticks-over", "--ignore-sleeping", "--ignore-native", "--order-by-time", + "--separate-parent-calls", "--comment")); opts.removeAll(arguments); opts.add("--thread"); // allowed multiple times |