From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 85190 invoked by alias); 15 Feb 2020 16:54:50 -0000 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 Received: (qmail 85177 invoked by uid 89); 15 Feb 2020 16:54:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=danger, incrementally X-HELO: gateway20.websitewelcome.com Received: from gateway20.websitewelcome.com (HELO gateway20.websitewelcome.com) (192.185.47.18) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 15 Feb 2020 16:54:48 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway20.websitewelcome.com (Postfix) with ESMTP id 1DF25400CECE5 for ; Sat, 15 Feb 2020 09:41:01 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 30iMjizVoSl8q30iMjQmgH; Sat, 15 Feb 2020 10:54:46 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:MIME-Version :Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=R1JfjgdEDm5snvbl1GU2siqfMic0ciYG5upd7yM0h1E=; b=GOZpxzNzyIVCzr2LbATjjT0vzR wX113X+HaxtGpzhTbpQVBKnqKC3pVodlCzJ6ct6P2iCc6emeTS8a9RCI1q6UYmU/bD/mLCgDZTS1K gFMhGYoAOYJ8HminB6nA7+ah2; Received: from 75-166-123-50.hlrn.qwest.net ([75.166.123.50]:45240 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1j30iM-000xcC-KD for gdb-patches@sourceware.org; Sat, 15 Feb 2020 09:54:46 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Subject: [PATCH 00/14] Share DWARF partial symtabs between objfiles Date: Sat, 15 Feb 2020 16:54:00 -0000 Message-Id: <20200215165444.32653-1-tom@tromey.com> X-SW-Source: 2020-02/txt/msg00594.txt.bz2 A long-term goal for multi-inferior debugging has been to "split" an objfile, so that the bulk of the data can be shared across inferiors. Although a lot of progress has been made on this front, it has turned out to be surprisingly difficult to fully implement. "Recently" (a year or two ago) I realized that we could get most of the benefits of this split by sharing partial symbol tables. This is true because reading partial symbols is the slowest operation that users see -- in most cases, expanding a full symtab is reasonably quick. Implementing this also turned out to be tricky; but unlike the situation with types and symbols, it was possible to do incrementally. This series implements this idea for DWARF. It separates dwarf2_per_objfile into shareable and unshareable parts; then, when possible, the object is attached to the BFD. You can see the difference when timing "add-inferior -exec ./gdb", after "gdb ./gdb": Before: Command execution time: 1.667661 (cpu), 1.687607 (wall) After : Command execution time: 0.150011 (cpu), 0.151292 (wall) In this series I did not rename dwarf2_per_objfile. I'd prefer to do this after landing this series; it seemed like a large, mostly cosmetic, and yet hard-to-rebase patch. Also, I wanted to consult with everyone else about what we ought to call it. I also didn't attempt to implement this sharing for CTF. I don't really know much about CTF; but it seems like it ought to be possible. (Though I wonder if CTF wouldn't benefit more from simply bypassing partial symbols entirely.) Regression tested on x86-64 Fedora 28. I also did various tests by hand, and tested it by hand, under valgrind, on a gdb built with -fdebug-types-section. Like I mentioned earlier, this is a tricky series, so it would benefit from careful review. The main danger is that, if I missed a spot, we could end up in a situation where gdb will crash in a multi-inferior scenario. Tom