mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 13:10:10 +01:00
mesa: Open-code hash walk in _mesa_HashPrint
Previously the deleted key data would get printed at the beginning and the end. I don't think that was intentional, so I changed it. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7171>
This commit is contained in:
parent
3c2489d2e4
commit
0e17bb509e
1 changed files with 7 additions and 9 deletions
|
|
@ -378,23 +378,21 @@ _mesa_HashWalkLocked(const struct _mesa_HashTable *table,
|
|||
hash_walk_unlocked(table, callback, userData);
|
||||
}
|
||||
|
||||
static void
|
||||
debug_print_entry(GLuint key, void *data, void *userData)
|
||||
{
|
||||
_mesa_debug(NULL, "%u %p\n", key, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Dump contents of hash table for debugging.
|
||||
*
|
||||
*
|
||||
* \param table the hash table.
|
||||
*/
|
||||
void
|
||||
_mesa_HashPrint(const struct _mesa_HashTable *table)
|
||||
{
|
||||
if (table->deleted_key_data)
|
||||
debug_print_entry(DELETED_KEY_VALUE, table->deleted_key_data, NULL);
|
||||
_mesa_HashWalk(table, debug_print_entry, NULL);
|
||||
_mesa_debug(NULL, "%u %p\n", DELETED_KEY_VALUE, table->deleted_key_data);
|
||||
|
||||
hash_table_foreach(table->ht, entry) {
|
||||
_mesa_debug(NULL, "%u %p\n", (unsigned)(uintptr_t) entry->key,
|
||||
entry->data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue