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 151718 - IDE uses CPU on 100% if user is opened Disassembly tab on Windows XP
Summary: IDE uses CPU on 100% if user is opened Disassembly tab on Windows XP
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Egor Ushakov
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2008-10-29 13:52 UTC by soldatov
Modified: 2010-03-29 09:55 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stack (14.10 KB, text/plain)
2008-10-29 13:54 UTC, soldatov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2008-10-29 13:52:44 UTC
Scenario:
- I downloaded Far from http://www.farmanager.com/opensource.php?l=en
- I built it with -g option in MinGW
- I Loaded it into debugger ('Step Into')
==> ok
- I Opened Disassembly window
==>
Window is empty
CPU Usage - 100%
gdb-cmds42946.log - ~10Mb
Comment 1 soldatov 2008-10-29 13:54:27 UTC
Created attachment 72834 [details]
stack
Comment 2 soldatov 2008-10-29 14:43:04 UTC
I changed makefile_gcc file, and with new options this problem disappeared. Therefore It is not showstopper.

I changed:
----------------------------------------------------------------
CXX = g++ -g
CC = gcc -g
....
CCFLAGS = -Os $(DEFINES) -funsigned-char -fomit-frame-pointer -fno-exceptions -fno-rtti -Wno-deprecated
CFLAGS = -Os $(DEFINES) -funsigned-char -fomit-frame-pointer -fno-exceptions
----------------------------------------------------------------
On:
----------------------------------------------------------------
CXX = g++ -g
CC = gcc -g
....
CFLAGS = -g
CCFLAGS = -g
----------------------------------------------------------------
Comment 3 Egor Ushakov 2008-10-31 10:50:00 UTC
For some reason cygwin gdb returns 10m of disassembler to the IDE,
we should consider setting a limit
Comment 4 Egor Ushakov 2008-12-12 15:59:49 UTC
In this case, when we have optimized binary gdb generates disassembly ~20 seconds and we're unable to set a limit for it.
As a minimum we should show "gathering disassembly..." notice and do not block UI thread for sure.
Comment 5 Alexander Pepin 2008-12-24 11:29:19 UTC
After discussion with Egor (gorrus) the possible fix was considered as too risky to be included into patch. Assuming
that there is a workaround this issue is not a patch2 candidate any more.  
Comment 6 Egor Ushakov 2009-03-16 15:36:57 UTC
AWT thread is not blocked, so the main problem is that user observes empty disassembly.
Also gdb response parser thread is blocked, so all further gdb commands get blocked.
Comment 7 Alexander Pepin 2009-03-19 11:58:40 UTC
IMO we should inform a user about a time consuming operation. It could be a message "Disassembling in progress. Please
wait..." appearing on the Disassembler editor window. At we same time it would be useful to disable all buttons on
'Debugger' toolbar except 'Finish' as they do not work until disassembling is completed.
Comment 8 Leonid Lenyashin 2009-04-10 09:32:34 UTC
Egor, please finally waive it, or downgrade it, or workaround it, or simply fix it. It has been around way too long.
Comment 9 Egor Ushakov 2009-04-13 13:42:29 UTC
show progress window with cancel button when disassembly is updated:
http://hg.netbeans.org/cnd-main/rev/7e123bb1e475
still no user notification when gdb is working on dis response
Comment 10 Egor Ushakov 2009-04-13 15:53:28 UTC
progress fix:
http://hg.netbeans.org/cnd-main/rev/ae9270e0a033

now users are able to cancel disassembly gathering
Comment 11 Egor Ushakov 2009-04-13 15:59:08 UTC
if we change disassembly to simple mode (without source files info) everything works fine,
so it looks like gdb bug.
We may consider having this option in debugger options.
Comment 12 Egor Ushakov 2010-03-29 09:55:12 UTC
works fine with gdb 7.0 and progress fix from 2009-04-13