From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75962 invoked by alias); 25 Jul 2018 18:48:37 -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 75761 invoked by uid 89); 25 Jul 2018 18:48:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=everybody, sk:perror_ X-HELO: gateway21.websitewelcome.com Received: from gateway21.websitewelcome.com (HELO gateway21.websitewelcome.com) (192.185.45.95) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 25 Jul 2018 18:48:21 +0000 Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 4B385400C5A8F for ; Wed, 25 Jul 2018 13:48:11 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id iOotfGgT1bXuJiOpFfNEJo; Wed, 25 Jul 2018 13:48:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OXsSK50RFSEOUjCmpGuweofJ1LlP7m31nQ1G02mCXHs=; b=inB6EaVAfc++LGMDh0GzjFigmk QY9gY9iVTdc2fWbtNQ3EN4tO+FfphOKLW0E24KZ5rYV7uKycpBt13g0FQ7kh8WuUtbN3r0bfvAkxt Rwkxrv+hJl8qH7iLQ+PzeMxMv; Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:36388 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fiOot-003BiC-56; Wed, 25 Jul 2018 13:47:31 -0500 From: Tom Tromey To: Simon Marchi Cc: Subject: Re: [PATCH 3/3] Add DWARF index cache References: <1531173351-6351-1-git-send-email-simon.marchi@ericsson.com> <1531173351-6351-4-git-send-email-simon.marchi@ericsson.com> Date: Wed, 25 Jul 2018 18:48:00 -0000 In-Reply-To: <1531173351-6351-4-git-send-email-simon.marchi@ericsson.com> (Simon Marchi's message of "Mon, 9 Jul 2018 17:55:51 -0400") Message-ID: <87in5317b1.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-07/txt/msg00700.txt.bz2 >>>>> "Simon" == Simon Marchi writes: Simon> - The cache is disabled by default. I think once it's been out there Simon> and tested for a while, it could be turned on by default, so that Simon> everybody can enjoy it. I think the patch to enable it should also come with a patch to disable it in the test suite, since otherwise "make check" is going to fill up the cache and maybe have other unintended consequences. Simon> +static void Simon> +set_index_cache_command (const char *arg, int from_tty) Simon> +{ Simon> + printf_unfiltered ("\ Simon> +Missing arguments. See \"help set index-cache\" for help.\n"); This probably needs _(). I think there were a couple other (non-debug-print) cases of this as well. Simon> + printf_unfiltered ("The index cache is currently %s.\n", Simon> + global_index_cache.enabled () ? "enabled" : "disabled"); Like here. Simon> +static void Simon> +test_mkdir_recursive () Simon> +{ Simon> + char base[] = "/tmp/gdb-selftests-XXXXXX"; Simon> + Simon> + if (mkdtemp (base) == NULL) Simon> + perror_with_name ("mkdtemp"); Simon> + Simon> + std::string dir = string_printf ("%s/a/b", base); Simon> + SELF_CHECK (create_dir_and_check (dir.c_str ())); Simon> + Simon> + dir = string_printf ("%s/a/b/c//d/e/", base); Simon> + SELF_CHECK (create_dir_and_check (dir.c_str ())); It would be nice to clean up afterward. Simon> diff --git a/gdb/dwarf-index-write.h b/gdb/dwarf-index-write.h [...] Simon> +void write_psymtabs_to_index (struct dwarf2_per_objfile *dwarf2_per_objfile, Simon> + const char *dir, const char *basename, Simon> + dw_index_kind index_kind); I tend to prefer the explicit "extern" but I don't know if there's an official style. This patch seems fine to me and I like this feature -- I would use it for sure. I think it needs a doc + NEWS patch. I think it would be good to file bugs for the future features you mentioned in the email. Tom