From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19744 invoked by alias); 1 Nov 2013 20:46:13 -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 19730 invoked by uid 89); 1 Nov 2013 20:46:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 01 Nov 2013 20:46:12 +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 rA1KkAnv032188 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 1 Nov 2013 16:46:10 -0400 Received: from barimba (ovpn-113-94.phx2.redhat.com [10.3.113.94]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rA1Kk8GB019767 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 1 Nov 2013 16:46:09 -0400 From: Tom Tromey To: Yao Qi Cc: Subject: Re: [PATCH 2/4] Perf test framework References: <1383291300-13917-1-git-send-email-yao@codesourcery.com> <1383291300-13917-3-git-send-email-yao@codesourcery.com> Date: Fri, 01 Nov 2013 20:46:00 -0000 In-Reply-To: <1383291300-13917-3-git-send-email-yao@codesourcery.com> (Yao Qi's message of "Fri, 1 Nov 2013 15:34:58 +0800") Message-ID: <877gcryhnz.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-11/txt/msg00021.txt.bz2 >>>>> "Yao" == Yao Qi writes: Yao> + # Compile source files of test case. BODY is the tcl code to do Yao> + # actual compilation and it should invoke 'PerfTest::compiled' if Yao> + # compilation is successful. Why not just have the body return success or failure and avoid having to call another method? Yao> + # The top-level interface to PerfTest. Yao> + # COMPILE is the tcl code to generate and compile source files. Yao> + # STARTUP is the tcl code to start up GDB. Yao> + # RUN is the tcl code to drive GDB to do some operations. Yao> + proc assemble {compile startup run} { This approach ends up using a lot of indentation, it seems to me. Slimmer approaches seem possible without losing anything. E.g., in patch #4 I see: +PerfTest::assemble { + compile { + for {set i 0} {$i < $SOLIB_COUNT} {incr i} { + But it seems to me that the "compile" part there is strictly redundant. We already know that this is the "compile" branch, so why not have "assemble" supply that? Then the above would read: PerfTest::assemble { for {set i 0} {$i < $SOLIB_COUNT} {incr i} { ... Tom