|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
|
|
|
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
|
|
|
<head>
|
|
|
<meta charset="utf-8">
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
|
<title>tt — Arthas 3.0.6-SNAPSHOT documentation</title>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="shortcut icon" href="_static/favicon.ico"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
|
|
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
|
|
<link rel="stylesheet" href="_static/overrides.css" type="text/css" />
|
|
|
<link rel="index" title="Index" href="genindex.html" />
|
|
|
<link rel="search" title="Search" href="search.html" />
|
|
|
<link rel="next" title="options" href="options.html" />
|
|
|
<link rel="prev" title="stack" href="stack.html" />
|
|
|
<script src="_static/center_page.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script src="_static/js/modernizr.min.js"></script>
|
|
|
|
|
|
</head>
|
|
|
|
|
|
<body class="wy-body-for-nav">
|
|
|
|
|
|
|
|
|
<div class="wy-grid-for-nav">
|
|
|
|
|
|
|
|
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
|
|
<div class="wy-side-scroll">
|
|
|
<div class="wy-side-nav-search">
|
|
|
|
|
|
|
|
|
|
|
|
<a href="index.html" class="icon icon-home"> Arthas
|
|
|
|
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="version">
|
|
|
3.0.6-SNAPSHOT
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div role="search">
|
|
|
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
|
|
<input type="text" name="q" placeholder="Search docs" />
|
|
|
<input type="hidden" name="check_keywords" value="yes" />
|
|
|
<input type="hidden" name="area" value="default" />
|
|
|
</form>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ul class="current">
|
|
|
<li class="toctree-l1"><a class="reference internal" href="install-detail.html">Installation</a></li>
|
|
|
<li class="toctree-l1"><a class="reference internal" href="quick-start.html">Quick start</a></li>
|
|
|
<li class="toctree-l1"><a class="reference internal" href="advanced-use.html">Advanced usage</a></li>
|
|
|
<li class="toctree-l1 current"><a class="reference internal" href="commands.html">Commands</a><ul class="current">
|
|
|
<li class="toctree-l2"><a class="reference internal" href="dashboard.html">dashboard</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="thread.html">thread</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="jvm.html">jvm</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="sysprop.html">sysprop</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="sysenv.html">sysenv</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="getstatic.html">getstatic</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="ognl.html">ognl</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="sc.html">sc</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="sm.html">sm</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="dump.html">dump</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="jad.html">jad</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="classloader.html">classloader</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="redefine.html">redefine</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="monitor.html">monitor</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="watch.html">watch</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="trace.html">trace</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="stack.html">stack</a></li>
|
|
|
<li class="toctree-l2 current"><a class="current reference internal" href="#">tt</a><ul>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#usage">Usage</a><ul>
|
|
|
<li class="toctree-l4"><a class="reference internal" href="#f-y-i">F.Y.I</a></li>
|
|
|
<li class="toctree-l4"><a class="reference internal" href="#property">Property</a></li>
|
|
|
<li class="toctree-l4"><a class="reference internal" href="#condition-expression">Condition expression</a></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#searching-for-records">Searching for records</a><ul>
|
|
|
<li class="toctree-l4"><a class="reference internal" href="#all-the-recorded">All the recorded</a></li>
|
|
|
<li class="toctree-l4"><a class="reference internal" href="#a-specified-method">A specified method</a></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#check-context-of-the-call">Check context of the call</a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#re-produce">Re-produce</a></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="options.html">options</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="commands.html#basic-arthas-commands">Basic Arthas Commands</a></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas/issues?q=label%3Auser-case">User cases</a></li>
|
|
|
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas/issues?q=label%3Aquestion-answered">Questions and answers</a></li>
|
|
|
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas">Fork me at GitHub</a></li>
|
|
|
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas/blob/master/CONTRIBUTING.md">CONTRIBUTING</a></li>
|
|
|
<li class="toctree-l1"><a class="reference internal" href="release-notes.html">Release Notes</a></li>
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
</nav>
|
|
|
|
|
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
|
|
|
|
|
|
|
|
<nav class="wy-nav-top" aria-label="top navigation">
|
|
|
|
|
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
|
|
<a href="index.html">Arthas</a>
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
<div class="wy-nav-content">
|
|
|
|
|
|
<div class="rst-content">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div role="navigation" aria-label="breadcrumbs navigation">
|
|
|
|
|
|
<ul class="wy-breadcrumbs">
|
|
|
|
|
|
<li><a href="index.html">Docs</a> »</li>
|
|
|
|
|
|
<li><a href="commands.html">All Commands</a> »</li>
|
|
|
|
|
|
<li>tt</li>
|
|
|
|
|
|
|
|
|
<li class="wy-breadcrumbs-aside">
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://github.com/alibaba/arthas/blob/master/site/src/site/sphinx/en/tt.md" class="fa fa-github"> Edit on GitHub</a>
|
|
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
<hr/>
|
|
|
</div>
|
|
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
|
|
<div itemprop="articleBody">
|
|
|
|
|
|
<div class="section" id="tt">
|
|
|
<span id="tt"></span><h1>tt<a class="headerlink" href="#tt" title="Permalink to this headline">¶</a></h1>
|
|
|
<p>Check the <code class="docutils literal notranslate"><span class="pre">parameters</span></code>, <code class="docutils literal notranslate"><span class="pre">return</span> <span class="pre">values</span></code> and <code class="docutils literal notranslate"><span class="pre">exceptions</span></code> of the methods at different times.</p>
|
|
|
<p><code class="docutils literal notranslate"><span class="pre">watch</span></code> is a powerful command but due to its feasibility and complexity, it’s quite hard to locate the issue effectively.</p>
|
|
|
<p>In such difficulties, <code class="docutils literal notranslate"><span class="pre">tt</span></code> comes into play.</p>
|
|
|
<p>With the help of <code class="docutils literal notranslate"><span class="pre">tt</span></code> (<em>TimeTunnel</em>), you can check the contexts of the methods at different times in execution history.</p>
|
|
|
<div class="section" id="usage">
|
|
|
<span id="usage"></span><h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
|
|
|
<p>Let’s record the whole calling contexts:</p>
|
|
|
<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="n">$</span> <span class="n">tt</span> <span class="o">-</span><span class="n">t</span> <span class="o">-</span><span class="n">n</span> <span class="mi">3</span> <span class="o">*</span><span class="n">Test</span> <span class="n">print</span>
|
|
|
<span class="n">Press</span> <span class="n">Ctrl</span><span class="o">+</span><span class="n">D</span> <span class="n">or</span> <span class="n">Ctrl</span><span class="o">+</span><span class="n">X</span> <span class="n">to</span> <span class="n">abort</span><span class="o">.</span>
|
|
|
<span class="nf">Affect</span><span class="o">(</span><span class="n">class</span><span class="o">-</span><span class="n">cnt</span><span class="o">:</span><span class="mi">1</span> <span class="o">,</span> <span class="n">method</span><span class="o">-</span><span class="n">cnt</span><span class="o">:</span><span class="mi">1</span><span class="o">)</span> <span class="n">cost</span> <span class="n">in</span> <span class="mi">115</span> <span class="n">ms</span><span class="o">.</span>
|
|
|
<span class="o">+----------+----------------------+------------+----------+----------+-----------------+--------------------------------+--------------------------------+</span>
|
|
|
<span class="o">|</span> <span class="n">INDEX</span> <span class="o">|</span> <span class="n">TIMESTAMP</span> <span class="o">|</span> <span class="n">COST</span><span class="o">(</span><span class="n">ms</span><span class="o">)</span> <span class="o">|</span> <span class="n">IS</span><span class="o">-</span><span class="n">RET</span> <span class="o">|</span> <span class="n">IS</span><span class="o">-</span><span class="n">EXP</span> <span class="o">|</span> <span class="n">OBJECT</span> <span class="o">|</span> <span class="n">CLASS</span> <span class="o">|</span> <span class="n">METHOD</span> <span class="o">|</span>
|
|
|
<span class="o">+----------+----------------------+------------+----------+----------+-----------------+--------------------------------+--------------------------------+</span>
|
|
|
<span class="o">|</span> <span class="mi">1007</span> <span class="o">|</span> <span class="mi">2015</span><span class="o">-</span><span class="mo">07</span><span class="o">-</span><span class="mi">26</span> <span class="mi">12</span><span class="o">:</span><span class="mi">23</span><span class="o">:</span><span class="mi">21</span> <span class="o">|</span> <span class="mi">138</span> <span class="o">|</span> <span class="kc">true</span> <span class="o">|</span> <span class="kc">false</span> <span class="o">|</span> <span class="mh">0x42cc13a0</span> <span class="o">|</span> <span class="n">GaOgnlUtilsTest</span> <span class="o">|</span> <span class="n">print</span> <span class="o">|</span>
|
|
|
<span class="o">+----------+----------------------+------------+----------+----------+-----------------+--------------------------------+--------------------------------+</span>
|
|
|
<span class="o">|</span> <span class="mi">1008</span> <span class="o">|</span> <span class="mi">2015</span><span class="o">-</span><span class="mo">07</span><span class="o">-</span><span class="mi">26</span> <span class="mi">12</span><span class="o">:</span><span class="mi">23</span><span class="o">:</span><span class="mi">22</span> <span class="o">|</span> <span class="mi">143</span> <span class="o">|</span> <span class="kc">true</span> <span class="o">|</span> <span class="kc">false</span> <span class="o">|</span> <span class="mh">0x42cc13a0</span> <span class="o">|</span> <span class="n">GaOgnlUtilsTest</span> <span class="o">|</span> <span class="n">print</span> <span class="o">|</span>
|
|
|
<span class="o">+----------+----------------------+------------+----------+----------+-----------------+--------------------------------+--------------------------------+</span>
|
|
|
<span class="o">|</span> <span class="mi">1009</span> <span class="o">|</span> <span class="mi">2015</span><span class="o">-</span><span class="mo">07</span><span class="o">-</span><span class="mi">26</span> <span class="mi">12</span><span class="o">:</span><span class="mi">23</span><span class="o">:</span><span class="mi">23</span> <span class="o">|</span> <span class="mi">130</span> <span class="o">|</span> <span class="kc">true</span> <span class="o">|</span> <span class="kc">false</span> <span class="o">|</span> <span class="mh">0x42cc13a0</span> <span class="o">|</span> <span class="n">GaOgnlUtilsTest</span> <span class="o">|</span> <span class="n">print</span> <span class="o">|</span>
|
|
|
<span class="o">+----------+----------------------+------------+----------+----------+-----------------+--------------------------------+--------------------------------+</span>
|
|
|
<span class="n">$</span>
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
<div class="section" id="f-y-i">
|
|
|
<span id="f-y-i"></span><h3>F.Y.I<a class="headerlink" href="#f-y-i" title="Permalink to this headline">¶</a></h3>
|
|
|
<ul>
|
|
|
<li><p class="first"><code class="docutils literal notranslate"><span class="pre">-t</span></code></p>
|
|
|
<p>record the calling context of the method <code class="docutils literal notranslate"><span class="pre">*Test.print</span></code></p>
|
|
|
</li>
|
|
|
<li><p class="first"><code class="docutils literal notranslate"><span class="pre">-n</span> <span class="pre">3</span></code></p>
|
|
|
<p>limit the number of the records (avoid overflow for too many records; with <code class="docutils literal notranslate"><span class="pre">-n</span></code> option, Arthas can automatically stop recording once the records reach the specified limit)</p>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div class="section" id="property">
|
|
|
<span id="property"></span><h3>Property<a class="headerlink" href="#property" title="Permalink to this headline">¶</a></h3>
|
|
|
<table border="1" class="docutils">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th>Name</th>
|
|
|
<th>Specification</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
<tr>
|
|
|
<td>INDEX</td>
|
|
|
<td>the index for each call based on time</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>TIMESTAMP</td>
|
|
|
<td>time to invoke the method</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>COST(ms)</td>
|
|
|
<td>time cost of the method call</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>IS-RET</td>
|
|
|
<td>whether method exits with normal return</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>IS-EXP</td>
|
|
|
<td>whether method failed with exceptions</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>OBJECT</td>
|
|
|
<td><code>hashCode()</code> of the object invoking the method</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>CLASS</td>
|
|
|
<td>class name of the object invoking the method</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>METHOD</td>
|
|
|
<td>method being invoked</td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table></div>
|
|
|
<div class="section" id="condition-expression">
|
|
|
<span id="condition-expression"></span><h3>Condition expression<a class="headerlink" href="#condition-expression" title="Permalink to this headline">¶</a></h3>
|
|
|
<p>Tips:</p>
|
|
|
<ol class="simple">
|
|
|
<li><code class="docutils literal notranslate"><span class="pre">tt</span> <span class="pre">-t</span> <span class="pre">*Test</span> <span class="pre">print</span> <span class="pre">params[0].length==1</span></code> with different amounts of parameters;</li>
|
|
|
<li><code class="docutils literal notranslate"><span class="pre">tt</span> <span class="pre">-t</span> <span class="pre">*Test</span> <span class="pre">print</span> <span class="pre">'params[1]</span> <span class="pre">instanceof</span> <span class="pre">Integer'</span></code> with different types of parameters;</li>
|
|
|
<li><code class="docutils literal notranslate"><span class="pre">tt</span> <span class="pre">-t</span> <span class="pre">*Test</span> <span class="pre">print</span> <span class="pre">params[0].mobile=="13989838402"</span></code> with specified parameter.</li>
|
|
|
</ol>
|
|
|
<p>Advanced:</p>
|
|
|
<div class="toctree-wrapper compound">
|
|
|
<ul>
|
|
|
<li class="toctree-l1"><a class="reference internal" href="advice-class.html">Critical fields in expression</a></li>
|
|
|
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas/issues/71">Special usage</a></li>
|
|
|
<li class="toctree-l1"><a class="reference external" href="https://commons.apache.org/proper/commons-ognl/language-guide.html">OGNL official guide</a></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="section" id="searching-for-records">
|
|
|
<span id="searching-for-records"></span><h2>Searching for records<a class="headerlink" href="#searching-for-records" title="Permalink to this headline">¶</a></h2>
|
|
|
<div class="section" id="all-the-recorded">
|
|
|
<span id="all-the-recorded"></span><h3>All the recorded<a class="headerlink" href="#all-the-recorded" title="Permalink to this headline">¶</a></h3>
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ tt -l
|
|
|
+----------+----------------------+------------+----------+----------+-----------------+--------------------------------+--------------------------------+
|
|
|
| INDEX | TIMESTAMP | COST(ms) | IS-RET | IS-EXP | OBJECT | CLASS | METHOD |
|
|
|
+----------+----------------------+------------+----------+----------+-----------------+--------------------------------+--------------------------------+
|
|
|
| 1000 | 2015-07-26 01:16:27 | 130 | true | false | 0x42cc13a0 | GaOgnlUtilsTest | print |
|
|
|
+----------+----------------------+------------+----------+----------+-----------------+--------------------------------+--------------------------------+
|
|
|
| 1001 | 2015-07-26 01:16:27 | 0 | false | true | 0x42cc13a0 | GaOgnlUtilsTest | printAddress |
|
|
|
+----------+----------------------+------------+----------+----------+-----------------+--------------------------------+--------------------------------+
|
|
|
| 1002 | 2015-07-26 01:16:28 | 119 | true | false | 0x42cc13a0 | GaOgnlUtilsTest | print |
|
|
|
+----------+----------------------+------------+----------+----------+-----------------+--------------------------------+--------------------------------+
|
|
|
| 1003 | 2015-07-26 01:16:28 | 0 | false | true | 0x42cc13a0 | GaOgnlUtilsTest | printAddress |
|
|
|
+----------+----------------------+------------+----------+----------+-----------------+--------------------------------+--------------------------------+
|
|
|
| 1004 | 2015-07-26 12:21:56 | 130 | true | false | 0x42cc13a0 | GaOgnlUtilsTest | print |
|
|
|
+----------+----------------------+------------+----------+----------+-----------------+--------------------------------+--------------------------------+
|
|
|
| 1005 | 2015-07-26 12:21:57 | 138 | true | false | 0x42cc13a0 | GaOgnlUtilsTest | print |
|
|
|
+----------+----------------------+------------+----------+----------+-----------------+--------------------------------+--------------------------------+
|
|
|
| 1006 | 2015-07-26 12:21:58 | 130 | true | false | 0x42cc13a0 | GaOgnlUtilsTest | print |
|
|
|
+----------+----------------------+------------+----------+----------+-----------------+--------------------------------+--------------------------------+
|
|
|
Affect(row-cnt:7) cost in 2 ms.
|
|
|
$
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="section" id="a-specified-method">
|
|
|
<span id="a-specified-method"></span><h3>A specified method<a class="headerlink" href="#a-specified-method" title="Permalink to this headline">¶</a></h3>
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ tt -s method.name=="printAddress"
|
|
|
+----------+----------------------+------------+----------+----------+-----------------+--------------------------------+--------------------------------+
|
|
|
| INDEX | TIMESTAMP | COST(ms) | IS-RET | IS-EXP | OBJECT | CLASS | METHOD |
|
|
|
+----------+----------------------+------------+----------+----------+-----------------+--------------------------------+--------------------------------+
|
|
|
| 1001 | 2015-07-26 01:16:27 | 0 | false | true | 0x42cc13a0 | GaOgnlUtilsTest | printAddress |
|
|
|
+----------+----------------------+------------+----------+----------+-----------------+--------------------------------+--------------------------------+
|
|
|
| 1003 | 2015-07-26 01:16:28 | 0 | false | true | 0x42cc13a0 | GaOgnlUtilsTest | printAddress |
|
|
|
+----------+----------------------+------------+----------+----------+-----------------+--------------------------------+--------------------------------+
|
|
|
Affect(row-cnt:2) cost in 55 ms.
|
|
|
$
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
<p>Advanced:</p>
|
|
|
<div class="toctree-wrapper compound">
|
|
|
<ul>
|
|
|
<li class="toctree-l1"><a class="reference internal" href="advice-class.html">Critical fields in expression</a></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="section" id="check-context-of-the-call">
|
|
|
<span id="check-context-of-the-call"></span><h2>Check context of the call<a class="headerlink" href="#check-context-of-the-call" title="Permalink to this headline">¶</a></h2>
|
|
|
<p>Using <code class="docutils literal notranslate"><span class="pre">tt</span> <span class="pre">-i</span> <span class="pre"><index></span></code> to check a specific calling details.</p>
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$
|
|
|
$ tt -i 1003
|
|
|
+-----------------+------------------------------------------------------------------------------------------------------+
|
|
|
| INDEX | 1003 |
|
|
|
+-----------------+------------------------------------------------------------------------------------------------------+
|
|
|
| GMT-CREATE | 2015-07-26 01:16:28 |
|
|
|
+-----------------+------------------------------------------------------------------------------------------------------+
|
|
|
| COST(ms) | 0 |
|
|
|
+-----------------+------------------------------------------------------------------------------------------------------+
|
|
|
| OBJECT | 0x42cc13a0 |
|
|
|
+-----------------+------------------------------------------------------------------------------------------------------+
|
|
|
| CLASS | GaOgnlUtilsTest |
|
|
|
+-----------------+------------------------------------------------------------------------------------------------------+
|
|
|
| METHOD | printAddress |
|
|
|
+-----------------+------------------------------------------------------------------------------------------------------+
|
|
|
| IS-RETURN | false |
|
|
|
+-----------------+------------------------------------------------------------------------------------------------------+
|
|
|
| IS-EXCEPTION | true |
|
|
|
+-----------------+------------------------------------------------------------------------------------------------------+
|
|
|
| PARAMETERS[0] | Address@53448f87 |
|
|
|
+-----------------+------------------------------------------------------------------------------------------------------+
|
|
|
| THROW-EXCEPTION | java.lang.RuntimeException: test |
|
|
|
| | at GaOgnlUtilsTest.printAddress(Unknown Source) |
|
|
|
| | at GaOgnlUtilsTest.<init>(Unknown Source) |
|
|
|
| | at GaOgnlUtilsTest.main(Unknown Source) |
|
|
|
+-----------------+------------------------------------------------------------------------------------------------------+
|
|
|
Affect(row-cnt:1) cost in 1 ms.
|
|
|
$
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="section" id="re-produce">
|
|
|
<span id="re-produce"></span><h2>Re-produce<a class="headerlink" href="#re-produce" title="Permalink to this headline">¶</a></h2>
|
|
|
<p>Since Arthas stores the context of the call, you can even <em>replay</em> the method calling afterwards with extra option <code class="docutils literal notranslate"><span class="pre">-p</span></code> to re-produce the issue for advanced troubleshooting.</p>
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ tt -i 1003 -p
|
|
|
+-----------------+---------------------------------------------------------------------------------------------------------+
|
|
|
| RE-INDEX | 1003 |
|
|
|
+-----------------+---------------------------------------------------------------------------------------------------------+
|
|
|
| GMT-REPLAY | 2015-07-26 17:29:51 |
|
|
|
+-----------------+---------------------------------------------------------------------------------------------------------+
|
|
|
| OBJECT | 0x42cc13a0 |
|
|
|
+-----------------+---------------------------------------------------------------------------------------------------------+
|
|
|
| CLASS | GaOgnlUtilsTest |
|
|
|
+-----------------+---------------------------------------------------------------------------------------------------------+
|
|
|
| METHOD | printAddress |
|
|
|
+-----------------+---------------------------------------------------------------------------------------------------------+
|
|
|
| PARAMETERS[0] | Address@53448f87 |
|
|
|
+-----------------+---------------------------------------------------------------------------------------------------------+
|
|
|
| IS-RETURN | false |
|
|
|
+-----------------+---------------------------------------------------------------------------------------------------------+
|
|
|
| IS-EXCEPTION | true |
|
|
|
+-----------------+---------------------------------------------------------------------------------------------------------+
|
|
|
| THROW-EXCEPTION | java.lang.RuntimeException: test |
|
|
|
| | at GaOgnlUtilsTest.printAddress(GaOgnlUtilsTest.java:78) |
|
|
|
| | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) |
|
|
|
| | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) |
|
|
|
| | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) |
|
|
|
| | at java.lang.reflect.Method.invoke(Method.java:483) |
|
|
|
| | at com.github.ompc.Arthas.util.GaMethod.invoke(GaMethod.java:81) |
|
|
|
| | at com.github.ompc.Arthas.command.TimeTunnelCommand$6.action(TimeTunnelCommand.java:592) |
|
|
|
| | at com.github.ompc.Arthas.server.DefaultCommandHandler.execute(DefaultCommandHandler.java:175) |
|
|
|
| | at com.github.ompc.Arthas.server.DefaultCommandHandler.executeCommand(DefaultCommandHandler.java:83) |
|
|
|
| | at com.github.ompc.Arthas.server.GaServer$4.run(GaServer.java:329) |
|
|
|
| | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) |
|
|
|
| | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) |
|
|
|
| | at java.lang.Thread.run(Thread.java:745) |
|
|
|
+-----------------+---------------------------------------------------------------------------------------------------------+
|
|
|
replay time fragment[1003] success.
|
|
|
Affect(row-cnt:1) cost in 3 ms.
|
|
|
$
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
<p>F.Y.I</p>
|
|
|
<ol class="simple">
|
|
|
<li>the calling stack is little different using Arthas now unlike the original;</li>
|
|
|
<li><strong>Loss</strong> of the thread local variables will be a undeniable fact since there is no way for Arthas to record the thread local info (<em>If you find one, please share with us in <a class="reference external" href="https://github.com/alibaba/arthas/issues">issues tracker</a></em>).</li>
|
|
|
<li><strong>Potential</strong> modifications of objects can happen since only a reference will be recorded while later operations might modify objects without Arthas’s watch.</li>
|
|
|
</ol>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
<footer>
|
|
|
|
|
|
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
|
|
|
|
|
<a href="options.html" class="btn btn-neutral float-right" title="options" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
|
|
|
|
|
|
|
|
<a href="stack.html" class="btn btn-neutral" title="stack" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
<hr/>
|
|
|
|
|
|
<div role="contentinfo">
|
|
|
<p>
|
|
|
© Copyright 2018, Alibaba Middleware Group, and contributors.
|
|
|
|
|
|
</p>
|
|
|
</div>
|
|
|
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
|
|
|
|
|
</footer>
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
var DOCUMENTATION_OPTIONS = {
|
|
|
URL_ROOT:'./',
|
|
|
VERSION:'3.0.6-SNAPSHOT',
|
|
|
LANGUAGE:'en',
|
|
|
COLLAPSE_INDEX:false,
|
|
|
FILE_SUFFIX:'.html',
|
|
|
HAS_SOURCE: true,
|
|
|
SOURCELINK_SUFFIX: '.txt'
|
|
|
};
|
|
|
</script>
|
|
|
<script type="text/javascript" src="_static/jquery.js"></script>
|
|
|
<script type="text/javascript" src="_static/underscore.js"></script>
|
|
|
<script type="text/javascript" src="_static/doctools.js"></script>
|
|
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript" src="_static/js/theme.js"></script>
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
jQuery(function () {
|
|
|
SphinxRtdTheme.Navigation.enable(true);
|
|
|
});
|
|
|
</script>
|
|
|
<div class="github-fork-ribbon-wrapper right">
|
|
|
<div class="github-fork-ribbon">
|
|
|
<a href="https://github.com/alibaba/arthas">Fork me at GitHub</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<script type="text/javascript" src="_static/add_badges.js"></script>
|
|
|
|
|
|
<script>
|
|
|
var _hmt = _hmt || [];
|
|
|
(function() {
|
|
|
var hm = document.createElement("script");
|
|
|
hm.src = "https://hm.baidu.com/hm.js?d5c5e25b100f0eb51a4c35c8a86ea9b4";
|
|
|
var s = document.getElementsByTagName("script")[0];
|
|
|
s.parentNode.insertBefore(hm, s);
|
|
|
})();
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
</html> |