This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug breakpoints/12828] New: Too slow break on -O2 -g code


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]