This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 61816 - [j2ee] Don't profile server internals
Summary: [j2ee] Don't profile server internals
Status: CLOSED DUPLICATE of bug 53645
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 4.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-04 18:48 UTC by L Martinek
Modified: 2007-02-12 22:09 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description L Martinek 2005-08-04 18:48:05 UTC
I profiled small web application on Sun AppServer 8.1. I selected 'Analyze
Performance' on Entire Application. Profiling slowed down appserver so much that
appserver didn't started up correctly. It failed with error: Start server Sun
Java System Application Server 8.1 timeout or interrupted. I repeated it without
success. When I chose to profile part of the application it worked correctly.

Also when I tried to profile web application on weblogic I got a message that
instrumentation limit (64k?) was reached. 

I would recommend to automatically profile only deployed application and not
internal appserver code (including startup).
Comment 1 iformanek 2005-08-05 08:32:26 UTC
Did you have the "Profile application server code" checkbox turned off?

Also, please file a separate issue about the weblogic issue with reaching 
instrumentation limit, with as much details as possible.
Comment 2 L Martinek 2005-08-05 09:18:40 UTC
Where is this checkbox? I can't find it.
Comment 3 L Martinek 2005-08-05 11:26:49 UTC
Regarding the instrumatation limit on weblogic: I don't think it's a bug. Just
after reaching of 64k instrumented method a dialog appeared saying that no more
methods will be instrumented. And weblogic startup was also very slowed down
like Sun AppServer. I think that it's all consequence of one issue that
appserver and weblogic are too big for profiling.
Comment 4 Jiri Sedlacek 2005-08-05 12:48:56 UTC
Which Profiler build are you using? I most recent builds root methods are 
automatically determined and set for Entire Application profiling (if 
the "Profile application server code" checkbox is not checked).

You can determine if root methods are set by looking at the NB logfile/console, 
there is "instrumentationRootMethods =" line containing list of root methods 
set for profiling - it is written when the profiling session starts.

If you can't find the checkbox and the "instrumentationRootMethods =" line is 
empty, you are probably using M7 or some of older post-M7 builds. In this case 
please uninstall the Profiler and install the latest build to be able to 
profile your WebApp with minimal profiling overhead.
Comment 5 Jiri Sedlacek 2005-08-05 12:51:06 UTC
Just for your info: the "Profile application server code" checkbox should be 
next to the Entire Application option in Application Performance task if you 
are going to profile WebProject.
Comment 6 L Martinek 2005-08-05 16:08:20 UTC
I uninstalled profiler and installed new version from 
\\phoenix\public\profiler\1.0\Build050805\installers\profiler-m8-dev-win.exe.
BTW, installer still says it's milestone 7.

I left checkbox "Profile application server code" turned off and then appserver
started properly. When I tried to load a servlet from deployed web application a
dialog "instrumenting, please wait" appeared. After some time error appeared in
appserver and profiler was detached.

[#|2005-08-05T17:02:52.159+0200|WARNING|sun-appserver-pe8.1_01|javax.enterprise.
system.stream.err|_ThreadID=11;|Profiler Engine: exception when handling command
 from client:|#]

[#|2005-08-05T17:02:52.179+0200|WARNING|sun-appserver-pe8.1_01|javax.enterprise.
system.stream.err|_ThreadID=12;|
Profiler Engine: exception when trying to send response or command to client:|#]
Comment 7 Jiri Sedlacek 2005-08-05 17:39:16 UTC
Please could you provide more info? Is live results window open during server 
startup? Is number of profiled classes displayed in Profiler Control Panel 
(Basic Telemetry) more than 0 when "instrumenting, please wait" dialog is 
active?
Comment 8 Jiri Sedlacek 2005-08-05 17:45:23 UTC
Sorry, by saying "number of profiled classes" I meant number of instrumented 
methods...
Comment 9 Jiri Sedlacek 2005-08-05 18:35:48 UTC
I've filed new issue 61878 - CPU Profiling of WebApp fails if live results are 
open. Could you please check if this matches the problem you've described?
Comment 10 Jiri Sedlacek 2005-08-09 12:58:54 UTC
This issue described problem which has already been fixed in Issue 53645 
(Provide automatic/assisted selection of root methods for J2EE projects in the 
IDE.

If the problem with detaching the Profiled during performing instrumentation 
doesn't match the issue suggested, please create separate issue for it.

*** This issue has been marked as a duplicate of 53645 ***
Comment 11 L Martinek 2005-08-09 13:17:18 UTC
If I didn't open live results window and tried to load a servlet a dialog
"instrumenting, please wait" appeared. After while number of instrumented
methods increased and stopped at 50970. Then 100% CPU was eaten, used memory
grew, computer was unresponsive and after while java.lang.OutOfMemoryError was
thrown from appserver. When I increased virtual memory from 500MB to 1.5GB error
wasn't thrown, but profiler was detached anyway. 

If I opened live results window number of instrumented methods was 0 and then
profiler was detached.
Comment 12 L Martinek 2005-08-09 13:20:35 UTC
I don't know whether it's duplicate of issue #53645. I haven't found anything
about detaching in issue #53645. And I forgot to say that I used Attach
Profiler, not Profile Main Project.
Comment 13 ehucka 2006-10-09 12:11:03 UTC
Verification of old issues.
Comment 14 Alexander Kouznetsov 2007-02-12 22:09:59 UTC
Closing old issues.