From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1924 invoked by alias); 1 Aug 2013 17:10:06 -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 1896 invoked by uid 89); 1 Aug 2013 17:10:06 -0000 X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 01 Aug 2013 17:10:06 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r71H9vsN021215 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 1 Aug 2013 13:09:57 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r71H9uWe003102; Thu, 1 Aug 2013 13:09:56 -0400 Message-ID: <51FA9663.80101@redhat.com> Date: Thu, 01 Aug 2013 17:10:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Tom Tromey CC: gdb-patches@sourceware.org Subject: Re: [PATCH 4/4] add caching procs to test suite References: <1374073124-23602-1-git-send-email-tromey@redhat.com> <1374073124-23602-5-git-send-email-tromey@redhat.com> In-Reply-To: <1374073124-23602-5-git-send-email-tromey@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-08/txt/msg00039.txt.bz2 On 07/17/2013 03:58 PM, Tom Tromey wrote: > In the fully parallel mode, each .exp file can be run in parallel (at > least conceptually -- the actual split may not be so severe). This > means that procs that compute a result and cache it are not going to > function very well. The test they run will be invoked over and over. > > This patch introduces a generic caching mechanism and changes these > procs to use it. > > A caching proc is defined using gdb_caching_proc, which works like > "proc", except that it caches the result of the body. In parallel > mode, the cache is kept on disk; it is cleared by the Makefile at the > start of a test run. Man, this is neat. > - # Use the cached value, if it exists. Cache value per "board" to handle > - # runs with multiple options (e.g. unix/{-m32,-64}) correctly. Is this not a concern with the new scheme? > +gdb_caching_proc is_ilp32_target { > set me "is_ilp32_target" > - set board [target_info name] > - if [info exists is_ilp32_target_saved($board)] { > - verbose "$me: returning saved $is_ilp32_target_saved($board)" 2 > - return $is_ilp32_target_saved($board) > - } IMO, if you stripped out the GDB_PARALLEL bits, this should stand on its own as cleanup, and could go in first... -- Pedro Alves