NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Help please with Profiler

 
Post new topic   Reply to topic    NetBeans Forums -> Profiler Users
View previous topic :: View next topic  
Author Message
DougM



Joined: 07 Oct 2010
Posts: 4

PostPosted: Thu Oct 07, 2010 7:34 pm    Post subject: Help please with Profiler Reply with quote

Hello. I've used the profiler for the first few times and run into some questions and problems. I'm hoping someone will show me the way around.

I am developing a desktop client application using SWT. (Without wanting to start a flame war, I found that SWT gives the access to native OS widgets I need, and that Netbeans is far more pleasant, cleaner, and clearer to use than Eclipse.) SWT is set up as a library in the project, with paths to SWT-Debug.jar and src.zip. In ordinary development work this setup works flawlessly.

Here are the issues:

1) I try to set the method Display.runPaint() in the SWT library as a root method. The context popup in the source allows me to select the configuration and the runPaint method. However, the method does not show up in the Profile dialog.

Another way also does not work. In the Profile dialog->define->Specify Root Methods->Add From Project, the SWT libraries do not show up in the root methods tree. The standard Java libraries do show up. "Package" view (not "Default Package" as stated in the docs) is the only view available.

I do not know how to write the VM Signature, so I can't try the manual entry.

2) I want to filter out the method applicationNextEventMatchingMask in org.eclipse.swt.widgets.Display. The Help entry for Set Quick Filter Dialog Box says:
Filter Type. Select Exclusive or Inclusive to specify if the methods are excluded or included. If Exclude is selected, none of the listed methods are profiled. If Include is selected, only the listed methods are profiled.

However, I can't see any examples of excluding a method, only complete classes.
org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask does not do it.

Is it possible to exclude a single method, and how is it done?

3) The command Profile->Advanced Commands->Unintegrate Profiler from Project is grayed out. I have to quit and restart Netbeans to use it. Is this normal?

4) Suppose I use the profiler to analyze and improve performance on say a single user command. First I reset the results, do the command, and look at the live results. Then I use the results to improve the code (presumably) and repeat the test. Although I can see the new "hot spots", I do not see anywhere the total CPU time for the selected roots. I have to divide one sample's ms by its percent to make that estimate, even to see if there's any actual overall improvement. What's up with that? Am I approaching this the wrong way? It would seem that the final goal of CPU analysis is to reduce overall consumption, and that essential measure is not shown.

Thanks very much for any help with these questions.

Doug
Back to top
DougM



Joined: 07 Oct 2010
Posts: 4

PostPosted: Fri Oct 08, 2010 8:05 pm    Post subject: Resolved #3 above by upgrading to v. 6.9.1 Reply with quote

Also, I am developing with OS 10.6.4/JDK 1.6.
Back to top
Tomas Hurka
Posted via mailing list.





PostPosted: Mon Oct 11, 2010 9:40 am    Post subject: Re: Help please with Profiler Reply with quote

Hi Doug,

On 7 Oct 2010, at 21:35, DougM wrote:

Quote:
Hello. I've used the profiler for the first few times and run into some questions and problems. I'm hoping someone will show me the way around.

I am developing a desktop client application using SWT. (Without wanting to start a flame war, I found that SWT gives the access to native OS widgets I need, and that Netbeans is far more pleasant, cleaner, and clearer to use than Eclipse.) SWT is set up as a library in the project, with paths to SWT-Debug.jar and src.zip. In ordinary development work this setup works flawlessly.

Here are the issues:

1) I try to set the method Display.runPaint() in the SWT library as a root method. The context popup in the source allows me to select the configuration and the runPaint method. However, the method does not show up in the Profile dialog.

Another way also does not work. In the Profile dialog->define->Specify Root Methods->Add From Project, the SWT libraries do not show up in the root methods tree. The standard Java libraries do show up. "Package" view (not "Default Package" as stated in the docs) is the only view available.
This is strange. It looks like the SWT libraries are somehow not part of your project. Can you prepare simple project as a test case?

Quote:
I do not know how to write the VM Signature, so I can't try the manual entry.

