From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3311 invoked by alias); 1 Oct 2014 23:57:07 -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 3302 invoked by uid 89); 1 Oct 2014 23:57:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_05,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f171.google.com Received: from mail-yk0-f171.google.com (HELO mail-yk0-f171.google.com) (209.85.160.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 01 Oct 2014 23:57:05 +0000 Received: by mail-yk0-f171.google.com with SMTP id 79so580562ykr.2 for ; Wed, 01 Oct 2014 16:57:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=1u+TGxsCfQTaJhUqMeQJBI9a9l5Zs24fXGDz4/MluU0=; b=cWMVV3TuRzs7gP1LqdQrJb+cynZVMopSjDFDuDL6KPSiHhH4Jo+HMVS2w7+/yUAYMq ywyV046oWXYEe80NU3A2Jnhc+HI+RVC5ecT0j9KjAS9AKErZGpSOctxF52EmdkwCbPcH 9Ae2pxSxS0UN193kyIGQjQej1AEhY35ZCmk+ml+IAjGLEx3qNXmqKcGMaP9W2BBfL0fS FOdAU3GwpzAl59xghm8CgvcQRLgHwmyf5Jb2YVypYH5ed4yiy5youX7t1a+xFEzEHIMR TULQuNaXhzSOcqL4pAgQ0CsRZLmX1nteG5U0HjdoPwdbTjL7ZBTzu7TmzK024IetXOZA dzhg== X-Gm-Message-State: ALoCoQn1EqxMq2Oas3wl3YKPkURA+73EgJ+A1Y+z7giGh8dZ3/x6HiWrbpFufzwUuedHCExOuvpT MIME-Version: 1.0 X-Received: by 10.52.76.130 with SMTP id k2mr38914580vdw.9.1412207823385; Wed, 01 Oct 2014 16:57:03 -0700 (PDT) Received: by 10.52.181.65 with HTTP; Wed, 1 Oct 2014 16:57:03 -0700 (PDT) In-Reply-To: <21548.37770.274873.760290@ruffy2.mtv.corp.google.com> References: <20141001194439.GA15161@host2.jankratochvil.net> <21548.37770.274873.760290@ruffy2.mtv.corp.google.com> Date: Wed, 01 Oct 2014 23:57:00 -0000 Message-ID: Subject: Re: [patch] Fix 100x slowdown regression on DWZ files From: Doug Evans To: Jan Kratochvil Cc: gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00025.txt.bz2 On Wed, Oct 1, 2014 at 4:51 PM, Doug Evans wrote: > [...] > OTOH, I do want to avoid any confusion that this patch may inadvertently > introduce. For example, IIUC with your patch as is, > if we read a partial_unit first, before a compile_unit > that has the same stmt_list value, we'll do more processing in > dwarf_decode_lines than we really need to since we only need a file > number to symtab mapping. And if we later read in a compile_unit > with the same stmt_value we'll call dwarf_decode_lines again, > and this time we need the pc/line mapping it computes. > Whereas if we process these in the opposite order we'll only call > dwarf_decode_lines once. I'm sure this will be confusing at first > to some later developer going through this code. > [I could be missing something of course, and I'm happy for any corrections.] Ah, I guess the offset_in_dwz flag will ensure dwarf_decode_lines gets called twice regardless of order. But is that the only reason for the flag?