mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
perfschema memory related instrumentation changes
This commit is contained in:
@ -20,6 +20,8 @@
|
||||
#include "table.h"
|
||||
|
||||
|
||||
PSI_memory_key key_memory_Filesort_buffer_sort_keys;
|
||||
|
||||
namespace {
|
||||
/**
|
||||
A local helper function. See comments for get_merge_buffers_cost().
|
||||
@ -128,7 +130,8 @@ uchar *Filesort_buffer::alloc_sort_buffer(uint num_records,
|
||||
the old values
|
||||
*/
|
||||
my_free(m_rawmem);
|
||||
if (!(m_rawmem= (uchar*) my_malloc(buff_size, MYF(MY_THREAD_SPECIFIC))))
|
||||
if (!(m_rawmem= (uchar*) my_malloc(key_memory_Filesort_buffer_sort_keys,
|
||||
buff_size, MYF(MY_THREAD_SPECIFIC))))
|
||||
{
|
||||
m_size_in_bytes= 0;
|
||||
DBUG_RETURN(0);
|
||||
@ -137,7 +140,8 @@ uchar *Filesort_buffer::alloc_sort_buffer(uint num_records,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(m_rawmem= (uchar*) my_malloc(buff_size, MYF(MY_THREAD_SPECIFIC))))
|
||||
if (!(m_rawmem= (uchar*) my_malloc(key_memory_Filesort_buffer_sort_keys,
|
||||
buff_size, MYF(MY_THREAD_SPECIFIC))))
|
||||
{
|
||||
m_size_in_bytes= 0;
|
||||
DBUG_RETURN(0);
|
||||
@ -177,7 +181,7 @@ void Filesort_buffer::sort_buffer(const Sort_param *param, uint count)
|
||||
uchar **buffer= NULL;
|
||||
if (!param->using_packed_sortkeys() &&
|
||||
radixsort_is_appliccable(count, param->sort_length) &&
|
||||
(buffer= (uchar**) my_malloc(count*sizeof(char*),
|
||||
(buffer= (uchar**) my_malloc(PSI_INSTRUMENT_ME, count*sizeof(char*),
|
||||
MYF(MY_THREAD_SPECIFIC))))
|
||||
{
|
||||
radixsort_for_str_ptr(m_sort_keys, count, param->sort_length, buffer);
|
||||
|
Reference in New Issue
Block a user