Menu

Unable to start profiling

2009-07-13
2013-04-17
  • Roubik Manoukian

    Hi,
    I am using Jrun. I have enabled the debug flag in the properties file and I can see that certain classes are being instrumented (see attached output). I have attached a debugger and I can see that Controller._instrumentCount is not 0. But I am still getting the message that no classes are instrumented.
    Can you please help me to identify the problem. Thanks.

    INST    <classname> [jrunx.util.DynamicClassLoader$SlaveURLClassLoader]
    skip    com/ibm/xml/parser/PseudoNode   [sun.misc.Launcher$AppClassLoader]
    skip    com/ibm/xml/parser/ToNextSiblingTraversalException      [sun.misc.Launcher$AppClassLoader]
    skip    com/ibm/xml/parser/TreeTraversalException       [sun.misc.Launcher$AppClassLoader]
    skip    com/ibm/xml/parser/EndTraversalException        [sun.misc.Launcher$AppClassLoader]
    INST    <classname>     [jrunx.util.DynamicClassLoader$SlaveURLClassLoader]
    start
    Warning: a request has been made to start the profiler but no classes have been instrumented. Possible reasons:
    1. All the classes that have been classloaded have been "excluded". Check the exclude property in the current profile properties file.
    2. No appropriate class loader filter has been provided (see "ClassLoaderFilter.x" in the current profile properties file.) If no appropriate filter can be found, the standard filter is used. Thisfilter is really only useful for stand-alone applications. Make sure your environment has a ClassLoaderFilter and that your profile properties file is configured correctly.
    3. Sometimes when Tomcat is launched from within Eclipse, Tomcat, for some reason, will start using the appication classloader (the one that stand-alone apps use) to classload the webapp rather than the web app classloader that it should use. One thing that you can try to get around this odd behavior is to not run Tomcat in debug mode (Window > Perferences > Tomcat > JVM settings : Don't run Tomcat in debug mode.) If this doesn't work, you could try removing the webapp classlaoder filter from your profile properties file.

     
    • Andrew Wilcox

      Andrew Wilcox - 2009-07-17

      Hi,

      I'm sorry for not posting sooner. For some reason, SourceForge didn't sent me a notification that a forum post had been made.

      Make sure that the profile.jar file is NOT in any classpath (i.e., application classpath, extensions classpath or bootstrap classpath). The JVM will load the profile.jar directly based on the -javavagent JVM parameter.

      If, for example, profile.jar is in the extensions  classpath, the jar will get loaded twice -- once by the application classloader (because it's an agent) and again by the extensions classloader. The set of classes loaded by the application classloader do all of the instrumentation. But to the other set of classes, it appears that nothing has been instrumented.

      Andrew.

       

Log in to post a comment.