update profiler docs. #1478 #1479

This commit is contained in:
hengyunabc 2020-09-14 17:32:04 +08:00
parent 4972f64713
commit bcbd5924e6
2 changed files with 92 additions and 0 deletions

View File

@ -181,3 +181,49 @@ $ profiler version
Async-profiler 1.6 built on Sep 9 2019
Copyright 2019 Andrei Pangin
```
### Configure framebuf option
> If you encounter `[frame_buffer_overflow]` in the generated svg image, you need to increase the framebuf (the default value is 1'000'000), which can be configured explicitly, such as:
```bash
profiler start --framebuf 5000000
```
### Configure include/exclude to filter data
If the application is complex and generates a lot of content, and you want to focus on only part of the data, you can filter by include/exclude. such as
```bash
profiler start --include'java/*' --include'demo/*' --exclude'*Unsafe.park*'
```
> Both include/exclude support setting multiple values, but need to be configured at the end of the command line.
### Specify execution time
For example, if you want the profiler to automatically end after 300 seconds, you can specify it with the `-d`/`--duration` parameter:
```bash
profiler start --duration 300
```
### Generate jfr format result
> Note that jfr only supports configuration at `start`. If it is specified at `stop`, it will not take effect.
```
profiler start --file /tmp/test.jfr
```
The `file` parameter supports some variables:
* Timestamp: `--file /tmp/test-%t.jfr`
* Process ID: `--file /tmp/test-%p.jfr`
The generated results can be viewed with tools that support the jfr format. such as:
* JDK Mission Control: https://github.com/openjdk/jmc
* JProfiler: https://github.com/alibaba/arthas/issues/1416

View File

@ -183,3 +183,49 @@ $ profiler version
Async-profiler 1.6 built on Sep 9 2019
Copyright 2019 Andrei Pangin
```
### 配置 framebuf 参数
> 如果遇到生成的svg图片有 `[frame_buffer_overflow]`,则需要增大 framebuf默认值是 1'000'000可以显式配置比如
```bash
profiler start --framebuf 5000000
```
### 配置 include/exclude 来过滤数据
如果应用比较复杂,生成的内容很多,想只关注部分数据,可以通过 include/exclude 来过滤。比如
```bash
profiler start --include 'java/*' --include 'demo/*' --exclude '*Unsafe.park*'
```
> include/exclude 都支持设置多个值 ,但是需要配置在命令行的最后。
### 指定执行时间
比如希望profiler执行 300 秒自动结束,可以用 `-d`/`--duration` 参数指定:
```bash
profiler start --duration 300
```
### 生成 jfr格式结果
> 注意jfr只支持在 `start`时配置。如果是在`stop`时指定,则不会生效。
```
profiler start --file /tmp/test.jfr
```
`file`参数支持一些变量:
* 时间戳: `--file /tmp/test-%t.jfr`
* 进程ID `--file /tmp/test-%p.jfr`
生成的结果可以用支持jfr格式的工具来查看。比如
* JDK Mission Control https://github.com/openjdk/jmc
* JProfiler https://github.com/alibaba/arthas/issues/1416