From bdc2641e0997775f87fd413d9cb12716f0abd2f5 Mon Sep 17 00:00:00 2001 From: Luck Date: Fri, 24 Apr 2020 14:25:09 +0100 Subject: Improve --ignore-sleeping flag, add --ignore-native flag --- .../java/me/lucko/spark/common/command/modules/SamplerModule.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'spark-common/src/main/java/me/lucko/spark/common/command') 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 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 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 -- cgit