From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94517 invoked by alias); 19 Feb 2018 17:02:40 -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 94274 invoked by uid 89); 19 Feb 2018 17:02:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Feb 2018 17:02:37 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w1JH2TUO001722 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 19 Feb 2018 12:02:34 -0500 Received: from [10.0.0.11] (192-222-251-162.qc.cable.ebox.net [192.222.251.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 80CAA1E059; Mon, 19 Feb 2018 12:02:29 -0500 (EST) Subject: Re: [PATCH v3 1/1] Don't rewind PC for GHC generated frames To: Bartosz Nitka Cc: GDB Patches References: <20180204000647.19188-1-niteria@gmail.com> <20180204000647.19188-2-niteria@gmail.com> <8c6e36c70ca0ce3f0980971bfa50c160@polymtl.ca> From: Simon Marchi Message-ID: <0d7638fb-8786-43cb-0d38-c9570f923f73@polymtl.ca> Date: Mon, 19 Feb 2018 17:02:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 19 Feb 2018 17:02:29 +0000 X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00252.txt.bz2 On 2018-02-19 08:10 AM, Bartosz Nitka wrote: > Hi Simon, > > Thanks for taking a look at the updated version. > >> I hoped there would be some comments from others. > > Is there anyone we could ask directly? I don't have anybody in particular in mind. >> In particular, is anybody >> able to tell if adding a call to find_pc_compunit_symtab in >> get_frame_address_in_block is a performance concern? How frequently is >> get_frame_address_in_block called, and how costly is find_pc_compunit_symtab >> to call? > > This is a valid concern. > When I originally made this change, I was focusing on making dwarf2_frame_cache > work. dwarf2_frame_cache calls get_frame_address_in_block and then calls > dwarf2_frame_find_quirks. dwarf2_frame_find_quirks calls > find_pc_compunit_symtab. > That makes me think that for this code path there should be no difference. > > That's only one code path, I haven't analyzed others. If performance > turned out to be a > problem, then undoing the effect of get_frame_address_in_block in > dwarf2_frame_cache > would get me 90% of what I care about currently (unwinding). > > That said, there must be a way to resolve this in a data driven way. > Are there any pre-existing benchmarks I can run? > Is there a scenario that I can benchmark to resolve the questions above? You can try running the tests in testsuite/gdb.perf (see the README in there). These tests stress GDB in some very specific ways, so they may not catch all performance regressions in general, but it might still be a good idea to run them anyway. Can you do that? >> However, please tell me if you are fine with >> my suggestion below. > > Yes, that's a good change. Thanks! If it helps move things along I'm > happy to submit > an updated version. I don't think it will be necessary, I can adjust the patch before pushing it. Simon