You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2014/07/25 15:49:38 UTC

git commit: [KARAF-3073] Document how to use jVisualVM profiler

Repository: karaf
Updated Branches:
  refs/heads/master 3f91b16f0 -> 414052012


[KARAF-3073] Document how to use jVisualVM profiler


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/41405201
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/41405201
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/41405201

Branch: refs/heads/master
Commit: 414052012eab5cabb74e005aa33ff9a5cf02aa5b
Parents: 3f91b16
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Fri Jul 25 15:42:56 2014 +0200
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Fri Jul 25 15:42:56 2014 +0200

----------------------------------------------------------------------
 .../resources/etc/config.properties             | 13 ++++++++
 .../main/webapp/developers-guide/debugging.conf | 31 ++++++++++++++------
 2 files changed, 35 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/41405201/assemblies/features/framework/src/main/filtered-resources/resources/etc/config.properties
----------------------------------------------------------------------
diff --git a/assemblies/features/framework/src/main/filtered-resources/resources/etc/config.properties b/assemblies/features/framework/src/main/filtered-resources/resources/etc/config.properties
index 4a08f73..2c80afe 100644
--- a/assemblies/features/framework/src/main/filtered-resources/resources/etc/config.properties
+++ b/assemblies/features/framework/src/main/filtered-resources/resources/etc/config.properties
@@ -146,6 +146,19 @@ eecap-1.2= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1", \
 #
 org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,org.apache.karaf.jaas.boot.principal,org.apache.karaf.management.boot,sun.*,com.sun.*,javax.transaction,javax.transaction.*,javax.xml.crypto,javax.xml.crypto.*,org.apache.xerces.jaxp.datatype,org.apache.xerces.stax,org.apache.xerces.parsers,org.apache.xerces.jaxp,org.apache.xerces.jaxp.validation,org.apache.xerces.dom
 
+# jVisualVM support
+# in order to use Karaf with jvisualvm, the org.osgi.framework.bootdelegation property has to contain the org.netbeans.lib.profiler.server package
+# and, so, it should look like:
+#
+# org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,org.apache.karaf.jaas.boot.principal,org.apache.karaf.management.boot,sun.*,com.sun.*,javax.transaction,javax.transaction.*,javax.xml.crypto,javax.xml.crypto.*,org.apache.xerces.jaxp.datatype,org.apache.xerces.stax,org.apache.xerces.parsers,org.apache.xerces.jaxp,org.apache.xerces.jaxp.validation,org.apache.xerces.dom,org.netbeans.lib.profiler.server
+#
+# YourKit support
+# in order to use Karaf with YourKit, the org.osgi.framework.bootdelegation property has to contain the com.yourkit.* packages
+# and, so, it should look like:
+#
+# org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,org.apache.karaf.jaas.boot.principal,org.apache.karaf.management.boot,sun.*,com.sun.*,javax.transaction,javax.transaction.*,javax.xml.crypto,javax.xml.crypto.*,org.apache.xerces.jaxp.datatype,org.apache.xerces.stax,org.apache.xerces.parsers,org.apache.xerces.jaxp,org.apache.xerces.jaxp.validation,org.apache.xerces.dom,com.yourkit.*
+#
+
 #
 # OSGi Execution Environment
 #

http://git-wip-us.apache.org/repos/asf/karaf/blob/41405201/manual/src/main/webapp/developers-guide/debugging.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/debugging.conf b/manual/src/main/webapp/developers-guide/debugging.conf
index b0f1c0f..3742c6d 100644
--- a/manual/src/main/webapp/developers-guide/debugging.conf
+++ b/manual/src/main/webapp/developers-guide/debugging.conf
@@ -1,5 +1,3 @@
-
-
 h1. Troubleshooting, Debugging, Profiling, and Monitoring
 
 h2. Troubleshooting
@@ -74,31 +72,46 @@ how early in the startup they are.
 {code}
 export DEFAULT_JAVA_DEBUG_OPTS='-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005'
 {code}
+
 and on Windows,
+
 {code}
 set DEFAULT_JAVA_DEBUG_OPTS='-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005'
 {code}
 
 h2. Profiling
 
+h3. jVisualVM
+
+You have to edit the {{etc/config.properties}} configuration file to add the jVisualVM package:
+
+{code}
+org.osgi.framework.bootdelegation=...,org.netbeans.lib.profiler.server
+{code}
+
+Run Karaf from the console, and you should now be able to connect using jVisualVM.
+
 h3. YourKit
 
 You need a few steps to be able to profile Karaf using YourKit.
+
 The first one is to edit the {{etc/config.properties}} configuration file and add the following property:
-{noformat}
-org.osgi.framework.bootdelegation=com.yourkit.*
-{noformat}
+
+{code}
+org.osgi.framework.bootdelegation=...,com.yourkit.*
+{code}
 
 Then, set the {{JAVA_OPTS}} environment variable:
-{noformat}
+
+{code}
 export JAVA_OPTS='-Xmx512M -agentlib:yjpagent'
-{noformat}
+{code}
 
 or, on Windows
 
-{noformat}
+{code}
 set JAVA_OPTS='-Xmx512M -agentlib:yjpagent'
-{noformat}
+{code}
 
 Run Karaf from the console, and you should now be able to connect using YourKit standalone or from your favorite IDE.