Announcement Announcement Module
Collapse
No announcement yet.
Profiling with DM Server Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


    • #3
      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?

      Comment


      • #4
        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.

        Comment


        • #5
          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

          Comment

          Working...
          X