This is the mail archive of the systemtap@sources.redhat.com 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]

Changes to runtime


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




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