From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28911 invoked by alias); 27 Jan 2012 00:58:53 -0000 Received: (qmail 28904 invoked by uid 22791); 27 Jan 2012 00:58:52 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 Jan 2012 00:58:25 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0R0wPx6022630 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 26 Jan 2012 19:58:25 -0500 Received: from fche.csb (vpn-8-160.rdu.redhat.com [10.11.8.160]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q0R0wPra015513; Thu, 26 Jan 2012 19:58:25 -0500 Received: by fche.csb (Postfix, from userid 2569) id 729FD58156; Thu, 26 Jan 2012 19:58:24 -0500 (EST) To: William Cohen Cc: systemtap@sourceware.org Subject: Re: [PATCH] Add the stopwatch.stp tapset References: <1327610194-13346-1-git-send-email-wcohen@redhat.com> From: fche@redhat.com (Frank Ch. Eigler) Date: Fri, 27 Jan 2012 00:58:00 -0000 In-Reply-To: <1327610194-13346-1-git-send-email-wcohen@redhat.com> (William Cohen's message of "Thu, 26 Jan 2012 15:36:34 -0500") Message-ID: User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2012-q1/txt/msg00053.txt.bz2 William Cohen writes: > The stopwatch.stp tapset provides multiple, independent timers to user > scripts. Stopwatches can be created by the user script at > anytime. [...] Might you consider a somewhat simpler API? function start_stopwatch (name:string) { } function stop_stopwatch (name:string) { } function read_stopwatch_ns:long (name:string) { } function read_stopwatch_us:long (name:string) { } function read_stopwatch_ms:long (name:string) { } function read_stopwatch_s:long (name:string) { } i.e., no explicit create (the tapset can create it on first encounter of a new name), no enums (encode start/stop as distinct functions), and explicit reader functions. - FChE