2) I want to filter out the method applicationNextEventMatchingMask in org.eclipse.swt.widgets.Display. The Help entry for Set Quick Filter Dialog Box says:
Filter Type. Select Exclusive or Inclusive to specify if the methods are excluded or included. If Exclude is selected, none of the listed methods are profiled. If Include is selected, only the listed methods are profiled.

However, I can't see any examples of excluding a method, only complete classes.
org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask does not do it.

Is it possible to exclude a single method, and how is it done?
This is currently not possible. You can exclude classes and packages. Why do you want to exclude just one method?

Quote:
3) The command Profile->Advanced Commands->Unintegrate Profiler from Project is grayed out. I have to quit and restart Netbeans to use it. Is this normal?
Which version of NetBeans are you using?

Quote:
4) Suppose I use the profiler to analyze and improve performance on say a single user command. First I reset the results, do the command, and look at the live results. Then I use the results to improve the code (presumably) and repeat the test. Although I can see the new "hot spots", I do not see anywhere the total CPU time for the selected roots. I have to divide one sample's ms by its percent to make that estimate, even to see if there's any actual overall improvement. What's up with that? Am I approaching this the wrong way? It would seem that the final goal of CPU analysis is to reduce overall consumption, and that essential measure is not shown.
I guess you are looking at the 'Live Profiling Results', am I right? Live results just give a quick overview. To get detailed information you need to take snapshot of collected results.

Bye,
--
Tomas Hurka <mailto:address-removed>
NetBeans Profiler http://profiler.netbeans.org
VisualVM http://visualvm.dev.java.net
Software Developer
Oracle, Praha Czech Republic
Back to top
mobiper



Joined: 21 Aug 2010
Posts: 3

PostPosted: Tue Jan 11, 2011 10:34 am    Post subject: Mobiper.com Reply with quote

Hi Doug,

Which version of NetBeans are you using? Lets forgot you solve your problem? if not then come to me...
Back to top
DougM



Joined: 07 Oct 2010
Posts: 4

PostPosted: Tue Jan 11, 2011 6:55 pm    Post subject: Thanks for following up Reply with quote

I did not continue to use the profiler after once determining that SWT's implementation of styled text was the bottleneck. (It calls the OS to reformat the area several times more than is actually necessary.) I had to re-design my app to redraw only the visible area and render the offscreen parts between keystrokes to get acceptable performance.

When I get back to profiling, I will continue post any questions/suggestions. Thanks for your help.
Back to top
antonio02



Joined: 21 Jan 2011
Posts: 1

PostPosted: Fri Jan 21, 2011 3:43 am    Post subject: Reply with quote

I also discontinue using the profiler because I have encountered problems when I try to profile. It's a good program. I might be using it again in the future.
Back to top
Suganthi



Joined: 11 Mar 2011
Posts: 2

PostPosted: Mon Mar 14, 2011 6:29 am    Post subject: Reply with quote

Hi,

Can anyone please help me..Its urgent.

My application server is running on aws server. And my application is running on local, where there is no server acts like a Desktop appplication. How will I attach profiler, I dont know, Because there is no jar files nothing except the Derby DB.
I have to do profiling for that..help me to get rid off this problem....

Thanks
Suganthi
Back to top
Tomas Hurka
Posted via mailing list.





PostPosted: Sat Mar 19, 2011 2:46 pm    Post subject: Re: Help please with Profiler Reply with quote

Hi Suganthi,

On 14 Mar 2011, at 07:29, Suganthi wrote:
Quote:

Can anyone please help me..Its urgent.

My application server is running on aws server. And my application is running on local, where there is no server acts like a Desktop appplication. How will I attach profiler, I dont know, Because there is no jar files nothing except the Derby DB.
I have to do profiling for that..help me to get rid off this problem....

I am confused. Do you need to profile application server or your application running on a local machine?

Bye,
--
Tomas Hurka <mailto:address-removed>
NetBeans Profiler http://profiler.netbeans.org
VisualVM http://visualvm.java.net
Software Developer
Oracle, Praha Czech Republic
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Profiler Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo