mirror of https://github.com/alibaba/arthas.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
3.7 KiB
JavaScript
9 lines
3.7 KiB
JavaScript
import{_ as r,o as d,c as l,a as e,b as a,w as o,e as s,d as i,r as t}from"./app.5024572d.js";const m={},p=e("h1",{id:"mc",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#mc","aria-hidden":"true"},"#"),s(" mc")],-1),u={href:"https://arthas.aliyun.com/doc/arthas-tutorials?language=cn&id=command-mc-retransform",target:"_blank",rel:"noopener noreferrer"},h=e("code",null,"mc-retransform",-1),_=s("\u5728\u7EBF\u6559\u7A0B"),v=i(`<h2 id="\u4F7F\u7528\u53C2\u8003" tabindex="-1"><a class="header-anchor" href="#\u4F7F\u7528\u53C2\u8003" aria-hidden="true">#</a> \u4F7F\u7528\u53C2\u8003</h2><div class="custom-container tip"><p class="custom-container-title">\u63D0\u793A</p><p>Memory Compiler/\u5185\u5B58\u7F16\u8BD1\u5668\uFF0C\u7F16\u8BD1<code>.java</code>\u6587\u4EF6\u751F\u6210<code>.class</code>\u3002</p></div><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">mc</span> /tmp/Test.java
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u53EF\u4EE5\u901A\u8FC7<code>-c</code>\u53C2\u6570\u6307\u5B9A classloader\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">mc</span> <span class="token parameter variable">-c</span> 327a647b /tmp/Test.java
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u4E5F\u53EF\u4EE5\u901A\u8FC7<code>--classLoaderClass</code>\u53C2\u6570\u6307\u5B9A ClassLoader\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">mc</span> <span class="token parameter variable">--classLoaderClass</span> org.springframework.boot.loader.LaunchedURLClassLoader /tmp/UserController.java <span class="token parameter variable">-d</span> /tmp
|
|
Memory compiler output:
|
|
/tmp/com/example/demo/arthas/user/UserController.class
|
|
Affect<span class="token punctuation">(</span>row-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">346</span> ms
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>\u53EF\u4EE5\u901A\u8FC7<code>-d</code>\u547D\u4EE4\u6307\u5B9A\u8F93\u51FA\u76EE\u5F55\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">mc</span> <span class="token parameter variable">-d</span> /tmp/output /tmp/ClassA.java /tmp/ClassB.java
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,9),b=s("\u7F16\u8BD1\u751F\u6210"),f=e("code",null,".class",-1),g=s("\u6587\u4EF6\u4E4B\u540E\uFF0C\u53EF\u4EE5\u7ED3\u5408"),k=s("retransform"),x=s("\u547D\u4EE4\u5B9E\u73B0\u70ED\u66F4\u65B0\u4EE3\u7801\u3002"),C={class:"custom-container warning"},L=e("p",{class:"custom-container-title"},"\u6CE8\u610F",-1),j=s("\u6CE8\u610F\uFF0Cmc \u547D\u4EE4\u6709\u53EF\u80FD\u5931\u8D25\u3002\u5982\u679C\u7F16\u8BD1\u5931\u8D25\u53EF\u4EE5\u5728\u672C\u5730\u7F16\u8BD1\u597D"),w=e("code",null,".class",-1),y=s("\u6587\u4EF6\uFF0C\u518D\u4E0A\u4F20\u5230\u670D\u52A1\u5668\u3002\u5177\u4F53\u53C2\u8003"),B=s("retransform"),N=s("\u547D\u4EE4\u8BF4\u660E\u3002");function V(E,R){const c=t("ExternalLinkIcon"),n=t("RouterLink");return d(),l("div",null,[p,e("p",null,[e("a",u,[h,_,a(c)])]),v,e("p",null,[b,f,g,a(n,{to:"/doc/retransform.html"},{default:o(()=>[k]),_:1}),x]),e("div",C,[L,e("p",null,[j,w,y,a(n,{to:"/doc/retransform.html"},{default:o(()=>[B]),_:1}),N])])])}const U=r(m,[["render",V],["__file","mc.html.vue"]]);export{U as default};
|