From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11836 invoked by alias); 24 Feb 2006 15:51:09 -0000 Received: (qmail 11828 invoked by uid 22791); 24 Feb 2006 15:51:09 -0000 X-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 24 Feb 2006 15:51:08 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id k1OFp6Vf006193 for ; Fri, 24 Feb 2006 10:51:06 -0500 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id k1OFp6113391; Fri, 24 Feb 2006 10:51:06 -0500 Received: from touchme.toronto.redhat.com (IDENT:postfix@touchme.toronto.redhat.com [172.16.14.9]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id k1OFp5g2018089; Fri, 24 Feb 2006 10:51:05 -0500 Received: from ton.toronto.redhat.com (ton.toronto.redhat.com [172.16.14.15]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 98CB78000E9; Fri, 24 Feb 2006 10:51:05 -0500 (EST) Received: from ton.toronto.redhat.com (localhost.localdomain [127.0.0.1]) by ton.toronto.redhat.com (8.13.1/8.13.1) with ESMTP id k1OFp5if022593; Fri, 24 Feb 2006 10:51:05 -0500 Received: (from fche@localhost) by ton.toronto.redhat.com (8.13.1/8.13.1/Submit) id k1OFp554022592; Fri, 24 Feb 2006 10:51:05 -0500 Date: Fri, 24 Feb 2006 15:51:00 -0000 From: "Frank Ch. Eigler" To: "Daniel P. Berrange" Cc: systemtap@sources.redhat.com Subject: Re: command line arguments Message-ID: <20060224155105.GH20902@redhat.com> References: <20060223224218.GE20902@redhat.com> <20060224134222.GA21829@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060224134222.GA21829@redhat.com> User-Agent: Mutt/1.4.1i Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q1/txt/msg00623.txt.bz2 Hi - > [...] So I'd think named arguments would be clearer to use [...] > global samplerate = 1000 > probe timer.jiffies(samplerate) [...] One side problem with this is that probe point specifications only take literals as arguments, since they are evaluated at translation time. Ordinary globals can change their value. (While one might imagine a way of making this work for timers, it won't for dwarf-type probes.) To support default literals in the absence of command line args, we could conceivably support shell-style ${1-default} type bracketing. Initializing globals by name is something that the other ("dormant", module-params-based) part of the command line argument code is designed to enable. That part should serve most of your purposes, once it's finished. Note that we currently lack syntax to initialize globals within script ("global foo = LITERAL") but that's coming too. It is indeed a little odd to have this dichotomy between two types of parametrization, but then again, C has that too (cc -D vs. getopt). - FChE