From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129461 invoked by alias); 24 Feb 2016 11:06: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 128952 invoked by uid 89); 24 Feb 2016 11:06:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=facts, ssd, According, HTo:D*ca X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 24 Feb 2016 11:06:43 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 01D6EC0AC205; Wed, 24 Feb 2016 11:06:41 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1OB6ejL019396; Wed, 24 Feb 2016 06:06:41 -0500 Message-ID: <56CD8EC0.3010304@redhat.com> Date: Wed, 24 Feb 2016 11:06:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Simon Marchi , gdb@sourceware.org, Tom Tromey Subject: Re: Multi-threaded dwarf parsing References: <2c38d5c574de28faa9fc94fe4ed17d45@simark.ca> In-Reply-To: <2c38d5c574de28faa9fc94fe4ed17d45@simark.ca> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-02/txt/msg00019.txt.bz2 [Updated Tom's address] On 02/24/2016 02:45 AM, Simon Marchi wrote: > 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? Making GDB load debug info faster, and making it take advantage of the multiple cores in most host machines nowadays definitely adds value. ( I'd also like to get threads into GDB for other reasons, so this would be a good trojan. Oh, whoops, did I say that out loud? :-) ) > > 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? The obvious gotchas are of course all the globals, and coming up with fine enough locking granularity that threads actually do run in parallel. Thanks, Pedro Alves