Results 1 to 5 of 5

Thread: Profiling with DM Server

  1. #1
    Join Date
    Jul 2008
    Location
    San Jose
    Posts
    22

    Default Profiling with DM Server

    I tried using jprofiler to start the dm server. I am getting some ClassDefNotFoundException from the spring core jar. I tried adding the agent.jar into the java 6 profile but still no success. Before I spend too much time investigate this problem, have anyone try it with jprofiler or other profiling tool? I wonder if i need to make the agent.jar as a osgi jar or not. I already start the jvm with agent.jar in the bootclasspath, so all the bundles should have access to it.

    Thanks,

    michael

  2. #2
    Join Date
    Oct 2008
    Posts
    493

    Default

    We've used YourKit to profile dm Server during our development work. As you've seen, using a profiler causes all sorts of unexpected types to be required that can't be seen. To overcome this you can modify the profile to boot delegate the profiler package, e.g. you'll see in the java5-server.profile and java6-server.profile files that we've boot delegated com.yourkit.*.

    Hopefully doing something similar with the JProfiler-related packages will help.
    Andy Wilkinson
    SpringSource

  3. #3
    Join Date
    Feb 2009
    Location
    San Diego, CA
    Posts
    19

    Default

    Are there any other steps to get profiling to work besides...
    1. Add the relevant profiling packages to lib/java*-server.profile under the org.osgi.framework.bootdelegation key. e.g.
      Code:
      org.osgi.framework.bootdelegation = org.netbeans.lib.profiler.server.*, ...
    2. Add relevant profiling jars to the dm server's classpath


    I've verified, via the "getprop" command in equinox, that the bootdelegation property looks good, and that jfluid-server.jar (the netbeans profiling classes) is in the classpath. But I keep getting

    Code:
    java.lang.NoClassDefFoundError: org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
    after attaching the profiler.

    Is there something I'm missing?

  4. #4
    Join Date
    Oct 2008
    Posts
    493

    Default

    I think this is as a result of a subtlety in the way the boot delegation property handles .*

    org.netbeans.lib.profiler.server.* doesn't match the org.netbeans.lib.profiler.server package, only its sub-packages. If you wish to boot delegate the org.netbeans.lib.profiler.server and its subpackages you'll need to use two entries: org.netbeans.lib.profiler.server, and org.netbeans.lib.profiler.server.*. Alternatively, you could use a single entry of org.netbeans.lib.profiler.*, but this has the side-effect that it will boot delegate all of org.netbeans.lib.profiler's subpackages not just server.
    Andy Wilkinson
    SpringSource

  5. #5
    Join Date
    Feb 2009
    Location
    San Diego, CA
    Posts
    19

    Default

    Brilliant! Works perfectly now.

    In case anyone else wants to use the netbeans profiler just add

    Code:
    org.netbeans.lib.profiler.server, org.netbeans.lib.profiler.server.*
    to your boot delegation path, and make sure that jfluid-server.jar is in the server's classpath.

    Thanks, Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •