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;
}
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);
}
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);
\
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; \
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)
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
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)
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)
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;
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;