update options.md

This commit is contained in:
hengyunabc
2021-04-10 00:24:28 +08:00
parent 9236c8f748
commit 2465251d32
2 changed files with 34 additions and 0 deletions
+17
View File
@@ -83,3 +83,20 @@ $ options save-result true
----------------------------------------
save-result false true
```
### Set `unsafe` to true to enhance the classes under the `java.*` package
By default, `watch`/`trace`/`tt`/`trace`/`monitor` command do not support classes under `java.*` package. You can set `unsafe` to true to enhance the classes under the `java.*` package.
```bash
$ options unsafe true
NAME BEFORE-VALUE AFTER-VALUE
-----------------------------------
unsafe false true
```
```bash
$ watch java.lang.invoke.Invokers callSiteForm
Press Q or Ctrl+C to abort.
Affect(class count: 1 , method count: 1) cost in 61 ms, listenerId: 1
```
+17
View File
@@ -79,3 +79,20 @@ $ options save-result true
----------------------------------------
save-result false true
```
### 打开unsafe开关,支持jdk package下的类
默认情况下,`watch`/`trace`/`tt`/`trace`/`monitor`等命令不支持`java.*` package下的类。可以设置`unsafe`为true,则可以增强。
```bash
$ options unsafe true
NAME BEFORE-VALUE AFTER-VALUE
-----------------------------------
unsafe false true
```
```bash
$ watch java.lang.invoke.Invokers callSiteForm
Press Q or Ctrl+C to abort.
Affect(class count: 1 , method count: 1) cost in 61 ms, listenerId: 1
```