summaryrefslogtreecommitdiffstats
path: root/runtime/map.c
diff options
context:
space:
mode:
authorhunt <hunt>2005-07-01 19:21:02 +0000
committerhunt <hunt>2005-07-01 19:21:02 +0000
commit9a45e491a7365db5178c4b6c33804ce3fc07ffe0 (patch)
treec1124725acd64bcf997f2d3035bcfb335bd6858e /runtime/map.c
parent5c826f9de142a9d4558e0b3aefab9c90d70c8c54 (diff)
downloadsystemtap-steved-9a45e491a7365db5178c4b6c33804ce3fc07ffe0.tar.gz
systemtap-steved-9a45e491a7365db5178c4b6c33804ce3fc07ffe0.tar.xz
systemtap-steved-9a45e491a7365db5178c4b6c33804ce3fc07ffe0.zip
2005-07-01 Martin Hunt <hunt@redhat.com>
* map.c (_stp_map_new): Call _stp_error() on a bad map type. Comment out dbug()s. * map-stat.c (_stp_map_new_hstat_log): Call _stp_warn(). (_stp_map_new_hstat_linear): Ditto. * map-int.c: Comment out dbug()s. * map-str.c: Comment out dbug()s. * map-keys.c: Use _stp_warn(). Comment out dbug()s.
Diffstat (limited to 'runtime/map.c')
-rw-r--r--runtime/map.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/runtime/map.c b/runtime/map.c
index 9d9b1fa2..179f5098 100644
--- a/runtime/map.c
+++ b/runtime/map.c
@@ -149,7 +149,7 @@ static MAP _stp_map_new(unsigned max_entries, int type, int key_size, int data_s
m->maxnum = max_entries;
m->type = type;
if (type >= END) {
- dbug ("map_new: unknown type %d\n", type);
+ _stp_error("map_new: unknown type %d\n", type);
return NULL;
}
if (max_entries) {
@@ -172,7 +172,7 @@ static MAP _stp_map_new(unsigned max_entries, int type, int key_size, int data_s
for (i = max_entries - 1; i >= 0; i--) {
e = i * size + tmp;
- dbug ("e=%lx\n", (long)e);
+ //dbug ("e=%lx\n", (long)e);
list_add(e, &m->pool);
((struct map_node *)e)->map = m;
}
@@ -193,7 +193,7 @@ void _stp_map_key_del(MAP map)
{
struct map_node *m;
- dbug ("create=%d key=%lx\n", map->create, (long)map->key);
+ //dbug("create=%d key=%lx\n", map->create, (long)map->key);
if (map == NULL)
return;
@@ -233,7 +233,7 @@ struct map_node *_stp_map_start(MAP map)
if (map == NULL)
return NULL;
- dbug ("%lx\n", (long)map->head.next);
+ //dbug ("%lx\n", (long)map->head.next);
if (list_empty(&map->head))
return NULL;
@@ -256,9 +256,6 @@ struct map_node *_stp_map_iter(MAP map, struct map_node *m)
if (map == NULL)
return NULL;
- dbug ("%lx next=%lx prev=%lx map->head.next=%lx\n", (long)m,
- (long)m->lnode.next, (long)m->lnode.prev, (long)map->head.next);
-
if (m->lnode.next == &map->head)
return NULL;
@@ -280,7 +277,7 @@ void _stp_map_del(MAP map)
static int print_keytype (char *fmt, int type, key_data *kd)
{
- dbug ("*fmt = %c\n", *fmt);
+ //dbug ("*fmt = %c\n", *fmt);
switch (type) {
case STRING:
if (*fmt != 's')
@@ -363,7 +360,7 @@ void _stp_map_print (MAP map, const char *fmt)
struct map_node *ptr;
int type, num;
key_data kd;
- dbug ("print map %lx fmt=%s\n", (long)map, fmt);
+ //dbug ("print map %lx fmt=%s\n", (long)map, fmt);
foreach (map, ptr) {
char *f = (char *)fmt;
@@ -397,10 +394,10 @@ static struct map_node *__stp_map_create (MAP map)
}
m = (struct map_node *)map->head.next;
hlist_del_init(&m->hnode);
- dbug ("got %lx off head\n", (long)m);
+ //dbug ("got %lx off head\n", (long)m);
} else {
m = (struct map_node *)map->pool.next;
- dbug ("got %lx off pool\n", (long)m);
+ //dbug ("got %lx off pool\n", (long)m);
}
list_move_tail(&m->lnode, &map->head);