Lines Matching refs:hash

49  * Rotate the hash by LSHIFT bits, then XOR the next word.
378 dt_ahash_t *hash = &agp->dtat_hash;
381 if ((hash->dtah_sizendx + 1) >= DTRACE_NUM_AHASHSIZE) {
389 old_size = dtrace_ahashsize[hash->dtah_sizendx];
390 hash->dtah_sizendx++;
391 new_size = new_hash.dtah_size = dtrace_ahashsize[hash->dtah_sizendx];
395 hash->dtah_sizendx--;
402 for (h = hash->dtah_hash[i]; h != NULL; ) {
421 * All moved, now update hash info.
423 hash->dtah_size = new_hash.dtah_size;
424 free(hash->dtah_hash);
425 hash->dtah_hash = new_hash.dtah_hash;
426 hash->dtah_all = new_hash.dtah_all;
440 dt_ahash_t *hash = &agp->dtat_hash;
471 if (hash->dtah_hash == NULL) {
474 hash->dtah_size = dtrace_ahashsize[hash->dtah_sizendx];
475 size = hash->dtah_size * sizeof (dt_ahashent_t *);
477 if ((hash->dtah_hash = malloc(size)) == NULL)
479 bzero(hash->dtah_hash, size);
543 * are not using the entire hash.
546 ndx = hashval % dtrace_ahashsize[hash->dtah_sizendx];
548 for (h = hash->dtah_hash[ndx]; h != NULL; h = h->dtahe_next) {
599 * so, see if we should grow the hash. (If it cannot be grown,
600 * just add the entry to the existing hash.)
602 if ((hash->dtah_nent
603 > (dtrace_ahashsize[hash->dtah_sizendx]*2)) &&
689 ndx = h->dtahe_hashval % hash->dtah_size;
690 if (hash->dtah_hash[ndx] != NULL)
691 hash->dtah_hash[ndx]->dtahe_prev = h;
693 h->dtahe_next = hash->dtah_hash[ndx];
694 hash->dtah_hash[ndx] = h;
696 if (hash->dtah_all != NULL)
697 hash->dtah_all->dtahe_prevall = h;
699 h->dtahe_nextall = hash->dtah_all;
700 hash->dtah_all = h;
702 hash->dtah_nent++;
1214 * First, remove this hash entry from its hash chain.
1219 dt_ahash_t *hash = &agp->dtat_hash;
1220 size_t ndx = h->dtahe_hashval % hash->dtah_size;
1222 assert(hash->dtah_hash[ndx] == h);
1223 hash->dtah_hash[ndx] = h->dtahe_next;
1230 * Now remove it from the list of all hash entries.
1235 dt_ahash_t *hash = &agp->dtat_hash;
1237 assert(hash->dtah_all == h);
1238 hash->dtah_all = h->dtahe_nextall;
1303 dt_ahash_t *hash = &dtp->dt_aggregate.dtat_hash;
1305 for (h = hash->dtah_all; h != NULL; h = next) {
1307 * dt_aggwalk_rval() can potentially remove the current hash
1308 * entry; we need to load the next hash entry before calling
1327 dt_ahash_t *hash = &agp->dtat_hash;
1330 for (h = hash->dtah_all; h != NULL; h = h->dtahe_nextall)
1338 for (h = hash->dtah_all, i = 0; h != NULL; h = h->dtahe_nextall)
1449 dt_ahash_t *hash = &agp->dtat_hash;
1532 for (h = hash->dtah_all; h != NULL; h = h->dtahe_nextall) {
1733 for (h = hash->dtah_all, i = 0; h != NULL; h = h->dtahe_nextall) {
1907 dt_ahash_t *hash = &agp->dtat_hash;
1914 for (h = hash->dtah_all; h != NULL; h = h->dtahe_nextall) {
1933 dt_ahash_t *hash = &agp->dtat_hash;
1938 if (hash->dtah_hash == NULL) {
1939 assert(hash->dtah_all == NULL);
1941 free(hash->dtah_hash);
1943 for (h = hash->dtah_all; h != NULL; h = next) {
1958 hash->dtah_hash = NULL;
1959 hash->dtah_all = NULL;
1960 hash->dtah_size = 0;
1961 hash->dtah_nent = 0;