From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: noverlay branch Date: Mon, 10 Oct 2022 09:24:05 +0300 Message-ID: <83ilksi4ca.fsf@gnu.org> References: <87sfjzefvv.fsf@rfc20.org> <875ygt6gbj.fsf@rfc20.org> <87pmf04c7s.fsf@rfc20.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29596"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Matt Armstrong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 10 08:26:43 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ohmFP-0007VW-J8 for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Oct 2022 08:26:43 +0200 Original-Received: from localhost ([::1]:49710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohmFO-00034F-2F for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Oct 2022 02:26:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohmCp-000116-7E for emacs-devel@gnu.org; Mon, 10 Oct 2022 02:24:03 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41246) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohmCn-0007HY-FI; Mon, 10 Oct 2022 02:24:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=NuMNEzvbnJg+PuMLUCSCHIAvGUwTBNdlrasxKG9CuDA=; b=gReD0Rf3bxIu twTLF8VM6LR0PZ7/Dr3DhOuoMZJl7FSlt/uEKyBJVXpzcIuhU7Z8l4Zi5tpFf+ov7eMq9Zwm30PSX sPHB7jsZAD7WI3/XHsFKqh4f97JUNnTpciuTUcCFxU5CRE3Akr7ASVWV1xFnybGED9PmOjdWuBTwx S6bGCqK1j7+tyMGmGh8b0/Mt+/8exFBElvi3G1286l+tSSUBcJ4GwNHlOygpkjUlV0lDPizkf3Zvi u84iU8/F/yYxglqYUj+OzgRQNTsTtV42dzq2nZg7j2+DRO106sYz6rvhNnC5BO+DcLh/HViow/JAs R9vTkyse2ZZyKobS/3xX0g==; Original-Received: from [87.69.77.57] (port=2798 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohmCl-0002DI-9u; Mon, 10 Oct 2022 02:24:01 -0400 In-Reply-To: <87pmf04c7s.fsf@rfc20.org> (message from Matt Armstrong on Sun, 09 Oct 2022 19:57:43 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:297309 Archived-At: > From: Matt Armstrong > Cc: emacs-devel@gnu.org > Date: Sun, 09 Oct 2022 19:57:43 -0700 > > Subject: [PATCH 2/2] Add ./configure --enable-checking=overlays > > This enables expensive validation checks of overlay data structures. > Some are too expensive to turn on by default with > --enable-checking=all since they turn O(log N) algorithms into O(N) > algorithms. > > * src/itree.c (ENABLE_OVERLAY_CHECKING): define to 0 if undefined. > (struct check_subtree_result): new struct. > (check_subtree): renamed from recurse_check_tree, modified to use > check_subtree_result and check more invariants. > (check_tree): use check_subtree_result. > * configure.ac: add support for ENABLE_OVERLAY_CHECKING. Unless the checks are _very_ expensive, I'd prefer not to introduce yet another "enable-checking" knob, and instead condition those just by ENABLE_CHECKING. This will allow these assertions to be active in more builds, and will enhance our checking of their conditions. Please also consider whether we need some checks to be invoked manually, e.g. when something goes wrong in a session that might be related to overlays. E.g., a command that dumps the overlay tree(s) to stderr could be perhaps useful in such cases. Thanks.