From 0c225cb465dce202c2dff8c40f30d4b7a6ffd5c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=9B=BD=E7=91=9E?= <18235787078@163.com> Date: Tue, 17 Sep 2024 20:11:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E9=80=89=E9=A1=B9?= =?UTF-8?q?=20--classify?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/command/monitor200/ProfilerCommand.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java b/core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java index 2ad257b7eeb..26a844a36e5 100644 --- a/core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java +++ b/core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java @@ -117,6 +117,11 @@ public class ProfilerCommand extends AnnotatedCommand { */ private Integer jstackdepth; + /** + * Automatically classify execution samples into categories + */ + private boolean classify; + /** * profile different threads separately */ @@ -339,6 +344,12 @@ public void setJfrsync(String jfrsync) { this.jfrsync = jfrsync; } + @Option(longName = "classify", flag = true) + @Description("Automatically classify execution samples into categories") + public void setClassify(boolean classify) { + this.classify = classify; + } + @Option(shortName = "t", longName = "threads", flag = true) @Description("profile different threads separately") public void setThreads(boolean threads) { @@ -579,6 +590,9 @@ private String executeArgs(ProfilerAction action) { if (this.jstackdepth != null) { sb.append("jstackdepth=").append(this.jstackdepth).append(COMMA); } + if (this.classify) { + sb.append("classify").append(COMMA); + } if (this.threads) { sb.append("threads").append(COMMA); }