diff --git a/en/.buildinfo b/en/.buildinfo
index a43bf9c34..9b9b3c066 100644
--- a/en/.buildinfo
+++ b/en/.buildinfo
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: 5284b8e171e90cb633fef8fe68031aa1
+config: 9f7cecd0264d1aac1ed1c3ad3f11ca41
tags: 645f666f9bcd5a90fca523b33c5a78b7
diff --git a/en/README.html b/en/README.html
index 9c78bbc49..5c411d31c 100644
--- a/en/README.html
+++ b/en/README.html
@@ -8,7 +8,7 @@
- <no title> — Arthas ${revision} documentation
+ <no title> — Arthas 3.4.6 documentation
@@ -71,7 +71,7 @@
- ${revision}
+ 3.4.6
diff --git a/en/_sources/advanced-use.md.txt b/en/_sources/advanced-use.md.txt
index 5b8194e74..6464c02c0 100644
--- a/en/_sources/advanced-use.md.txt
+++ b/en/_sources/advanced-use.md.txt
@@ -8,6 +8,7 @@ Advanced Usage
* [cat](cat.md) - Concatenate and print files
* [echo](echo.md) - write arguments to the standard output
* [grep](grep.md) - Pattern searcher
+* [base64](base64.md) - Encode and decode using Base64 representation.
* [tee](tee.md) - Copies standard input to standard output, making a copy in zero or more files.
* [pwd](pwd.md) - Return working directory name
* session - display current session information
@@ -39,6 +40,7 @@ Advanced Usage
* [sm](sm.md) - check methods info for the loaded classes
* [jad](jad.md) - decompile the specified loaded classes
* [mc](mc.md) - Memory compiler, compiles `.java` files into `.class` files in memory
+* [retransform](retransform.md) - load external `*.class` files and retransform it into JVM
* [redefine](redefine.md) - load external `*.class` files and re-define it into JVM
* [dump](dump.md) - dump the loaded classes in byte code to the specified location
* [classloader](classloader.md) - check the inheritance structure, urls, class loading info for the specified class; using classloader to get the url of the resource e.g. `java/lang/String.class`
diff --git a/en/_sources/commands.md.txt b/en/_sources/commands.md.txt
index f60729ee3..13a35189c 100644
--- a/en/_sources/commands.md.txt
+++ b/en/_sources/commands.md.txt
@@ -22,6 +22,7 @@ All Commands
* [jad](jad.md)
* [classloader](classloader.md)
* [mc](mc.md)
+* [retransform](retransform.md)
* [redefine](redefine.md)
* [monitor](monitor.md)
@@ -35,6 +36,7 @@ All Commands
* [cat](cat.md)
* [echo](echo.md)
* [grep](grep.md)
+* [base64](base64.md)
* [tee](tee.md)
* [pwd](pwd.md)
* [options](options.md)
diff --git a/en/_sources/faq.md.txt b/en/_sources/faq.md.txt
index 36e2de12f..cb9f8beb5 100644
--- a/en/_sources/faq.md.txt
+++ b/en/_sources/faq.md.txt
@@ -8,6 +8,17 @@
[https://github.com/alibaba/arthas/issues/44](https://github.com/alibaba/arthas/issues/44)
+##### Can commands such as trace/watch enhance the classes in jdk?
+
+By default, classes beginning with `java.` are filtered out, but they can be turned on:
+
+```bash
+options unsafe true
+```
+
+See more at [options](options.md)
+
+
##### How to view the result in `json` format
```bash
@@ -24,3 +35,29 @@ No.
##### Can arthas view the value of a variable in memory?
No. But you can use some tricks to intercept the object with the `tt` command, or fetch it from a static method.
+
+
+##### How to filter method with the same name?
+
+You can used all variables in [fundamental fields in expressions](advice-class.md) for the condition express to filter method with the same name, you can use the number of parameters `params.length ==1`,parameter type `params[0] instanceof java.lang.Integer`,return value type `returnObj instanceof java.util.List` and so on in one or more combinations as condition express.
+
+You can use `-v` to view the condition express result [https://github.com/alibaba/arthas/issues/1348](https://github.com/alibaba/arthas/issues/1348)
+
+example [arthas-demo](quick-start.md)
+
+```bash
+watch demo.MathGame primeFactors traceE '{params,returnObj,throwExp}' -v -n 5 -x 3 'params.length >0 && returnObj instanceof java.util.List'
+```
+
+##### How to watch or trace constructor?
+
+```bash
+watch demo.MathGame '{params,returnObj,throwExp}' -v -n 5 -x 3 '1==1'
+```
+
+
+##### java.lang.ClassFormatError: null, skywalking arthas compatible use
+
+When error log appear `java.lang.ClassFormatError: null`, it is usually modified by other bytecode tools that are not compatible with arthas modified bytecode.
+
+For example: use skywalking V8.1.0 below [cannot trace, watch classes enhanced by skywalking agent](https://github.com/alibaba/arthas/issues/1141), V8.1.0 or above is compatible, refer to skywalking configuration for more details. [skywalking compatible with other javaagent bytecode processing](https://github.com/apache/skywalking/blob/v8.1.0/docs/en/FAQ/Compatible-with-other-javaagent-bytecode-processing.md).
\ No newline at end of file
diff --git a/en/_sources/jad.md.txt b/en/_sources/jad.md.txt
index 4c7347bec..839b61a1b 100644
--- a/en/_sources/jad.md.txt
+++ b/en/_sources/jad.md.txt
@@ -57,7 +57,7 @@ CharSequence {
#### Print source only
-By default, the decompile result will have the `ClassLoader` information. With the `--source-only` option, you can print only the source code. Conveniently used with the [mc](mc.md)/[redefine](redefine.md) commands.
+By default, the decompile result will have the `ClassLoader` information. With the `--source-only` option, you can print only the source code. Conveniently used with the [mc](mc.md)/[retransform](retransform.md) commands.
```
$ jad --source-only demo.MathGame
diff --git a/en/_sources/mc.md.txt b/en/_sources/mc.md.txt
index 455b655f3..834e7163c 100644
--- a/en/_sources/mc.md.txt
+++ b/en/_sources/mc.md.txt
@@ -30,6 +30,6 @@ The output directory can be specified with the `-d` option:
mc -d /tmp/output /tmp/ClassA.java /tmp/ClassB.java
```
-After compiling the `.class` file, you can use the [redefine](redefine.md) command to re-define the loaded classes in JVM.
+After compiling the `.class` file, you can use the [retransform](retransform.md) command to re-define the loaded classes in JVM.
-> Note that the mc command may fail. If the compilation fails, the `.class` file can be compiled locally and uploaded to the server. Refer to the [redefine](redefine.md) command description for details.
\ No newline at end of file
+> Note that the mc command may fail. If the compilation fails, the `.class` file can be compiled locally and uploaded to the server. Refer to the [retransform](retransform.md) command description for details.
\ No newline at end of file
diff --git a/en/_sources/redefine.md.txt b/en/_sources/redefine.md.txt
index e1a36d48a..8573a50bf 100644
--- a/en/_sources/redefine.md.txt
+++ b/en/_sources/redefine.md.txt
@@ -1,6 +1,8 @@
redefine
========
+> Recommend to use the [retransform](retransform.md) command.
+
[`mc-redefine` online tutorial](https://arthas.aliyun.com/doc/arthas-tutorials?language=en&id=command-mc-redefine)
> Load the external `*.class` files to re-define the loaded classes in JVM.
@@ -9,6 +11,8 @@ Reference: [Instrumentation#redefineClasses](https://docs.oracle.com/javase/8/do
### Frequently asked questions
+> Recommend to use the [retransform](retransform.md) command.
+
* The class of `redefine` cannot modify, add or delete the field and method of the class, including method parameters, method names and return values.
* If `mc` fails, you can compile the class file in the local development environment, upload it to the target system, and use `redefine` to hot load the class.
@@ -29,7 +33,6 @@ Reference: [Instrumentation#redefineClasses](https://docs.oracle.com/javase/8/do
|---:|:---|
|`[c:]`|hashcode of the class loader|
|`[classLoaderClass:]`| The class name of the ClassLoader that executes the expression. |
-|`[p:]`|absolute path of the external `*.class`, multiple paths are separated with 'space'|
### Usage
diff --git a/en/_sources/tt.md.txt b/en/_sources/tt.md.txt
index 6c0845af6..da877a462 100644
--- a/en/_sources/tt.md.txt
+++ b/en/_sources/tt.md.txt
@@ -127,7 +127,7 @@ $ tt -i 1003
Affect(row-cnt:1) cost in 11 ms.
```
-### Replay record
+#### Replay record
Since Arthas stores the context of the call, you can even *replay* the method calling afterwards with extra option `-p` to replay the issue for advanced troubleshooting, option `--replay-times`
define the replay execution times, option `--replay-interval` define the interval(unit in ms,with default value 1000) of replays
@@ -152,13 +152,50 @@ Time fragment[1004] successfully replayed.
Affect(row-cnt:1) cost in 14 ms.
```
+#### Watch express
+
+`-w, --watch-express` watch the time fragment by ognl express.
+
+* You can used all variables in [fundamental fields in expressions](advice-class.md) for the watch express。
+
+```bash
+[arthas@10718]$ tt -t demo.MathGame run -n 5
+Press Q or Ctrl+C to abort.
+Affect(class count: 1 , method count: 1) cost in 56 ms, listenerId: 1
+ INDEX TIMESTAMP COST(ms) IS-RET IS-EXP OBJECT CLASS METHOD
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ 1000 2021-01-08 21:54:17 0.901091 true false 0x7699a589 MathGame run
+[arthas@10718]$ tt -w 'target.illegalArgumentCount' -x 1 -i 1000
+@Integer[60]
+Affect(row-cnt:1) cost in 7 ms.
+```
+
+* Get a static field and calling a static method
+
+```bash
+[arthas@10718]$ tt -t demo.MathGame run -n 5
+Press Q or Ctrl+C to abort.
+Affect(class count: 1 , method count: 1) cost in 56 ms, listenerId: 1
+ INDEX TIMESTAMP COST(ms) IS-RET IS-EXP OBJECT CLASS METHOD
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ 1000 2021-01-08 21:54:17 0.901091 true false 0x7699a589 MathGame run
+[arthas@10718]$ tt -w '@demo.MathGame@random.nextInt(100)' -x 1 -i 1000
+@Integer[46]
+```
+
+Note that `com.taobao.arthas.core.advisor.Advice#getLoader` is used here, and that it is better to use the exact `classloader` [ognl](ognl.md).
+
+
+Advanced usage [get spring context to call the bean method](https://github.com/alibaba/arthas/issues/482)
+
+
F.Y.I
1. **Loss** of the `ThreadLocal`
Arthas save params into an array, then invoke the method with the params again. The method execute in another thread, so the `ThreadLocal` **lost**.
-1. params may be modified
+2. params may be modified
Arthas save params into an array, they are object references. The Objects may be modified by other code.
diff --git a/en/_sources/watch.md.txt b/en/_sources/watch.md.txt
index c1d67bcde..56373011a 100644
--- a/en/_sources/watch.md.txt
+++ b/en/_sources/watch.md.txt
@@ -235,6 +235,23 @@ ts=2018-12-03 20:04:34; [cost=131.303498ms] result=@Integer[8]
ts=2018-12-03 20:04:35; [cost=0.961441ms] result=@Integer[8]
```
+#### Get a static field and calling a static method
+
+```bash
+watch demo.MathGame * '{params,@demo.MathGame@random.nextInt(100)}' -v -n 1 -x 2
+[arthas@6527]$ watch demo.MathGame * '{params,@demo.MathGame@random.nextInt(100)}' -n 1 -x 2
+Press Q or Ctrl+C to abort.
+Affect(class count: 1 , method count: 5) cost in 34 ms, listenerId: 3
+ts=2021-01-05 21:35:20; [cost=0.173966ms] result=@ArrayList[
+ @Object[][
+ @Integer[-138282],
+ ],
+ @Integer[89],
+]
+```
+
+* Note that here you use `Thread.currentThread().getContextClassLoader()` to load, and it is better to use the exact `classloader` [ognl](ognl.md).
+
#### Exclude the specified class
diff --git a/en/_static/documentation_options.js b/en/_static/documentation_options.js
index 5521447a4..2bd35aa0d 100644
--- a/en/_static/documentation_options.js
+++ b/en/_static/documentation_options.js
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
- VERSION: '${revision}',
+ VERSION: '3.4.6',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
diff --git a/en/advanced-use.html b/en/advanced-use.html
index ae5f03f6d..4e33e70f1 100644
--- a/en/advanced-use.html
+++ b/en/advanced-use.html
@@ -8,7 +8,7 @@
- Advanced Usage — Arthas ${revision} documentation
+ Advanced Usage — Arthas 3.4.6 documentation
@@ -73,7 +73,7 @@
mc - Memory compiler, compiles .java files into .class files in memory
+
retransform - load external *.class files and retransform it into JVM
redefine - load external *.class files and re-define it into JVM
dump - dump the loaded classes in byte code to the specified location
classloader - check the inheritance structure, urls, class loading info for the specified class; using classloader to get the url of the resource e.g. java/lang/String.class
diff --git a/en/advice-class.html b/en/advice-class.html
index 2825c4590..ad9b26761 100644
--- a/en/advice-class.html
+++ b/en/advice-class.html
@@ -8,7 +8,7 @@
- Fundamental Fields in Expressions — Arthas ${revision} documentation
+ Fundamental Fields in Expressions — Arthas 3.4.6 documentation
@@ -73,7 +73,7 @@
You can used all variables in fundamental fields in expressions for the condition express to filter method with the same name, you can use the number of parameters params.length==1,parameter type params[0]instanceofjava.lang.Integer,return value type returnObjinstanceofjava.util.List and so on in one or more combinations as condition express.
When error log appear java.lang.ClassFormatError:null, it is usually modified by other bytecode tools that are not compatible with arthas modified bytecode.