This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: Sockets tapset and script
- From: "Stone, Joshua I" <joshua dot i dot stone at intel dot com>
- To: "David Smith" <dsmith at redhat dot com>, "Martin Hunt" <hunt at redhat dot com>
- Cc: "Mike Mason" <mmlnx at us dot ibm dot com>, <systemtap at sources dot redhat dot com>
- Date: Tue, 21 Nov 2006 16:43:36 -0800
- Subject: RE: Sockets tapset and script
On Tuesday, November 21, 2006 1:27 PM, David Smith wrote:
> Hmm, perhaps we need a bugzilla asking to support array
> initialization, perhaps like this:
> global xyz = { 1, 5, 10, 15 }
> global abc = { "zero", "one", "two", "three", "four" }
Remember that these are really associative arrays (à la maps in C++ STL, hashes in Perl, dictionaries in Python, etc.). So while your example implies a zero-based integer key, that's not necessarily the case.
We could treat it that missing keys are implied to count from zero, and then provide a syntax for specifying keys explicitly as well.
global sig_num_to_name = { 1:"SIGHUP", 2:"SIGINT", ...}
global sig_name_to_num = { "SIGHUP":1, "SIGINT":2, ...}
global times_table = { [1,2]:2, [5,6]:30, ...}
Josh