remove debug messages
[archipelago] / xseg / xtypes / xhash.c
index b975027..f174a1e 100644 (file)
@@ -38,8 +38,8 @@ static inline xhashidx hash_string(xhashidx key)
        if (hv == Noxhashidx)
                hv = Noxhashidx -1;
 
-       XSEGLOG("String %s (%lx). Hash value: %llu",
-                       string, string, hv);
+//     XSEGLOG("String %s (%lx). Hash value: %llu",
+//                     string, string, hv);
        return hv; 
 }
 
@@ -48,10 +48,10 @@ static inline int cmp_string(xhashidx key1, xhashidx key2)
        char *string1 = (char *) key1;
        char *string2 = (char *) key2;
        int value = !strcmp(string1, string2);
-       XSEGLOG("String1 %s (%lx), string2: %s(%lx), r: %d",
-                       string1, (unsigned long) string1,
-                       string2, (unsigned long) string2,
-                       value);
+//     XSEGLOG("String1 %s (%lx), string2: %s(%lx), r: %d",
+//                     string1, (unsigned long) string1,
+//                     string2, (unsigned long) string2,
+//                     value);
 
        return (value);
 }
@@ -260,7 +260,7 @@ xhash_resize__(struct xhash *xhash, xhashidx new_size_shift, bool vals)
 int
 xhash_delete__(xhash_t *xhash, xhashidx key, bool vals)
 {
-    XSEGLOG("Deleting %lx", key);
+//    XSEGLOG("Deleting %lx", key);
     xhash_cmp_fun_t cmp_fun = types_fun[xhash->type].cmp_fun;
     xhash_hash_fun_t hash_fun = types_fun[xhash->type].hash_fun; 
     xhashidx perturb = hash_fun(key);
@@ -400,8 +400,6 @@ xhash_grow_check(xhash_t *xhash)
                                                       \
     INCSTAT(xhash->inserts);                          \
     for (;;) {                                        \
-    XSEGLOG("size %llu, perturb %llu idx %llu mask %llu",\
-                   size, perturb, idx, mask);          \
         if ( !item_valid(xhash, idx, vals_flag) ){    \
              PHUPD_SET__(xhash, idx, key, val);       \
              break;                                   \
@@ -425,7 +423,7 @@ set_val(xhash_t *p, xhashidx idx, xhashidx key, xhashidx val)
     xhashidx *vals = xhash_vals(p);
     kvs[idx] = key;
     vals[idx] = val;
-    XSEGLOG("Seting idx %llu to key: %lx, val: %lx", idx, key, val);
+    //XSEGLOG("Seting idx %llu to key: %lx, val: %lx", idx, key, val);
 }
 
 void static inline xhash_upd_set(xhash_t *p, xhashidx idx, xhashidx key, xhashidx val)
@@ -437,7 +435,7 @@ void static inline xhash_upd_set(xhash_t *p, xhashidx idx, xhashidx key, xhashid
     p->used++;
     kvs[idx] = key;
     vals[idx] = val;
-    XSEGLOG("Seting idx %llu to key: %lx, val: %lx", idx, key, val);
+    //XSEGLOG("Seting idx %llu to key: %lx, val: %lx", idx, key, val);
 }
 
 static inline void
@@ -449,7 +447,7 @@ inc_val(xhash_t *p, xhashidx idx, xhashidx val)
 
 void xhash_insert__(struct xhash *xhash, xhashidx key, xhashidx val)
 {
-    XSEGLOG("inserting %lx", key);
+    //XSEGLOG("inserting %lx", key);
     //fprintf(stderr, "insert: (%lu,%lu)\n", key, val);
     #define PHUPD_UPDATE__(_p, _i, _k, _v) set_val(_p, _i, _k, _v)
     #define PHUPD_SET__(_p, _i, _k, _v)    xhash_upd_set(_p, _i, _k, _v)
@@ -487,7 +485,7 @@ int xhash_freql_update(struct xhash *xhash, xhashidx key, xhashidx val)
 xhash_t *
 xhash_resize(xhash_t *xhash, xhashidx new_size_shift, xhash_t *new)
 {
-    XSEGLOG("Resizing xhash from %llu to %llu", xhash->size_shift, new_size_shift);
+    //XSEGLOG("Resizing xhash from %llu to %llu", xhash->size_shift, new_size_shift);
     xhashidx i;
     int f = !!new;
     if (!f)
@@ -537,7 +535,7 @@ int xhash_delete(struct xhash *xhash, xhashidx key)
 
 int xhash_lookup__(xhash_t *xhash, xhashidx key, xhashidx *idx_ret, bool vals)
 {
-    XSEGLOG("looking up %lx", key);
+    //XSEGLOG("looking up %lx", key);
     xhash_cmp_fun_t cmp_fun = types_fun[xhash->type].cmp_fun;
     xhash_hash_fun_t hash_fun = types_fun[xhash->type].hash_fun; 
     xhashidx size_shift = xhash->size_shift;
@@ -549,8 +547,8 @@ int xhash_lookup__(xhash_t *xhash, xhashidx key, xhashidx *idx_ret, bool vals)
 
     INCSTAT(xhash->lookups);
     for (;;) {
-       XSEGLOG("size %llu, perturb %llu idx %llu mask %llu",\
-                   size, perturb, idx, mask);          \
+       //XSEGLOG("size %llu, perturb %llu idx %llu mask %llu",
+       //          size, perturb, idx, mask);          
         if ( item_unused(xhash, idx, vals) )
             return -XHASH_EEXIST;