diff --git a/site/src/site/sphinx/en/options.md b/site/src/site/sphinx/en/options.md index 3a5938e44..21a8a7108 100644 --- a/site/src/site/sphinx/en/options.md +++ b/site/src/site/sphinx/en/options.md @@ -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 +``` \ No newline at end of file diff --git a/site/src/site/sphinx/options.md b/site/src/site/sphinx/options.md index a5bc4e599..5db02d86e 100644 --- a/site/src/site/sphinx/options.md +++ b/site/src/site/sphinx/options.md @@ -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 +```