This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: command line arguments


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]