From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115647 invoked by alias); 24 Feb 2016 02:45:46 -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 115622 invoked by uid 89); 24 Feb 2016 02:45:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_50,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=facts, ssd, SSD, tromey X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 24 Feb 2016 02:45:43 +0000 Received: by simark.ca (Postfix, from userid 112) id 537241E842; Tue, 23 Feb 2016 21:45:41 -0500 (EST) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 851621E6B7; Tue, 23 Feb 2016 21:45:40 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 24 Feb 2016 02:45:00 -0000 From: Simon Marchi To: gdb@sourceware.org Cc: tromey@redhat.com Subject: Multi-threaded dwarf parsing Message-ID: <2c38d5c574de28faa9fc94fe4ed17d45@simark.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.1.3 X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00018.txt.bz2 Hi all, When debugging large programs, simply loading the binary in gdb can take a significant amount of time. I was wondering if the dwarf parsing (building partial and/or full symtabs, I suppose) could be a good candidate for parallelization. I did some quick checks to determine that, at least when reading from my SSD drive, the operation is not IO-bound. Also, according to my limited understanding of the Dwarf format, it seems like the compilation units DIEs are entities that could be processed independently. These two facts, if we assume they are true, suggest that there is a good potential for performance gain here. I couldn't find anything on the mailing list about that, please point out any discussion I might have missed. I found (and it was a very good surprise) this branch by Tom Tromey: https://github.com/tromey/gdb/tree/threaded-dwarf-reader According to his description (from https://github.com/tromey/gdb/wiki): "I think it doesn't help any real-world case". I'd like to ask you directly, Tom: now that you debug Firefox (i.e. a quite large program) daily with gdb, are you still of the same opinion? Of course, I'm also interested in what others have to say about that. Is it something that would have value, you think? Also, since not so long ago, LLDB does it. Apparently, it "can drastically incrase the speed of loading debug info" (sic). If it's good for LLDB, I don't see why it wouldn't be good for GDB. Ref: http://blog.llvm.org/2015/10/llvm-weekly-95-oct-26th-2015.html So, in a word, are there any gotchas or good reasons not do take this path? Simon