This discussion is archived
5 Replies Latest reply: Jul 29, 2012 2:16 AM by 652777 RSS

JRMC 4.1 : no method profiling of my own methods

952211 Newbie
Currently Being Moderated
Bonjour,

I'm trying to profile a Tomcat application (WS cxf, based on Spring).

I'm using Eclipse Indigo (SR2 32bits), with jrockit-jdk1.6.0_33-R28.2.4-4.1.0 (32 bits).

Tomcat is launched with Oracle JRockit(R) R28.2.4-14-151097-1.6.0_33-20120618-1634-windows-x86_64 with the debugging mode in Eclipse.

With this configuration, I'm using JRockit Mission Control 4.1, with which I can connect to the Jrockit JVM running Tomcat.
At this point, it works.

Now, I set the method profiler to examine my webservices that I invoke with SoapUI ... as I receive the response, there is no invocation logged by Mission Control. In the same time, Mission Control counts the 400 String.toString invocations...

Have you an idea ?

Thanks, merci

Bruno
  • 1. Re: JRMC 4.1 : no method profiling of my own methods
    Erik (JRockit Engineering) Newbie
    Currently Being Moderated
    Bonjour,

    The Method Profiler in the Management Console only counts method invocations for the first class loader it finds. So if your method exists in mulltiple class loaders and you are unlucky the method profiler will miss it.

    - Erik
  • 2. Re: JRMC 4.1 : no method profiling of my own methods
    952211 Newbie
    Currently Being Moderated
    Thanks for your answer,

    Is the order of the classloader can be changed ? or is the Method Profiler will be extended to counts all methods ?

    An another question : the Method Profiler find (alone) the methods of my classes, that means it can see all classloaders or it just use the classpath ?

    Bruno
  • 3. Re: JRMC 4.1 : no method profiling of my own methods
    Erik (JRockit Engineering) Newbie
    Currently Being Moderated
    No, the order depends on how the JVM handles them internally. I'm sorry, but the only way to make sure your method invocations gets counted is to make sure that method only exists in one class loader.

    Currently the management and monitoring features in JRockit are ported over to Hotspot. If or when the Method Profiler is available for Hotspot it will most likely be able to count method invocations in all class loaders.

    If your class is loaded (and it's only available in one class loader) the Method Profiler will see it, regardless of how the JVM finds the class (class path etc).

    - Erik
  • 4. Re: JRMC 4.1 : no method profiling of my own methods
    952211 Newbie
    Currently Being Moderated
    Ok, Erik, I see. That means that there is at least 2 classloader in the tomcat application that can present my own classes. So the question is now : do I have a way to restrict to 1 the number of classloader ? may be, programmaticly by scanning for all classloader and removing reference to my classes ? Have you already done that ? may have you seen an example in tha way ?

    Merci / thanks

    Bruno
  • 5. Re: JRMC 4.1 : no method profiling of my own methods
    652777 Explorer
    Currently Being Moderated
    I don't know why your class is loaded using multiple class loaders. Maybe you redeployed your application and there are instances left on the heap from a previous deployment? Have you tried restarting Tomcat?

    The Memory Leak Detector that comes with Mission Control can be used to inspect the heap. On the Trends Tab you can see the number of class loaders a class has been loaded with. You may have to go into Preferences and lower the threshold so you get to see all classes though.

    - Erik

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points