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/13564] New: potential breakpoint optimization


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

             Bug #: 13564
           Summary: potential breakpoint optimization
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: breakpoints
        AssignedTo: unassigned@sourceware.org
        ReportedBy: gbenson@redhat.com
    Classification: Unclassified


In October 2011 I committed an optimization that allows GDB to avoid some
time-consuming code when handling stops on breakpoints which are not at
locations where code has been inlined.  The patch discussion is here:

http://www.cygwin.com/ml/gdb-patches/2011-10/msg00068.html

In the current code, the function is_non_inline_function is used to determine
whether a particular PC represents a location where functions could have been
inlined.  This currently returns nonzero if and only if the breakpoint is the
shared library event breakpoint (which is what the original optimization
targeted).  GDB might benefit from is_non_inline_function being made more
generic.  Pedro described how this might work here:

http://www.cygwin.com/ml/gdb-patches/2011-10/msg00363.html

Note that it is possible that extending is_non_inline_function may not actually
help.  The time-consuming code avoided is the function find_pc_section, which
is called (indirectly) by the functions find_pc_partial_function and
skip_inline_frames in handle_inferior_event.  find_pc_section is slow in the
specific case of the shared library event breakpoint because it needs to update
the section map on every stop (because every stop represents an added or
removed shared library.)  It is possible that find_pc_section is not slow for
other breakpoints.

-- 
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]