From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51366 invoked by alias); 3 Oct 2016 10:04:32 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 51354 invoked by uid 89); 3 Oct 2016 10:04:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_STOCKGEN,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=noel, Noel, Children, 9905 X-HELO: mail-wm0-f54.google.com Received: from mail-wm0-f54.google.com (HELO mail-wm0-f54.google.com) (74.125.82.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Oct 2016 10:04:30 +0000 Received: by mail-wm0-f54.google.com with SMTP id p138so141501823wmb.1 for ; Mon, 03 Oct 2016 03:04:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=a+E/lYOo1+HN9PL6gAQL5KJJCHSzi7fksuJJQdV4E4Q=; b=dO7u8RhNwnIq98gfds3z5a+FHnHzheSFND0+ZzxD8nlZZiBOmwYdI/IOys5JSfKSvG huVy2DinvwLcy/9nRO5L/A3xuG6hhufxcV+iXREqcO3WRFPX6tVjH0mjs23+fzuAuMZ0 hA9xOP2Ur141mFac/XVv+szGYS1vO3ZfAHv5xBYibYGger0XF0WJlyvZbbpSUr2CHh13 MshgWUaHTkl85wULWPrUfO7YAdl7oVUm48b1Q8AVxcp3iT2qLHC3Z3MDLBQCRVXZKuDK nhKGLij/iEpY1ysnbokj+fHQQ1gh1m+KgZb2PTYznrGixoFdI0t5nKfYH9RX4CDwKGqN luUQ== X-Gm-Message-State: AA6/9RmQRWg2/+PJL4xe0s731pDLS686++GCKVJr3dkDcRDmeNwc66iJhEEivXVzIr4rAA== X-Received: by 10.28.51.21 with SMTP id z21mr8179134wmz.24.1475489068242; Mon, 03 Oct 2016 03:04:28 -0700 (PDT) Received: from [192.168.1.222] ([41.164.8.42]) by smtp.gmail.com with ESMTPSA id xb6sm33514004wjb.30.2016.10.03.03.04.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Oct 2016 03:04:27 -0700 (PDT) To: gdb@sourceware.org From: Noel Grandin Subject: speeding up time to hit first breakpoint Message-ID: Date: Mon, 03 Oct 2016 10:04:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-10/txt/msg00002.txt.bz2 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