import{_ as c,o as i,c as r,a,b as n,w as o,e as s,d as l,r as p}from"./app.977e81c1.js";const d={},u=a("h1",{id:"stack",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#stack","aria-hidden":"true"},"#"),s(" stack")],-1),m={href:"https://arthas.aliyun.com/doc/arthas-tutorials.html?language=cn&id=command-stack",target:"_blank",rel:"noopener noreferrer"},k=a("code",null,"stack",-1),h=s("\u5728\u7EBF\u6559\u7A0B"),b=l('

\u63D0\u793A

\u8F93\u51FA\u5F53\u524D\u65B9\u6CD5\u88AB\u8C03\u7528\u7684\u8C03\u7528\u8DEF\u5F84

\u5F88\u591A\u65F6\u5019\u6211\u4EEC\u90FD\u77E5\u9053\u4E00\u4E2A\u65B9\u6CD5\u88AB\u6267\u884C\uFF0C\u4F46\u8FD9\u4E2A\u65B9\u6CD5\u88AB\u6267\u884C\u7684\u8DEF\u5F84\u975E\u5E38\u591A\uFF0C\u6216\u8005\u4F60\u6839\u672C\u5C31\u4E0D\u77E5\u9053\u8FD9\u4E2A\u65B9\u6CD5\u662F\u4ECE\u90A3\u91CC\u88AB\u6267\u884C\u4E86\uFF0C\u6B64\u65F6\u4F60\u9700\u8981\u7684\u662F stack \u547D\u4EE4\u3002

\u53C2\u6570\u8BF4\u660E

\u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
class-pattern\u7C7B\u540D\u8868\u8FBE\u5F0F\u5339\u914D
method-pattern\u65B9\u6CD5\u540D\u8868\u8FBE\u5F0F\u5339\u914D
condition-express\u6761\u4EF6\u8868\u8FBE\u5F0F
[E]\u5F00\u542F\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u9ED8\u8BA4\u4E3A\u901A\u914D\u7B26\u5339\u914D
[n:]\u6267\u884C\u6B21\u6570\u9650\u5236
[m <arg>]\u6307\u5B9A Class \u6700\u5927\u5339\u914D\u6570\u91CF\uFF0C\u9ED8\u8BA4\u503C\u4E3A 50\u3002\u957F\u683C\u5F0F\u4E3A[maxMatch <arg>]\u3002

\u8FD9\u91CC\u91CD\u70B9\u8981\u8BF4\u660E\u7684\u662F\u89C2\u5BDF\u8868\u8FBE\u5F0F\uFF0C\u89C2\u5BDF\u8868\u8FBE\u5F0F\u7684\u6784\u6210\u4E3B\u8981\u7531 \bognl \u8868\u8FBE\u5F0F\u7EC4\u6210\uFF0C\u6240\u4EE5\u4F60\u53EF\u4EE5\u8FD9\u6837\u5199"{params,returnObj}"\uFF0C\u53EA\u8981\u662F\u4E00\u4E2A\u5408\u6CD5\u7684 ognl \u8868\u8FBE\u5F0F\uFF0C\u90FD\u80FD\u88AB\u6B63\u5E38\u652F\u6301\u3002

\u89C2\u5BDF\u7684\u7EF4\u5EA6\u4E5F\u6BD4\u8F83\u591A\uFF0C\u4E3B\u8981\u4F53\u73B0\u5728\u53C2\u6570 advice \u7684\u6570\u636E\u7ED3\u6784\u4E0A\u3002Advice \u53C2\u6570\u6700\u4E3B\u8981\u662F\u5C01\u88C5\u4E86\u901A\u77E5\u8282\u70B9\u7684\u6240\u6709\u4FE1\u606F\u3002

',6),v=s("\u8BF7\u53C2\u8003"),g=s("\u8868\u8FBE\u5F0F\u6838\u5FC3\u53D8\u91CF"),_=s("\u4E2D\u5173\u4E8E\u8BE5\u8282\u70B9\u7684\u63CF\u8FF0\u3002"),f=s("\u7279\u6B8A\u7528\u6CD5\u8BF7\u53C2\u8003\uFF1A"),x={href:"https://github.com/alibaba/arthas/issues/71",target:"_blank",rel:"noopener noreferrer"},C=s("https://github.com/alibaba/arthas/issues/71"),y=s("OGNL \u8868\u8FBE\u5F0F\u5B98\u7F51\uFF1A"),G={href:"https://commons.apache.org/dormant/commons-ognl/language-guide.html",target:"_blank",rel:"noopener noreferrer"},M=s("https://commons.apache.org/dormant/commons-ognl/language-guide.html"),L=a("h2",{id:"\u4F7F\u7528\u4F8B\u5B50",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u4F7F\u7528\u4F8B\u5B50","aria-hidden":"true"},"#"),s(" \u4F7F\u7528\u4F8B\u5B50")],-1),A=a("h3",{id:"\u542F\u52A8-demo",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u542F\u52A8-demo","aria-hidden":"true"},"#"),s(" \u542F\u52A8 Demo")],-1),$=s("\u542F\u52A8"),w=s("\u5FEB\u901F\u5165\u95E8"),j=s("\u91CC\u7684"),T=a("code",null,"math-game",-1),F=s("\u3002"),N=l(`

stack

$ stack demo.MathGame primeFactors
Press Ctrl+C to abort.
Affect(class-cnt:1 , method-cnt:1) cost in 36 ms.
ts=2018-12-04 01:32:19;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    @demo.MathGame.run()
        at demo.MathGame.main(MathGame.java:16)

\u6307\u5B9A Class \u6700\u5927\u5339\u914D\u6570\u91CF

$ stack demo.MathGame primeFactors -m 1
Press Q or Ctrl+C to abort.
Affect(class count:1 , method count:1) cost in 561 ms, listenerId: 5.
ts=2022-12-25 21:07:07;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@b4aac2
    @demo.MathGame.primeFactors()
        at demo.MathGame.run(MathGame.java:46)
        at demo.MathGame.main(MathGame.java:38)

\u636E\u6761\u4EF6\u8868\u8FBE\u5F0F\u6765\u8FC7\u6EE4

$ stack demo.MathGame primeFactors 'params[0]<0' -n 2
Press Ctrl+C to abort.
Affect(class-cnt:1 , method-cnt:1) cost in 30 ms.
ts=2018-12-04 01:34:27;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    @demo.MathGame.run()
        at demo.MathGame.main(MathGame.java:16)

ts=2018-12-04 01:34:30;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    @demo.MathGame.run()
        at demo.MathGame.main(MathGame.java:16)

Command execution times exceed limit: 2, so command will exit. You can set it with -n option.

\u636E\u6267\u884C\u65F6\u95F4\u6765\u8FC7\u6EE4

$ stack demo.MathGame primeFactors '#cost>5'
Press Ctrl+C to abort.
Affect(class-cnt:1 , method-cnt:1) cost in 35 ms.
ts=2018-12-04 01:35:58;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    @demo.MathGame.run()
        at demo.MathGame.main(MathGame.java:16)
`,8);function E(P,V){const e=p("ExternalLinkIcon"),t=p("RouterLink");return i(),r("div",null,[u,a("p",null,[a("a",m,[k,h,n(e)])]),b,a("p",null,[v,n(t,{to:"/doc/advice-class.html"},{default:o(()=>[g]),_:1}),_]),a("ul",null,[a("li",null,[f,a("a",x,[C,n(e)])]),a("li",null,[y,a("a",G,[M,n(e)])])]),L,A,a("p",null,[$,n(t,{to:"/doc/quick-start.html"},{default:o(()=>[w]),_:1}),j,T,F]),N])}const B=c(d,[["render",E],["__file","stack.html.vue"]]);export{B as default};