Skip to content

Commit

Permalink
GH2577: Add '-Xlog:jni+resolve=off' to the default vmargs (redhat-dev…
Browse files Browse the repository at this point in the history
…eloper#2646)

* Add '-Xlog:jni+resolve' to vmargs dynamically

Signed-off-by: Jinbo Wang <[email protected]>
  • Loading branch information
testforstephen authored and gayanper committed Sep 8, 2022
1 parent 0964b02 commit b11a6cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@
"string",
"null"
],
"default": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m",
"description": "Specifies extra VM arguments used to launch the Java Language Server. Eg. use `-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m ` to optimize memory usage with the parallel garbage collector",
"default": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -Xlog:jni+resolve=off",
"description": "Specifies extra VM arguments used to launch the Java Language Server. Eg. use `-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -Xlog:jni+resolve=off` to optimize memory usage with the parallel garbage collector",
"scope": "machine-overridable"
},
"java.errors.incompleteClasspath.severity": {
Expand Down
3 changes: 3 additions & 0 deletions src/javaServerStarter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ function prepareParams(requirements: RequirementsData, javaConfiguration, worksp
params.push(watchParentProcess + 'false');
}
}
if (vmargs.indexOf('-Xlog:jni+resolve=') < 0) {
params.push('-Xlog:jni+resolve=off');
}

parseVMargs(params, vmargs);

Expand Down

0 comments on commit b11a6cf

Please sign in to comment.