From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15317 invoked by alias); 30 Jun 2010 22:33:08 -0000 Received: (qmail 15307 invoked by uid 22791); 30 Jun 2010 22:33:05 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Jun 2010 22:33:00 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5UMWw3F020924 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 30 Jun 2010 18:32:58 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5UMWv6Y023357; Wed, 30 Jun 2010 18:32:57 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o5UMWuPr022484; Wed, 30 Jun 2010 18:32:57 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id A877548004; Wed, 30 Jun 2010 16:32:56 -0600 (MDT) From: Tom Tromey To: gdb-patches@sourceware.org Subject: [0/4] RFC: add DWARF index support Reply-To: Tom Tromey Date: Wed, 30 Jun 2010 22:33:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-06/txt/msg00696.txt.bz2 This patch series adds support for a DWARF index to gdb. The idea is to speed up gdb startup time by constructing a read-only mmap()able index for the DWARF. Then, rather than create psymtabs, we simply map in this index and use it. You can see some performance results for the index here (read the whole thread, some initial results were wrong): http://sourceware.org/ml/archer/2010-q2/msg00055.html This code is somewhat complementary to my earlier series to read psymtabs in the background. I haven't yet merged the two; but when I do so I think I will also arrange for the index file to be mapped in a background thread (to avoid needless I/O waits during startup). I did investigate some other approaches before discarding them: * Use the existing .debug_pubnames and .debug_pubtypes sections. These are specified by DWARF, so they would be preferable. However, they don't include all the information that gdb needs (in particular, static symbols and enum constants), and due to C++ name canonicalization, actually reading these sections is just as slow as using psymtabs. * Use sqlite instead of our own format. sqlite is just too slow for our purposes (it takes way too long to make the index) and also the resulting database files are much bigger. I'd appreciate comments on this. Tom