Memory profiling a method call [message #559013] |
Wed, 15 September 2010 06:30  |
Eclipse User |
|
|
|
Hello,
I want to know the memory that a method consumes when it is called (i.e. all objects it creates as local variables, and also recursively in all methods it calls)
I use the "Profile on server" option as it is in a J2EE Spring web application.
If I specify a class filter it works fine, though the filter should be a lot more large (the class inclusion tree is large)
To make it simpler i wanted to profile all classes (no class filter) and activate the profiling just before calling my method.
If I do so (select no class filter and deselect the option "Automatically start profiling..."), and try to activate the profiling just before calling the method, I get a console error: "[Error: EC JPIAgent received message (FATAL ERROR): Internal error (see log file).]" and the server terminates!. I don't know the location of that log file...
Anyway, is there a way to do memory profile only inside the execution of a method? I've set the "method" property in the class filter but it has no effect. I don't understand how this parameter works when doing memory profile.
Thanks in advance
Juan Jose Luna
|
|
|
Re: Memory profiling a method call [message #559157 is a reply to message #559013] |
Wed, 15 September 2010 15:29   |
Eclipse User |
|
|
|
Hi Juan, generally speaking you should not use am empty filterset. Profiling introduces a large overhead, so the filter set should always exclude classes for which you have no control (java.*, sun.*, any 3rd-party libraries, etc). The stats for these methods will still be collected implicitly, but they will be included as part of the stats of the unfiltered calling methods.
As for the 'method' field, as part of the filter this specifies which classes will be instrumented for memory analysis, as well as what objects will be analyzed. So if you include a method, un-filtered objects allocated in that method will be profiled. If you exclude a method, no allocated objects in that method will be profiled.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09213 seconds