Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Noel Grandin <noelgrandin@gmail.com>
To: gdb@sourceware.org
Subject: speeding up time to hit first breakpoint
Date: Mon, 03 Oct 2016 10:04:00 -0000	[thread overview]
Message-ID: <cd1690e2-6915-d275-cb8f-48036ee167ae@gmail.com> (raw)

Hi

I'm debugging LibreOffice, which can be a bit of a GDB stress test :-)

And it can take 30 seconds or so between me hitting the key stroke that triggers a breakpoint and getting to the GDB 
command line console.

I took a trace with 'perf record -g', which I'm enclosing. It looks like the bulk of the time is spent in xrealloc.
Perhaps there is something that can be sized more appropriately up front to prevent the reallocating?

Anyway, thanks for the powerful tool :-)

Cheers, Noel grandin

     Children  Self    Command  Shared Object         Symbol
-   99.18%    98.83%  gdb      libc-2.23.so          [.] __memset_sse2
    - __memset_sse2
       - 99.08% _int_free
            _int_realloc
            realloc_check
            realloc
          - xrealloc
             - 99.05% decode_frame_entry
                  dwarf2_build_frame_info
                  dwarf2_frame_find_fde
                  dwarf2_frame_sniffer
                  frame_unwind_try_unwinder
                  frame_unwind_find_by_frame
                  get_prev_frame_if_no_cycle
                  get_prev_frame_always
                  get_prev_frame
                  unwind_to_current_frame
                  catch_exceptions_with_msg
                  get_current_frame
                  handle_inferior_event
                  fetch_inferior_event
                  inferior_event_handler
                  gdb_wait_for_event
                  gdb_do_one_event
                  start_event_loop
                  captured_command_loop
                  catch_errors
                  captured_main
                  catch_errors
                  gdb_main
                  main
                  __libc_start_main
                  _start


             reply	other threads:[~2016-10-03 10:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-03 10:04 Noel Grandin [this message]
2016-10-03 11:16 ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cd1690e2-6915-d275-cb8f-48036ee167ae@gmail.com \
    --to=noelgrandin@gmail.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox