This is the mail archive of the
systemtap@sources.redhat.com
mailing list for the systemtap project.
Changes to runtime
- From: Martin Hunt <hunt at redhat dot com>
- To: "systemtap at sources dot redhat dot com" <systemtap at sources dot redhat dot com>
- Date: Mon, 20 Jun 2005 10:57:14 -0700
- Subject: Changes to runtime
- Organization: Red Hat Inc.
Last Friday I checked in aggregations. While reorganizing the maps
statistics to share code with the statistics aggregations, I made a few
changes to the way map values are handles. You no longer include "map-
values.c". Instead you declare which values you will need before the
first time you include "map-keys.c". For example,
---------------
/* These are the possible values a map can have. */
/* Comment out unused ones. Comment out all if you don't need maps. */
#define NEED_INT64_VALS
#define NEED_STRING_VALS
#define NEED_STAT_VALS
/* now for each set of keys, define the key type and include map-keys.c
*/
/* This define a single key of int64, for example map1[2048] */
#define KEY1_TYPE INT64
#include "map-keys.c"
/* This generates code to handle keys of int64,string, for example */
/* map2[1000,"Cobalt"] */
#define KEY1_TYPE INT64
#define KEY2_TYPE STRING
#include "map-keys.c"
/* After defining all your key combinations, include map.c */
#include "map.c"
----------------
Also, to add to maps statistics, you now use _stp_map_add_int64(), which
is the same functions you use to add to int64 maps.
Martin