Lines Matching refs:hash
135 * All image descriptors are kept in a hash table.
140 * All process descriptors are kept in a hash table.
264 * strcmp(). This speeds up hash table lookups and saves memory if
268 LIST_ENTRY(pmcstat_string) ps_next; /* hash link */
304 * Compute a 'hash' value for a string.
310 unsigned hash;
312 for (hash = 2166136261; *s; s++)
313 hash = (hash ^ *s) * 16777619;
315 return (hash & PMCSTAT_HASH_MASK);
328 int hash, len;
333 hash = pmcstat_string_compute_hash(s);
339 ps->ps_hash = hash;
341 LIST_INSERT_HEAD(&pmcstat_string_hash[hash], ps, ps_next);
358 int hash, len;
360 hash = pmcstat_string_compute_hash(s);
363 LIST_FOREACH(ps, &pmcstat_string_hash[hash], ps_next)
364 if (ps->ps_len == len && ps->ps_hash == hash &&
811 int hash;
814 hash = pmcstat_string_lookup_hash(internedpath);
817 LIST_FOREACH(pi, &pmcstat_image_hash[hash], pi_next)
823 * Allocate a new entry and place it at the head of the hash
848 LIST_INSERT_HEAD(&pmcstat_image_hash[hash], pi, pi_next);
1240 uint32_t hash;
1244 hash = (uint32_t) pid & PMCSTAT_HASH_MASK; /* simplicity wins */
1246 LIST_FOREACH_SAFE(pp, &pmcstat_process_hash[hash], pp_next, pptmp)
1276 LIST_INSERT_HEAD(&pmcstat_process_hash[hash], pp, pp_next);
2105 /* Initialize hash tables */