public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/12828] New: Too slow break on -O2 -g code
@ 2011-05-31 20:54 jan.kratochvil at redhat dot com
  2011-05-31 20:55 ` [Bug breakpoints/12828] " jan.kratochvil at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-05-31 20:54 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12828

           Summary: Too slow break on -O2 -g code
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: breakpoints
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jan.kratochvil@redhat.com


(gdb) break WebCore::Document::head()
may lock up GDB eating out all the memory while it tries to expand 1681 CUs.

webkitgtk-1.3.10-1.fc14.x86_64
webkitgtk-debuginfo-1.3.10-1.fc14.x86_64
/usr/lib64/libwebkitgtk-1.0.so.0.5.2
/usr/lib/debug/usr/lib64/libwebkitgtk-1.0.so.0.5.2.debug
http://kojipkgs.fedoraproject.org/packages/webkitgtk/1.3.10/1.fc14/x86_64/webkitgtk-1.3.10-1.fc14.x86_64.rpm
http://kojipkgs.fedoraproject.org/packages/webkitgtk/1.3.10/1.fc14/x86_64/webkitgtk-debuginfo-1.3.10-1.fc14.x86_64.rpm

GNU gdb (GDB) 7.3.50.20110531-cvs

#0  read_psymtabs_with_filename (objfile=, filename=
"Source/JavaScriptCore/wtf/RefPtr.h") at psymtab.c:1076 
#1  in expand_line_sal (sal=...) at symtab.c:4705
#2  in expand_line_sal_maybe (sal=...) at breakpoint.c:7558
#3  in create_breakpoints_sal (gdbarch=, sals=..., canonical=, cond_string=0x0,
type=bp_breakpoint, disposition=disp_donttouch, thread=-1, task=0,
ignore_count=0, ops=0x0, from_tty=1, enabled=1, internal=0) at
breakpoint.c:7663
#4  in create_breakpoint (gdbarch=, arg= "", cond_string=0x0, thread=-1,
parse_condition_and_thread=1, tempflag=0, type_wanted=bp_breakpoint,
ignore_count=0, pending_break_support=AUTO_BOOLEAN_AUTO, ops=0x0, from_tty=1,
enabled=1, internal=0) at breakpoint.c:8132
#5  in break_command_1 (arg= "WebCore::Document::head()", flag=0, from_tty=1)
at breakpoint.c:8203
#6  in break_command (arg= "WebCore::Document::head()", from_tty=1) at
breakpoint.c:8276

00000000006e2ef0 t _ZN7WebCore8Document4headEv
Source/JavaScriptCore/wtf/RefPtr.h:67
        bool operator!() const { return !m_ptr; }
0x00000032e76e2ef0 Source/WebCore/dom/Document.cpp:2059
HTMLHeadElement* Document::head()
{
    Node* de = documentElement();
+
    Element* documentElement() const
    {
        if (!m_documentElement)
+
    mutable RefPtr<Element> m_documentElement;
 <2><578d527>: Abbrev Number: 53 (DW_TAG_subprogram)
    <578d528>   DW_AT_external    : 1
    <578d529>   DW_AT_name        : (indirect string, offset: 0x153dec): head
    <578d52d>   DW_AT_decl_file   : 9
    <578d52e>   DW_AT_decl_line   : 2058
    <578d530>   DW_AT_MIPS_linkage_name: (indirect string, offset: 0x56b2b0):
_ZN7WebCore8Document4headEv
    <578d534>   DW_AT_type        : <0x578e74e>
    <578d538>   DW_AT_declaration : 1
    <578d539>   DW_AT_sibling     : <0x578d544>
  Set File Name to entry 9 in the File Name Table
  Advance Line by 1756 to 2059
  Advance PC by constant 17 to 0x6e2ee1
  Special opcode 215: advance Address by 15 to 0x6e2ef0 and Line by 0 to 2059
  Set File Name to entry 15 in the File Name Table
  Advance Line by -1992 to 67
  Copy
  Set File Name to entry 9 in the File Name Table
  Advance Line by 1992 to 2059
  Special opcode 103: advance Address by 7 to 0x6e2ef7 and Line by 0 to 2059
  Special opcode 19: advance Address by 1 to 0x6e2ef8 and Line by 0 to 2059
  Set File Name to entry 4 in the File Name Table
  Advance Line by -1757 to 302
  Special opcode 47: advance Address by 3 to 0x6e2efb and Line by 0 to 302
  Set File Name to entry 9 in the File Name Table
  Advance Line by 1760 to 2062
  Special opcode 75: advance Address by 5 to 0x6e2f00 and Line by 0 to 2062
  9     2       0       0       Document.cpp
  15    5       0       0       RefPtr.h

-------------------------------------------------------------------------------

(a) I do not think it needs to expand .debug_info; it just wants .debug_line.
(b) Current inlining implementation will discard all the other functions with
    inlined RefPtr.operator!() anyway as their linkage name is not
    WebCore::Document::head() (inlining is PR 10738).

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug breakpoints/12828] Too slow break on -O2 -g code
  2011-05-31 20:54 [Bug breakpoints/12828] New: Too slow break on -O2 -g code jan.kratochvil at redhat dot com
@ 2011-05-31 20:55 ` jan.kratochvil at redhat dot com
  2011-06-07 14:29 ` jan.kratochvil at redhat dot com
  2011-11-07 22:08 ` tromey at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-05-31 20:55 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12828

--- Comment #1 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2011-05-31 20:55:06 UTC ---
Created attachment 5761
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5761
Benchmarking hack counting+disabling the CU expansion.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug breakpoints/12828] Too slow break on -O2 -g code
  2011-05-31 20:54 [Bug breakpoints/12828] New: Too slow break on -O2 -g code jan.kratochvil at redhat dot com
  2011-05-31 20:55 ` [Bug breakpoints/12828] " jan.kratochvil at redhat dot com
@ 2011-06-07 14:29 ` jan.kratochvil at redhat dot com
  2011-11-07 22:08 ` tromey at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-06-07 14:29 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12828

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |10738

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug breakpoints/12828] Too slow break on -O2 -g code
  2011-05-31 20:54 [Bug breakpoints/12828] New: Too slow break on -O2 -g code jan.kratochvil at redhat dot com
  2011-05-31 20:55 ` [Bug breakpoints/12828] " jan.kratochvil at redhat dot com
  2011-06-07 14:29 ` jan.kratochvil at redhat dot com
@ 2011-11-07 22:08 ` tromey at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: tromey at redhat dot com @ 2011-11-07 22:08 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12828

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at redhat dot com

--- Comment #2 from Tom Tromey <tromey at redhat dot com> 2011-11-07 22:07:47 UTC ---
This particular test works fine (a little slow but not as bad as you report)
with the ambiguous-linespec branch.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-07 22:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-31 20:54 [Bug breakpoints/12828] New: Too slow break on -O2 -g code jan.kratochvil at redhat dot com
2011-05-31 20:55 ` [Bug breakpoints/12828] " jan.kratochvil at redhat dot com
2011-06-07 14:29 ` jan.kratochvil at redhat dot com
2011-11-07 22:08 ` tromey at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).