From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108591 invoked by alias); 13 Aug 2015 12:45:10 -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 108574 invoked by uid 89); 13 Aug 2015 12:45:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mail-wi0-f178.google.com Received: from mail-wi0-f178.google.com (HELO mail-wi0-f178.google.com) (209.85.212.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 13 Aug 2015 12:45:08 +0000 Received: by wicja10 with SMTP id ja10so150044326wic.1 for ; Thu, 13 Aug 2015 05:45:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=og4uFc1DfSRssrT4ucA38ALhiKSvlv6S4NMJI1/pa7U=; b=XavT7VqDmVZPjo3ZEWUG0x3mOiceWK592ExxEKgMA8GWhW+mP+pPQhbd2tuzO3R3y5 dd15VaXww4Hek967HOcgCHLx86kw3CrNaNySxIfGXu4TmYWOKsS59nuC5rddXoYSPyWa UjnyawvNRZGetqJLR5McEiIpJkDAbnU0MOyxgRGaLKoFsTODyqjSBa9wzK4FtvYIIkhM 1dggUkI2MQMiGvcSoiZ5Fp+vo4UCotDJLerg1mScWrKAn8oVIgx6PL0G6JY9OQJMKbMB 1K6VlFa7v0np68Mu324mIJxh//zFXLDY7WKv8B3CytWcA+VJqIzSb2Oxfd+CBTrTVhFn Yi6w== X-Gm-Message-State: ALoCoQnYxy3gxt1KOnBxL6rSE3djNTNJrgAxVo8Ldpph2iq/EbMIP4tpDuy3aWKuzrIZ8mc7+JGW X-Received: by 10.194.122.200 with SMTP id lu8mr74604066wjb.83.1439469904582; Thu, 13 Aug 2015 05:45:04 -0700 (PDT) Received: from localhost (cust64-dsl91-135-5.idnet.net. [91.135.5.64]) by smtp.gmail.com with ESMTPSA id bq7sm3216692wjc.31.2015.08.13.05.45.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Aug 2015 05:45:03 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH v2 0/3] bfd cache: tighten match criteria and debug commands. Date: Thu, 13 Aug 2015 12:45:00 -0000 Message-Id: X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00342.txt.bz2 This is a revision of a patch set that I posted here: https://sourceware.org/ml/gdb-patches/2015-04/msg00471.html The differences in each patch are as follows: 1/3 I hope that I addressed everyones comments. I added comparison of inode and device-id fields as suggested by Pedro. Gary pointed out a few places where we fake the stat results, however, these are all for specialised targets that I don't think will be using the bfd caching anyway, the caching is only used for local files, ones that can be targeted with a local 'stat' command. It was also pointed out that Windows does not set the inode field of the stat struture. Pedro semi-suggested that for such targets caching should be disabled, while Eli pointed out Windows has an alternative API to get the similar data. In the end I did neither of these things for the following reasons: - Caching provides a general benefit in the common use case. The problem area is basically an edge case in automatted testing. Punishing all users (on Windows) because of such a small edge case, and one that has existed for a long time feels harsh. - To slightly mitigate the above I have left the check of file size in place. In my experience this is often enough to make the problem invisible. - I don't have a Windows machine for development or testing, but if someone else wanted to make use of the Windows API to supply an inode like result, this can be easily filled in within gdb_bfd_open. 2/3 3/3 Added documentation to the gdb.texinfo file. I created a whole new section to talk about file caching. I don't know if I filled in enough detail, but hopefully what I've written makes sense and is a starting point. I placed all the command documentation there, even the maintenance commands, there is precedent for having maintenance commands mixed in with other commands so I hope that that will also be acceptable. Andrew Burgess (3): gdb: Improve cache matching criteria for the bfd cache. gdb: New maintenance command to disable bfd sharing. gdb: Add debug tracing for bfd cache activity. gdb/ChangeLog | 26 ++++++++++++ gdb/NEWS | 8 ++++ gdb/doc/ChangeLog | 11 +++++ gdb/doc/gdb.texinfo | 45 +++++++++++++++++--- gdb/gdb_bfd.c | 118 +++++++++++++++++++++++++++++++++++++++++++++++++--- 5 files changed, 197 insertions(+), 11 deletions(-) -- 2.4.0