diff options
Diffstat (limited to 'dev-util/visualvm/files')
-rw-r--r-- | dev-util/visualvm/files/visualvm-r2.conf | 9 | ||||
-rw-r--r-- | dev-util/visualvm/files/visualvm-r2.sh | 13 |
2 files changed, 22 insertions, 0 deletions
diff --git a/dev-util/visualvm/files/visualvm-r2.conf b/dev-util/visualvm/files/visualvm-r2.conf new file mode 100644 index 000000000000..214cb55b8674 --- /dev/null +++ b/dev-util/visualvm/files/visualvm-r2.conf @@ -0,0 +1,9 @@ +# Default user directory +visualvm_default_userdir="${HOME}/.visualvm" +visualvm_default_cachedir="${HOME}/.cache/visualvm" + +# Default runtime options +visualvm_default_options="-J-client -J-Xms24m -J-Xmx768m -J-Dnetbeans.accept_license_class=org.graalvm.visualvm.modules.startup.AcceptLicense -J-Dnetbeans.importclass=org.graalvm.visualvm.modules.startup.ImportSettings -J-Dsun.jvmstat.perdata.syncWaitMs=10000 -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.d3d=false -J-Dorg.netbeans.core.TimeableEventQueue.quantum=360000 -J-Dpolyglot.js.nashorn-compat=true -J-Dsun.misc.URLClassPath.disableJarChecking=true -J--add-exports=java.desktop/sun.awt=ALL-UNNAMED -J--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor.event=ALL-UNNAMED -J--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED -J--add-exports=java.desktop/sun.swing=ALL-UNNAMED -J--add-exports=jdk.attach/sun.tools.attach=ALL-UNNAMED -J--add-opens=java.base/java.net=ALL-UNNAMED -J--add-opens=java.base/java.lang.ref=ALL-UNNAMED -J--add-opens=java.base/java.lang=ALL-UNNAMED -J--add-opens=java.desktop/javax.swing=ALL-UNNAMED -J--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED -J-XX:+IgnoreUnrecognizedVMOptions" + +# JDK home +visualvm_jdkhome="$(java-config -O)" diff --git a/dev-util/visualvm/files/visualvm-r2.sh b/dev-util/visualvm/files/visualvm-r2.sh new file mode 100644 index 000000000000..d5ab8737c7f1 --- /dev/null +++ b/dev-util/visualvm/files/visualvm-r2.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# source the configuration file +. /etc/visualvm/visualvm.conf + +# launch visualvm +exec sh /usr/share/visualvm/platform/lib/nbexec \ + --branding visualvm \ + --jdkhome "${visualvm_jdkhome}" \ + --userdir "${visualvm_default_userdir}" \ + --cachedir "${visualvm_default_cachedir}" \ + --clusters /usr/share/visualvm/cluster:/usr/share/visualvm/harness:/usr/share/visualvm/platform \ + ${visualvm_default_options} "${@}" |