Merge branch 'master' into bytekit

This commit is contained in:
hengyunabc
2020-05-20 03:28:09 +08:00
14 changed files with 42 additions and 14 deletions
+1
View File
@@ -19,3 +19,4 @@ site/src/site/sphinx/en/_build
**/__pycache__
dependency-reduced-pom.xml
pom.xml.versionsBackup
+3 -2
View File
@@ -509,6 +509,7 @@ Welcome to register the company name in this issue: https://github.com/alibaba/a
![上海喔噻](static/shouqingba.png)
![vipkid](static/vipkid.png)
![宇中科技](static/yuzhong.png)
![蘑菇财富](static/mogu.jpg)
### Derivative Projects
@@ -526,9 +527,9 @@ This project exists thanks to all the people who contribute.
#### Projects
* [greys-anatomy](https://github.com/oldmanpushcart/greys-anatomy): The Arthas code base has derived from Greys, we thank for the excellent work done by Greys.
* [termd](https://github.com/termd/termd): Arthas's terminal implementation is based on termd, an open source library for writing terminal applications in Java.
* [termd](https://github.com/alibaba/termd): Arthas's terminal implementation is based on termd, an open source library for writing terminal applications in Java.
* [crash](https://github.com/crashub/crash): Arthas's text based user interface rendering is based on codes extracted from [here](https://github.com/crashub/crash/tree/1.3.2/shell)
* [cli](https://github.com/eclipse-vertx/vert.x/tree/master/src/main/java/io/vertx/core/cli): Arthas's command line interface implementation is based on cli, open sourced by vert.x
* [cli](https://github.com/alibaba/cli): Arthas's command line interface implementation is based on cli, open sourced by vert.x
* [compiler](https://github.com/skalogs/SkaETL/tree/master/compiler) Arthas's memory compiler.
* [Apache Commons Net](https://commons.apache.org/proper/commons-net/) Arthas's telnet client.
* [async-profiler](https://github.com/jvm-profiling-tools/async-profiler) Arthas's profiler command.
+4 -3
View File
@@ -498,6 +498,7 @@ OK
![上海喔噻](static/shouqingba.png)
![vipkid](static/vipkid.png)
![宇中科技](static/yuzhong.png)
![蘑菇财富](static/mogu.jpg)
### 洐生项目
@@ -516,10 +517,10 @@ OK
#### Projects
* [greys-anatomy](https://github.com/oldmanpushcart/greys-anatomy): Arthas代码基于Greys二次开发而来,非常感谢Greys之前所有的工作,以及Greys原作者对Arthas提出的意见和建议!
* [termd](https://github.com/termd/termd): Arthas的命令行实现基于termd开发,是一款优秀的命令行程序开发框架,感谢termd提供了优秀的框架。
* [termd](https://github.com/alibaba/termd): Arthas的命令行实现基于termd开发,是一款优秀的命令行程序开发框架,感谢termd提供了优秀的框架。
* [crash](https://github.com/crashub/crash): Arthas的文本渲染功能基于crash中的文本渲染功能开发,可以从[这里](https://github.com/crashub/crash/tree/1.3.2/shell)看到源码,感谢crash在这方面所做的优秀工作。
* [cli](https://github.com/eclipse-vertx/vert.x/tree/master/src/main/java/io/vertx/core/cli): Arthas的命令行界面基于vert.x提供的cli库进行开发,感谢vert.x在这方面做的优秀工作。
* [compiler](https://github.com/skalogs/SkaETL/tree/master/compiler) Arthas里的内存编器代码来源
* [cli](https://github.com/alibaba/cli): Arthas的命令行界面基于vert.x提供的cli库进行开发,感谢vert.x在这方面做的优秀工作。
* [compiler](https://github.com/skalogs/SkaETL/tree/master/compiler) Arthas里的内存编器代码来源
* [Apache Commons Net](https://commons.apache.org/proper/commons-net/) Arthas里的Telnet Client代码来源
* [async-profiler](https://github.com/jvm-profiling-tools/async-profiler) Arthas's profiler 命令.
@@ -77,7 +77,7 @@ public class AgentBootstrap {
Class<?> spyClass = null;
if (parent != null) {
try {
parent.loadClass("java.arthas.SpyAPI");
spyClass =parent.loadClass("java.arthas.SpyAPI");
} catch (Throwable e) {
// ignore
}
@@ -75,6 +75,7 @@ public class Arthas {
String pid = descriptor.id();
if (pid.equals(Long.toString(configure.getJavaPid()))) {
virtualMachineDescriptor = descriptor;
break;
}
}
VirtualMachine virtualMachine = null;
@@ -29,7 +29,7 @@ public class HistoryCommand extends AnnotatedCommand {
boolean clear = false;
int n = -1;
@Option(shortName = "c", longName = "clear")
@Option(shortName = "c", longName = "clear", flag = true , acceptValue = false)
@Description("clear history")
public void setClear(boolean clear) {
this.clear = clear;
@@ -56,7 +56,7 @@ public class HistoryCommand extends AnnotatedCommand {
StringBuilder sb = new StringBuilder();
int size = history.size();
if (n < 0) {
if (n < 0 || n > size) {
n = size;
}
@@ -81,7 +81,7 @@ public class LoggerCommand extends AnnotatedCommand {
private String level;
/**
* include the logger don't have appender, default false.
* include the loggers which don't have appenders, default false.
*/
private boolean includeNoAppender;
@@ -104,7 +104,7 @@ public class LoggerCommand extends AnnotatedCommand {
}
@Option(longName = "include-no-appender", flag = true)
@Description("include the loggers don't have appender, default value false")
@Description("include the loggers which don't have appenders, default value false")
public void setHaveAppender(boolean includeNoAppender) {
this.includeNoAppender = includeNoAppender;
}
@@ -10,6 +10,7 @@ import com.taobao.arthas.core.shell.command.CommandProcess;
import com.taobao.arthas.core.util.SearchUtils;
import com.taobao.arthas.core.util.matcher.Matcher;
import com.taobao.middleware.cli.annotations.Argument;
import com.taobao.middleware.cli.annotations.DefaultValue;
import com.taobao.middleware.cli.annotations.Description;
import com.taobao.middleware.cli.annotations.Name;
import com.taobao.middleware.cli.annotations.Option;
@@ -54,7 +55,8 @@ public class WatchCommand extends EnhancerCommand {
this.methodPattern = methodPattern;
}
@Argument(index = 2, argName = "express")
@Argument(index = 2, argName = "express", required = false)
@DefaultValue("{params, target, returnObj}")
@Description("the content you want to watch, written by ognl.\n" + Constants.EXPRESS_EXAMPLES)
public void setExpress(String express) {
this.express = express;
+20
View File
@@ -231,6 +231,26 @@
</pluginManagement>
<plugins>
<!-- git commit info -->
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<verbose>false</verbose>
<dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>${project.build.outputDirectory}/arthas-git.properties</generateGitPropertiesFilename>
<excludeProperties>git.build.host</excludeProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
+1 -1
View File
@@ -41,7 +41,7 @@
* [sc](sc.md)——查看JVM已加载的类信息
* [sm](sm.md)——查看已加载类的方法信息
* [jad](jad.md)——反编译指定已加载类的源码
* [mc](mc.md)——内存编器,内存编`.java`文件为`.class`文件
* [mc](mc.md)——内存编器,内存编`.java`文件为`.class`文件
* [redefine](redefine.md)——加载外部的`.class`文件,redefine到JVM里
* [dump](dump.md)——dump 已加载类的 byte code 到特定目录
* [classloader](classloader.md)——查看classloader的继承树,urls,类加载信息,使用classloader去getResource
+2 -1
View File
@@ -62,4 +62,5 @@ cache location : /Users/gehui/logs/arthas-cache/28198/2
## 7. 其他
* 最多同时支持8个命令使用重定向将结果写日志
* 请勿同时开启过多的后台异步命令,以免对目标JVM性能造成影响
* 请勿同时开启过多的后台异步命令,以免对目标JVM性能造成影响
* 如果不想停止arthas,继续执行后台任务,可以执行 `quit` 退出arthas控制台(`stop` 会停止arthas 服务)
+1
View File
@@ -78,3 +78,4 @@ If you want to stop background job, just `kill <job-id>`.
* Support up to 8 commands at the same time to redirect the output to the log files.
* Do not open too many background jobs at the same time to avoid negative performance effect to the target JVM.
* If you do not want to stop the Arthas service and continue to perform background tasks, you can exit the Arthas console by executing `quit` command (`stop` command will stop the Arthas service)
+1 -1
View File
@@ -52,7 +52,7 @@ CharSequence {
...
```
#### 反编时只显示源代码
#### 反编时只显示源代码
默认情况下,反编译结果里会带有`ClassLoader`信息,通过`--source-only`选项,可以只打印源代码。方便和[mc](mc.md)/[redefine](redefine.md)命令结合使用。
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB