update doc

This commit is contained in:
hengyunabc committed 2019-02-18 18:46:28 +08:00
1 parent 8fc6eef6dd
commit 8442038be4
96 files changed
+252 -146

No files matched your search

+5 -2
View File
@@ -5,6 +5,8 @@ Advanced Usage
* help - display Arthas help
* cls - clear the screen
* [cat](cat.md) - Concatenate and print files
* [pwd](pwd.md) - Return working directory name
* session - display current session information
* [reset](reset.md) - reset all the enhanced classes. All enhanced classes will also be reset when Arthas server is closed by `shutdown`
* version - print the version for the Arthas attached to the current Java process
@@ -27,9 +29,10 @@ Advanced Usage
* [sc](sc.md) - check the info for the classes loaded by JVM
* [sm](sm.md) - check methods info for the loaded classes
* [dump](dump.md) - dump the loaded classes in byte code to the specified location
* [redefine](redefine.md) - load external `*.class` files and re-define it into JVM
* [jad](jad.md) - decompile the specified loaded classes
* [mc](mc.md) - Memory compiler, compiles `.java` files into `.class` files in memory
* [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`
## monitor/watch/trace - related
+1 -1
View File
@@ -38,8 +38,8 @@ Arthas is built to solve these issues. A developer can troubleshoot production i
Contents
--------
* [Installation](install-detail.md)
* [Online tutorials(Recommend)](https://alibaba.github.io/arthas/arthas-tutorials?language=en)
* [Installation](install-detail.md)
* [Quick start](quick-start.md)
* [Advanced usage](advanced-use.md)
* [Commands](commands.md)
+24
View File
@@ -52,6 +52,30 @@ 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.
```
$ jad --source-only demo.MathGame
/*
* Decompiled with CFR 0_132.
*/
package demo;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
import java.util.concurrent.TimeUnit;
public class MathGame {
private static Random random = new Random();
public int illegalArgumentCount = 0;
...
```
#### Decompile the specified method
```java
+1 -1
View File
@@ -1,7 +1,7 @@
mc
===
> Memory compiler, compiles java files into bytecode and class files in memory.
> Memory compiler, compiles `.java` files into `.class` files in memory.
```bash
mc /tmp/Test.java
+1 -1
View File
@@ -1,7 +1,7 @@
redefine
========
> Load the external `*.class` files to re-define the loaded peer class in JVM.
> Load the external `*.class` files to re-define the loaded classes in JVM.
Reference: [Instrumentation#redefineClasses](https://docs.oracle.com/javase/8/docs/api/java/lang/instrument/Instrumentation.html#redefineClasses-java.lang.instrument.ClassDefinition...-)