diff options
Diffstat (limited to 'storage/xtradb/mem/mem0dbg.c')
-rw-r--r-- | storage/xtradb/mem/mem0dbg.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/storage/xtradb/mem/mem0dbg.c b/storage/xtradb/mem/mem0dbg.c index 1cd2ff15bab..ae43d6097a6 100644 --- a/storage/xtradb/mem/mem0dbg.c +++ b/storage/xtradb/mem/mem0dbg.c @@ -24,12 +24,20 @@ but is included in mem0mem.* ! Created 6/9/1994 Heikki Tuuri *************************************************************************/ +#include "ha_prototypes.h" + #ifdef UNIV_MEM_DEBUG # ifndef UNIV_HOTBACKUP /* The mutex which protects in the debug version the hash table containing the list of live memory heaps, and also the global variables below. */ -UNIV_INTERN mutex_t mem_hash_mutex; +UNIV_INTERN mutex_t mem_hash_mutex; + +#ifdef UNIV_PFS_MUTEX +/* Key to register mem_hash_mutex with performance schema */ +UNIV_INTERN mysql_pfs_key_t mem_hash_mutex_key; +#endif /* UNIV_PFS_MUTEX */ + # endif /* !UNIV_HOTBACKUP */ /* The following variables contain information about the @@ -149,7 +157,7 @@ mem_init( /* Initialize the hash table */ ut_a(FALSE == mem_hash_initialized); - mutex_create(&mem_hash_mutex, SYNC_MEM_HASH); + mutex_create(mem_hash_mutex_key, &mem_hash_mutex, SYNC_MEM_HASH); for (i = 0; i < MEM_HASH_SIZE; i++) { UT_LIST_INIT(*mem_hash_get_nth_cell(i)); @@ -394,7 +402,7 @@ mem_hash_remove( fprintf(stderr, "Memory heap or buffer freed in %s line %lu" " did not exist.\n", - file_name, (ulong) line); + innobase_basename(file_name), (ulong) line); ut_error; } @@ -413,8 +421,9 @@ mem_hash_remove( "in %s line %lu and tried to free in %s line %lu.\n" "Hex dump of 400 bytes around memory heap" " first block start:\n", - node->nth_heap, node->file_name, (ulong) node->line, - file_name, (ulong) line); + node->nth_heap, + innobase_basename(node->file_name), (ulong) node->line, + innobase_basename(file_name), (ulong) line); ut_print_buf(stderr, (byte*)node->heap - 200, 400); fputs("\nDump of the mem heap:\n", stderr); mem_heap_validate_or_print(node->heap, NULL, TRUE, &error, @@ -757,7 +766,8 @@ mem_validate_no_assert(void) "Inconsistency in memory heap" " or buffer created\n" "in %s line %lu.\n", - node->file_name, node->line); + innobase_basename(node->file_name), + node->line); mutex_exit(&mem_hash_mutex); @@ -983,7 +993,8 @@ mem_print_info_low( fprintf(outfile, "%lu: file %s line %lu of size %lu phys.size %lu" " with %lu blocks, type %lu\n", - node->nth_heap, node->file_name, node->line, + node->nth_heap, + innobase_basename(node->file_name), node->line, allocated_mem, ph_size, n_blocks, (node->heap)->type); next_heap: |