summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2020-01-29 13:50:26 +0100
committerSergei Golubchik <serg@mariadb.org>2020-03-10 19:24:22 +0100
commit7c58e97bf6f80a251046c5b3e7bce826fe058bd6 (patch)
tree7d32d26b320cf83296ee0ede2ea164ad116c4de8 /extra
parent2ac3121af2767186c489054db5d4871d04b8eef4 (diff)
downloadmariadb-git-7c58e97bf6f80a251046c5b3e7bce826fe058bd6.tar.gz
perfschema memory related instrumentation changes
Diffstat (limited to 'extra')
-rw-r--r--extra/comp_err.c36
-rw-r--r--extra/mariabackup/backup_mysql.cc8
-rw-r--r--extra/mariabackup/ds_buffer.cc11
-rw-r--r--extra/mariabackup/ds_compress.cc21
-rw-r--r--extra/mariabackup/ds_local.cc6
-rw-r--r--extra/mariabackup/ds_stdout.cc10
-rw-r--r--extra/mariabackup/ds_tmpfile.cc15
-rw-r--r--extra/mariabackup/ds_xbstream.cc9
-rw-r--r--extra/mariabackup/innobackupex.cc3
-rw-r--r--extra/mariabackup/xbstream.cc8
-rw-r--r--extra/mariabackup/xbstream_read.cc4
-rw-r--r--extra/mariabackup/xbstream_write.cc4
-rw-r--r--extra/mariabackup/xtrabackup.cc2
-rw-r--r--extra/my_print_defaults.c3
-rw-r--r--extra/replace.c49
-rw-r--r--extra/resolve_stack_dump.c4
16 files changed, 97 insertions, 96 deletions
diff --git a/extra/comp_err.c b/extra/comp_err.c
index e6ea9acccb9..c83a416d2a7 100644
--- a/extra/comp_err.c
+++ b/extra/comp_err.c
@@ -886,7 +886,7 @@ static char *get_word(char **str)
DBUG_ENTER("get_word");
*str= find_end_of_word(start);
- DBUG_RETURN(my_strndup(start, (uint) (*str - start),
+ DBUG_RETURN(my_strndup(PSI_NOT_INSTRUMENTED, start, (uint) (*str - start),
MYF(MY_WME | MY_FAE)));
}
@@ -920,7 +920,7 @@ static struct message *parse_message_string(struct message *new_message,
while (*str != ' ' && *str != '\t' && *str)
str++;
if (!(new_message->lang_short_name=
- my_strndup(start, (uint) (str - start),
+ my_strndup(PSI_NOT_INSTRUMENTED, start, (uint) (str - start),
MYF(MY_WME | MY_FAE))))
DBUG_RETURN(0); /* Fatal error */
DBUG_PRINT("info", ("msg_slang: %s", new_message->lang_short_name));
@@ -940,9 +940,9 @@ static struct message *parse_message_string(struct message *new_message,
start= str + 1;
str= parse_text_line(start);
- if (!(new_message->text= my_strndup(start, (uint) (str - start),
- MYF(MY_WME | MY_FAE))))
- DBUG_RETURN(0); /* Fatal error */
+ if (!(new_message->text= my_strndup(PSI_NOT_INSTRUMENTED, start,
+ (uint) (str - start), MYF(MY_WME | MY_FAE))))
+ DBUG_RETURN(0);
DBUG_PRINT("info", ("msg_text: %s", new_message->text));
DBUG_RETURN(new_message);
@@ -955,11 +955,11 @@ static struct errors *generate_empty_message(uint d_code, my_bool skip)
struct message message;
/* create a new element */
- if (!(new_error= (struct errors *) my_malloc(sizeof(*new_error),
- MYF(MY_WME))))
+ if (!(new_error= (struct errors *) my_malloc(PSI_NOT_INSTRUMENTED,
+ sizeof(*new_error), MYF(MY_WME))))
return(0);
- if (my_init_dynamic_array(&new_error->msg, sizeof(struct message), 0, 1,
- MYF(0)))
+ if (my_init_dynamic_array(&new_error->msg, PSI_NOT_INSTRUMENTED,
+ sizeof(struct message), 0, 1, MYF(0)))
return(0); /* OOM: Fatal error */
new_error->er_name= NULL;
@@ -970,8 +970,10 @@ static struct errors *generate_empty_message(uint d_code, my_bool skip)
message.text= 0; /* If skip set, don't generate a text */
- if (!(message.lang_short_name= my_strdup(default_language, MYF(MY_WME))) ||
- (!skip && !(message.text= my_strdup("", MYF(MY_WME)))))
+ if (!(message.lang_short_name= my_strdup(PSI_NOT_INSTRUMENTED,
+ default_language, MYF(MY_WME))) ||
+ (!skip && !(message.text= my_strdup(PSI_NOT_INSTRUMENTED,
+ "", MYF(MY_WME)))))
return(0);
/* Can't fail as msg is preallocated */
@@ -992,13 +994,14 @@ static struct errors *parse_error_string(char *str, int er_count)
DBUG_PRINT("enter", ("str: %s", str));
/* create a new element */
- if (!(new_error= (struct errors *) my_malloc(sizeof(*new_error),
- MYF(MY_WME))))
+ if (!(new_error= (struct errors *) my_malloc(PSI_NOT_INSTRUMENTED,
+ sizeof(*new_error), MYF(MY_WME))))
DBUG_RETURN(0);
new_error->next_error= 0;
- if (my_init_dynamic_array(&new_error->msg, sizeof(struct message), 0, 0, MYF(0)))
- DBUG_RETURN(0); /* OOM: Fatal error */
+ if (my_init_dynamic_array(&new_error->msg, PSI_NOT_INSTRUMENTED,
+ sizeof(struct message), 0, 0, MYF(0)))
+ DBUG_RETURN(0);
/* getting the error name */
str= skip_delimiters(str);
@@ -1084,7 +1087,8 @@ static struct languages *parse_charset_string(char *str)
do
{
/*creating new element of the linked list */
- new_lang= (struct languages *) my_malloc(sizeof(*new_lang), MYF(MY_WME));
+ new_lang= (struct languages *) my_malloc(PSI_NOT_INSTRUMENTED,
+ sizeof(*new_lang), MYF(MY_WME));
new_lang->next_lang= head;
head= new_lang;
diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc
index df8d1c0956b..847340e6dc7 100644
--- a/extra/mariabackup/backup_mysql.cc
+++ b/extra/mariabackup/backup_mysql.cc
@@ -462,23 +462,23 @@ get_mysql_vars(MYSQL *connection)
}
if (innodb_data_file_path_var && *innodb_data_file_path_var) {
- innobase_data_file_path = my_strdup(
+ innobase_data_file_path = my_strdup(PSI_NOT_INSTRUMENTED,
innodb_data_file_path_var, MYF(MY_FAE));
}
if (innodb_data_home_dir_var) {
- innobase_data_home_dir = my_strdup(
+ innobase_data_home_dir = my_strdup(PSI_NOT_INSTRUMENTED,
innodb_data_home_dir_var, MYF(MY_FAE));
}
if (innodb_log_group_home_dir_var
&& *innodb_log_group_home_dir_var) {
- srv_log_group_home_dir = my_strdup(
+ srv_log_group_home_dir = my_strdup(PSI_NOT_INSTRUMENTED,
innodb_log_group_home_dir_var, MYF(MY_FAE));
}
if (innodb_undo_directory_var && *innodb_undo_directory_var) {
- srv_undo_dir = my_strdup(
+ srv_undo_dir = my_strdup(PSI_NOT_INSTRUMENTED,
innodb_undo_directory_var, MYF(MY_FAE));
}
diff --git a/extra/mariabackup/ds_buffer.cc b/extra/mariabackup/ds_buffer.cc
index 720a329c238..308070ab3b3 100644
--- a/extra/mariabackup/ds_buffer.cc
+++ b/extra/mariabackup/ds_buffer.cc
@@ -71,13 +71,13 @@ buffer_init(const char *root)
ds_ctxt_t *ctxt;
ds_buffer_ctxt_t *buffer_ctxt;
- ctxt = (ds_ctxt_t *)my_malloc(sizeof(ds_ctxt_t) + sizeof(ds_buffer_ctxt_t),
- MYF(MY_FAE));
+ ctxt = (ds_ctxt_t *)my_malloc(PSI_NOT_INSTRUMENTED,
+ sizeof(ds_ctxt_t) + sizeof(ds_buffer_ctxt_t), MYF(MY_FAE));
buffer_ctxt = (ds_buffer_ctxt_t *) (ctxt + 1);
buffer_ctxt->buffer_size = DS_DEFAULT_BUFFER_SIZE;
ctxt->ptr = buffer_ctxt;
- ctxt->root = my_strdup(root, MYF(MY_FAE));
+ ctxt->root = my_strdup(PSI_NOT_INSTRUMENTED, root, MYF(MY_FAE));
return ctxt;
}
@@ -101,9 +101,8 @@ buffer_open(ds_ctxt_t *ctxt, const char *path, MY_STAT *mystat)
buffer_ctxt = (ds_buffer_ctxt_t *) ctxt->ptr;
- file = (ds_file_t *) my_malloc(sizeof(ds_file_t) +
- sizeof(ds_buffer_file_t) +
- buffer_ctxt->buffer_size,
+ file = (ds_file_t *) my_malloc(PSI_NOT_INSTRUMENTED, sizeof(ds_file_t) +
+ sizeof(ds_buffer_file_t) + buffer_ctxt->buffer_size,
MYF(MY_FAE));
buffer_file = (ds_buffer_file_t *) (file + 1);
diff --git a/extra/mariabackup/ds_compress.cc b/extra/mariabackup/ds_compress.cc
index 487718e2ac0..54c49deac16 100644
--- a/extra/mariabackup/ds_compress.cc
+++ b/extra/mariabackup/ds_compress.cc
@@ -100,16 +100,15 @@ compress_init(const char *root)
return NULL;
}
- ctxt = (ds_ctxt_t *) my_malloc(sizeof(ds_ctxt_t) +
- sizeof(ds_compress_ctxt_t),
- MYF(MY_FAE));
+ ctxt = (ds_ctxt_t *) my_malloc(PSI_NOT_INSTRUMENTED,
+ sizeof(ds_ctxt_t) + sizeof(ds_compress_ctxt_t), MYF(MY_FAE));
compress_ctxt = (ds_compress_ctxt_t *) (ctxt + 1);
compress_ctxt->threads = threads;
compress_ctxt->nthreads = xtrabackup_compress_threads;
ctxt->ptr = compress_ctxt;
- ctxt->root = my_strdup(root, MYF(MY_FAE));
+ ctxt->root = my_strdup(PSI_NOT_INSTRUMENTED, root, MYF(MY_FAE));
return ctxt;
}
@@ -159,9 +158,8 @@ compress_open(ds_ctxt_t *ctxt, const char *path, MY_STAT *mystat)
goto err;
}
- file = (ds_file_t *) my_malloc(sizeof(ds_file_t) +
- sizeof(ds_compress_file_t),
- MYF(MY_FAE));
+ file = (ds_file_t *) my_malloc(PSI_NOT_INSTRUMENTED,
+ sizeof(ds_file_t) + sizeof(ds_compress_file_t), MYF(MY_FAE));
comp_file = (ds_compress_file_t *) (file + 1);
comp_file->dest_file = dest_file;
comp_file->comp_ctxt = comp_ctxt;
@@ -336,8 +334,8 @@ create_worker_threads(uint n)
comp_thread_ctxt_t *threads;
uint i;
- threads = (comp_thread_ctxt_t *)
- my_malloc(sizeof(comp_thread_ctxt_t) * n, MYF(MY_FAE));
+ threads = (comp_thread_ctxt_t *) my_malloc(PSI_NOT_INSTRUMENTED,
+ sizeof(comp_thread_ctxt_t) * n, MYF(MY_FAE));
for (i = 0; i < n; i++) {
comp_thread_ctxt_t *thd = threads + i;
@@ -347,9 +345,8 @@ create_worker_threads(uint n)
thd->cancelled = FALSE;
thd->data_avail = FALSE;
- thd->to = (char *) my_malloc(COMPRESS_CHUNK_SIZE +
- MY_QLZ_COMPRESS_OVERHEAD,
- MYF(MY_FAE));
+ thd->to = (char *) my_malloc(PSI_NOT_INSTRUMENTED,
+ COMPRESS_CHUNK_SIZE + MY_QLZ_COMPRESS_OVERHEAD, MYF(MY_FAE));
/* Initialize the control mutex and condition var */
if (pthread_mutex_init(&thd->ctrl_mutex, NULL) ||
diff --git a/extra/mariabackup/ds_local.cc b/extra/mariabackup/ds_local.cc
index fb2ea0a1629..06b061f3646 100644
--- a/extra/mariabackup/ds_local.cc
+++ b/extra/mariabackup/ds_local.cc
@@ -69,9 +69,9 @@ local_init(const char *root)
return NULL;
}
- ctxt = (ds_ctxt_t *)my_malloc(sizeof(ds_ctxt_t), MYF(MY_FAE));
+ ctxt = (ds_ctxt_t *)my_malloc(PSI_NOT_INSTRUMENTED, sizeof(ds_ctxt_t), MYF(MY_FAE));
- ctxt->root = my_strdup(root, MYF(MY_FAE));
+ ctxt->root = my_strdup(PSI_NOT_INSTRUMENTED, root, MYF(MY_FAE));
return ctxt;
}
@@ -109,7 +109,7 @@ local_open(ds_ctxt_t *ctxt, const char *path,
path_len = strlen(fullpath) + 1; /* terminating '\0' */
- file = (ds_file_t *) my_malloc(sizeof(ds_file_t) +
+ file = (ds_file_t *) my_malloc(PSI_NOT_INSTRUMENTED, sizeof(ds_file_t) +
sizeof(ds_local_file_t) +
path_len,
MYF(MY_FAE));
diff --git a/extra/mariabackup/ds_stdout.cc b/extra/mariabackup/ds_stdout.cc
index 85dbb83865b..d30c105d258 100644
--- a/extra/mariabackup/ds_stdout.cc
+++ b/extra/mariabackup/ds_stdout.cc
@@ -49,9 +49,9 @@ stdout_init(const char *root)
{
ds_ctxt_t *ctxt;
- ctxt = (ds_ctxt_t *)my_malloc(sizeof(ds_ctxt_t), MYF(MY_FAE));
+ ctxt = (ds_ctxt_t *)my_malloc(PSI_NOT_INSTRUMENTED, sizeof(ds_ctxt_t), MYF(MY_FAE));
- ctxt->root = my_strdup(root, MYF(MY_FAE));
+ ctxt->root = my_strdup(PSI_NOT_INSTRUMENTED, root, MYF(MY_FAE));
return ctxt;
}
@@ -69,10 +69,8 @@ stdout_open(ds_ctxt_t *ctxt __attribute__((unused)),
pathlen = strlen(fullpath) + 1;
- file = (ds_file_t *) my_malloc(sizeof(ds_file_t) +
- sizeof(ds_stdout_file_t) +
- pathlen,
- MYF(MY_FAE));
+ file = (ds_file_t *) my_malloc(PSI_NOT_INSTRUMENTED, sizeof(ds_file_t) +
+ sizeof(ds_stdout_file_t) + pathlen, MYF(MY_FAE));
stdout_file = (ds_stdout_file_t *) (file + 1);
diff --git a/extra/mariabackup/ds_tmpfile.cc b/extra/mariabackup/ds_tmpfile.cc
index 22dff165aa0..4851c2f0263 100644
--- a/extra/mariabackup/ds_tmpfile.cc
+++ b/extra/mariabackup/ds_tmpfile.cc
@@ -61,8 +61,8 @@ tmpfile_init(const char *root)
ds_ctxt_t *ctxt;
ds_tmpfile_ctxt_t *tmpfile_ctxt;
- ctxt = (ds_ctxt_t *)my_malloc(sizeof(ds_ctxt_t) + sizeof(ds_tmpfile_ctxt_t),
- MYF(MY_FAE));
+ ctxt = (ds_ctxt_t *)my_malloc(PSI_NOT_INSTRUMENTED,
+ sizeof(ds_ctxt_t) + sizeof(ds_tmpfile_ctxt_t), MYF(MY_FAE));
tmpfile_ctxt = (ds_tmpfile_ctxt_t *) (ctxt + 1);
tmpfile_ctxt->file_list = NULL;
if (pthread_mutex_init(&tmpfile_ctxt->mutex, NULL)) {
@@ -72,7 +72,7 @@ tmpfile_init(const char *root)
}
ctxt->ptr = tmpfile_ctxt;
- ctxt->root = my_strdup(root, MYF(MY_FAE));
+ ctxt->root = my_strdup(PSI_NOT_INSTRUMENTED, root, MYF(MY_FAE));
return ctxt;
}
@@ -100,9 +100,8 @@ tmpfile_open(ds_ctxt_t *ctxt, const char *path,
path_len = strlen(path) + 1; /* terminating '\0' */
- file = (ds_file_t *) my_malloc(sizeof(ds_file_t) +
- sizeof(ds_tmp_file_t) + path_len,
- MYF(MY_FAE));
+ file = (ds_file_t *) my_malloc(PSI_NOT_INSTRUMENTED,
+ sizeof(ds_file_t) + sizeof(ds_tmp_file_t) + path_len, MYF(MY_FAE));
tmp_file = (ds_tmp_file_t *) (file + 1);
tmp_file->file = file;
@@ -114,7 +113,7 @@ tmpfile_open(ds_ctxt_t *ctxt, const char *path,
memcpy(tmp_file->orig_path, path, path_len);
/* Store the real temporary file name in file->path */
- file->path = my_strdup(tmp_path, MYF(MY_FAE));
+ file->path = my_strdup(PSI_NOT_INSTRUMENTED, tmp_path, MYF(MY_FAE));
file->ptr = tmp_file;
/* Store the file object in the list to be piped later */
@@ -170,7 +169,7 @@ tmpfile_deinit(ds_ctxt_t *ctxt)
pipe_ctxt = ctxt->pipe_ctxt;
xb_a(pipe_ctxt != NULL);
- buf = my_malloc(buf_size, MYF(MY_FAE));
+ buf = my_malloc(PSI_NOT_INSTRUMENTED, buf_size, MYF(MY_FAE));
tmpfile_ctxt = (ds_tmpfile_ctxt_t *) ctxt->ptr;
list = tmpfile_ctxt->file_list;
diff --git a/extra/mariabackup/ds_xbstream.cc b/extra/mariabackup/ds_xbstream.cc
index 5a753b08474..7522510ab27 100644
--- a/extra/mariabackup/ds_xbstream.cc
+++ b/extra/mariabackup/ds_xbstream.cc
@@ -79,8 +79,8 @@ xbstream_init(const char *root __attribute__((unused)))
ds_stream_ctxt_t *stream_ctxt;
xb_wstream_t *xbstream;
- ctxt = (ds_ctxt_t *)my_malloc(sizeof(ds_ctxt_t) + sizeof(ds_stream_ctxt_t),
- MYF(MY_FAE));
+ ctxt = (ds_ctxt_t *)my_malloc(PSI_NOT_INSTRUMENTED,
+ sizeof(ds_ctxt_t) + sizeof(ds_stream_ctxt_t), MYF(MY_FAE));
stream_ctxt = (ds_stream_ctxt_t *)(ctxt + 1);
if (pthread_mutex_init(&stream_ctxt->mutex, NULL)) {
@@ -131,9 +131,8 @@ xbstream_open(ds_ctxt_t *ctxt, const char *path, MY_STAT *mystat)
}
pthread_mutex_unlock(&stream_ctxt->mutex);
- file = (ds_file_t *) my_malloc(sizeof(ds_file_t) +
- sizeof(ds_stream_file_t),
- MYF(MY_FAE));
+ file = (ds_file_t *) my_malloc(PSI_NOT_INSTRUMENTED,
+ sizeof(ds_file_t) + sizeof(ds_stream_file_t), MYF(MY_FAE));
stream_file = (ds_stream_file_t *) (file + 1);
xbstream = stream_ctxt->xbstream;
diff --git a/extra/mariabackup/innobackupex.cc b/extra/mariabackup/innobackupex.cc
index e23adb047ee..319399b97c5 100644
--- a/extra/mariabackup/innobackupex.cc
+++ b/extra/mariabackup/innobackupex.cc
@@ -774,7 +774,8 @@ ibx_get_one_option(const struct my_option *opt,
{
char *start = argument;
my_free(opt_ibx_password);
- opt_ibx_password= my_strdup(argument, MYF(MY_FAE));
+ opt_ibx_password= my_strdup(PSI_NOT_INSTRUMENTED,
+ argument, MYF(MY_FAE));
/* Destroy argument */
while (*argument)
*argument++= 'x';
diff --git a/extra/mariabackup/xbstream.cc b/extra/mariabackup/xbstream.cc
index d22437427fa..34576434eb4 100644
--- a/extra/mariabackup/xbstream.cc
+++ b/extra/mariabackup/xbstream.cc
@@ -226,7 +226,7 @@ stream_one_file(File file, xb_wstream_file_t *xbfile)
posix_fadvise(file, 0, 0, POSIX_FADV_SEQUENTIAL);
offset = my_tell(file, MYF(MY_WME));
- buf = (uchar*)(my_malloc(XBSTREAM_BUFFER_SIZE, MYF(MY_FAE)));
+ buf = (uchar*)(my_malloc(PSI_NOT_INSTRUMENTED, XBSTREAM_BUFFER_SIZE, MYF(MY_FAE)));
while ((bytes = (ssize_t)my_read(file, buf, XBSTREAM_BUFFER_SIZE,
MYF(MY_WME))) > 0) {
@@ -321,13 +321,13 @@ file_entry_new(extract_ctxt_t *ctxt, const char *path, uint pathlen)
file_entry_t *entry;
ds_file_t *file;
- entry = (file_entry_t *) my_malloc(sizeof(file_entry_t),
+ entry = (file_entry_t *) my_malloc(PSI_NOT_INSTRUMENTED, sizeof(file_entry_t),
MYF(MY_WME | MY_ZEROFILL));
if (entry == NULL) {
return NULL;
}
- entry->path = my_strndup(path, pathlen, MYF(MY_WME));
+ entry->path = my_strndup(PSI_NOT_INSTRUMENTED, path, pathlen, MYF(MY_WME));
if (entry->path == NULL) {
goto err;
}
@@ -497,7 +497,7 @@ mode_extract(int n_threads, int argc __attribute__((unused)),
if (my_hash_init(&filehash, &my_charset_bin, START_FILE_HASH_SIZE,
0, 0, (my_hash_get_key) get_file_entry_key,
- (my_hash_free_key) file_entry_free, MYF(0))) {
+ (my_hash_free_key) file_entry_free, MYF(0), PSI_NOT_INSTRUMENTED)) {
msg("%s: failed to initialize file hash.", my_progname);
return 1;
}
diff --git a/extra/mariabackup/xbstream_read.cc b/extra/mariabackup/xbstream_read.cc
index ff13800fd94..3880dd50ed5 100644
--- a/extra/mariabackup/xbstream_read.cc
+++ b/extra/mariabackup/xbstream_read.cc
@@ -42,7 +42,7 @@ xb_stream_read_new(void)
{
xb_rstream_t *stream;
- stream = (xb_rstream_t *) my_malloc(sizeof(xb_rstream_t), MYF(MY_FAE));
+ stream = (xb_rstream_t *) my_malloc(PSI_NOT_INSTRUMENTED, sizeof(xb_rstream_t), MYF(MY_FAE));
#ifdef __WIN__
setmode(fileno(stdin), _O_BINARY);
@@ -190,7 +190,7 @@ xb_stream_read_chunk(xb_rstream_t *stream, xb_rstream_chunk_t *chunk)
/* Reallocate the buffer if needed */
if (chunk->length > chunk->buflen) {
- chunk->data = my_realloc(chunk->data, chunk->length,
+ chunk->data = my_realloc(PSI_NOT_INSTRUMENTED, chunk->data, chunk->length,
MYF(MY_WME | MY_ALLOW_ZERO_PTR));
if (chunk->data == NULL) {
msg("xb_stream_read_chunk(): failed to increase buffer "
diff --git a/extra/mariabackup/xbstream_write.cc b/extra/mariabackup/xbstream_write.cc
index fcf92f40acd..b6fd9c294a5 100644
--- a/extra/mariabackup/xbstream_write.cc
+++ b/extra/mariabackup/xbstream_write.cc
@@ -65,7 +65,7 @@ xb_stream_write_new(void)
{
xb_wstream_t *stream;
- stream = (xb_wstream_t *) my_malloc(sizeof(xb_wstream_t), MYF(MY_FAE));
+ stream = (xb_wstream_t *) my_malloc(PSI_NOT_INSTRUMENTED, sizeof(xb_wstream_t), MYF(MY_FAE));
pthread_mutex_init(&stream->mutex, NULL);
return stream;;
@@ -87,7 +87,7 @@ xb_stream_write_open(xb_wstream_t *stream, const char *path,
return NULL;
}
- file = (xb_wstream_file_t *) my_malloc(sizeof(xb_wstream_file_t) +
+ file = (xb_wstream_file_t *) my_malloc(PSI_NOT_INSTRUMENTED, sizeof(xb_wstream_file_t) +
path_len + 1, MYF(MY_FAE));
file->path = (char *) (file + 1);
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 7fade671e93..aac87c61742 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -1723,7 +1723,7 @@ xb_get_one_option(const struct my_option *opt,
{
char *start= argument;
my_free(opt_password);
- opt_password= my_strdup(argument, MYF(MY_FAE));
+ opt_password= my_strdup(PSI_NOT_INSTRUMENTED, argument, MYF(MY_FAE));
while (*argument) *argument++= 'x'; // Destroy argument
if (*start)
start[1]=0 ;
diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c
index 85827b74466..09bd26c59ea 100644
--- a/extra/my_print_defaults.c
+++ b/extra/my_print_defaults.c
@@ -170,7 +170,8 @@ int main(int argc, char **argv)
if (nargs < 2)
usage();
- load_default_groups=(char**) my_malloc(nargs*sizeof(char*), MYF(MY_WME));
+ load_default_groups=(char**) my_malloc(PSI_NOT_INSTRUMENTED,
+ nargs*sizeof(char*), MYF(MY_WME));
if (!load_default_groups)
exit(1);
if (opt_mysqld)
diff --git a/extra/replace.c b/extra/replace.c
index 717bc92d0c4..0d35c6d0194 100644
--- a/extra/replace.c
+++ b/extra/replace.c
@@ -259,12 +259,12 @@ static int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name)
if (! pa->typelib.count)
{
if (!(pa->typelib.type_names=(const char **)
- my_malloc(((PC_MALLOC-MALLOC_OVERHEAD)/
+ my_malloc(PSI_NOT_INSTRUMENTED, ((PC_MALLOC-MALLOC_OVERHEAD)/
(sizeof(char *)+sizeof(*pa->flag))*
(sizeof(char *)+sizeof(*pa->flag))),MYF(MY_WME))))
DBUG_RETURN(-1);
- if (!(pa->str= (uchar*) my_malloc((uint) (PS_MALLOC-MALLOC_OVERHEAD),
- MYF(MY_WME))))
+ if (!(pa->str= (uchar*) my_malloc(PSI_NOT_INSTRUMENTED,
+ PS_MALLOC-MALLOC_OVERHEAD, MYF(MY_WME))))
{
my_free((void*) pa->typelib.type_names);
DBUG_RETURN (-1);
@@ -281,9 +281,8 @@ static int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name)
{
pa->max_length=(pa->length+length+MALLOC_OVERHEAD+PS_MALLOC-1)/PS_MALLOC;
pa->max_length=pa->max_length*PS_MALLOC-MALLOC_OVERHEAD;
- if (!(new_pos= (uchar*) my_realloc((uchar*) pa->str,
- (uint) pa->max_length,
- MYF(MY_WME))))
+ if (!(new_pos= (uchar*) my_realloc(PSI_NOT_INSTRUMENTED, (uchar*) pa->str,
+ (uint) pa->max_length, MYF(MY_WME))))
DBUG_RETURN(1);
if (new_pos != pa->str)
{
@@ -299,7 +298,7 @@ static int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name)
int len;
pa->array_allocs++;
len=(PC_MALLOC*pa->array_allocs - MALLOC_OVERHEAD);
- if (!(new_array=(const char **) my_realloc((uchar*) pa->typelib.type_names,
+ if (!(new_array=(const char **) my_realloc(PSI_NOT_INSTRUMENTED, (void*)(pa->typelib.type_names),
(uint) len/
(sizeof(uchar*)+sizeof(*pa->flag))*
(sizeof(uchar*)+sizeof(*pa->flag)),
@@ -431,7 +430,8 @@ static REPLACE *init_replace(char * *from, char * *to,uint count,
if (init_sets(&sets,states))
DBUG_RETURN(0);
found_sets=0;
- if (!(found_set= (FOUND_SET*) my_malloc(sizeof(FOUND_SET)*max_length*count,
+ if (!(found_set= (FOUND_SET*) my_malloc(PSI_NOT_INSTRUMENTED,
+ sizeof(FOUND_SET)*max_length*count,
MYF(MY_WME))))
{
free_sets(&sets);
@@ -442,7 +442,8 @@ static REPLACE *init_replace(char * *from, char * *to,uint count,
used_sets=-1;
word_states=make_new_set(&sets); /* Start of new word */
start_states=make_new_set(&sets); /* This is first state */
- if (!(follow=(FOLLOWS*) my_malloc((states+2)*sizeof(FOLLOWS),MYF(MY_WME))))
+ if (!(follow=(FOLLOWS*) my_malloc(PSI_NOT_INSTRUMENTED,
+ (states+2)*sizeof(FOLLOWS), MYF(MY_WME))))
{
free_sets(&sets);
my_free(found_set);
@@ -634,7 +635,8 @@ static REPLACE *init_replace(char * *from, char * *to,uint count,
/* Alloc replace structure for the replace-state-machine */
- if ((replace=(REPLACE*) my_malloc(sizeof(REPLACE)*(sets.count)+
+ if ((replace=(REPLACE*) my_malloc(PSI_NOT_INSTRUMENTED,
+ sizeof(REPLACE)*(sets.count)+
sizeof(REPLACE_STRING)*(found_sets+1)+
sizeof(char *)*count+result_len,
MYF(MY_WME | MY_ZEROFILL))))
@@ -679,10 +681,12 @@ static int init_sets(REP_SETS *sets,uint states)
{
bzero((char*) sets,sizeof(*sets));
sets->size_of_bits=((states+7)/8);
- if (!(sets->set_buffer=(REP_SET*) my_malloc(sizeof(REP_SET)*SET_MALLOC_HUNC,
+ if (!(sets->set_buffer=(REP_SET*) my_malloc(PSI_NOT_INSTRUMENTED,
+ sizeof(REP_SET)*SET_MALLOC_HUNC,
MYF(MY_WME))))
return 1;
- if (!(sets->bit_buffer=(uint*) my_malloc(sizeof(uint)*sets->size_of_bits*
+ if (!(sets->bit_buffer=(uint*) my_malloc(PSI_NOT_INSTRUMENTED,
+ sizeof(uint)*sets->size_of_bits*
SET_MALLOC_HUNC,MYF(MY_WME))))
{
my_free(sets->set);
@@ -717,15 +721,14 @@ static REP_SET *make_new_set(REP_SETS *sets)
return set;
}
count=sets->count+sets->invisible+SET_MALLOC_HUNC;
- if (!(set=(REP_SET*) my_realloc((uchar*) sets->set_buffer,
- sizeof(REP_SET)*count,
- MYF(MY_WME))))
+ if (!(set=(REP_SET*) my_realloc(PSI_NOT_INSTRUMENTED, sets->set_buffer,
+ sizeof(REP_SET)*count, MYF(MY_WME))))
return 0;
sets->set_buffer=set;
sets->set=set+sets->invisible;
- if (!(bit_buffer=(uint*) my_realloc((uchar*) sets->bit_buffer,
- (sizeof(uint)*sets->size_of_bits)*count,
- MYF(MY_WME))))
+ if (!(bit_buffer=(uint*) my_realloc(PSI_NOT_INSTRUMENTED, sets->bit_buffer,
+ (sizeof(uint)*sets->size_of_bits)*count,
+ MYF(MY_WME))))
return 0;
sets->bit_buffer=bit_buffer;
for (i=0 ; i < count ; i++)
@@ -898,7 +901,7 @@ static uint replace_strings(REPLACE *rep, char **start, uint *max_length,
if (to == end)
{
(*max_length)+=8192;
- if (!(new=my_realloc(*start,*max_length,MYF(MY_WME))))
+ if (!(new=my_realloc(PSI_NOT_INSTRUMENTED, *start,*max_length,MYF(MY_WME))))
return (uint) -1;
to=new+(to - *start);
end=(*start=new)+ *max_length-1;
@@ -914,7 +917,7 @@ static uint replace_strings(REPLACE *rep, char **start, uint *max_length,
if (to == end)
{
(*max_length)*=2;
- if (!(new=my_realloc(*start,*max_length,MYF(MY_WME))))
+ if (!(new=my_realloc(PSI_NOT_INSTRUMENTED, *start,*max_length,MYF(MY_WME))))
return (uint) -1;
to=new+(to - *start);
end=(*start=new)+ *max_length-1;
@@ -938,11 +941,11 @@ static int initialize_buffer()
{
bufread = 8192;
bufalloc = bufread + bufread / 2;
- if (!(buffer = my_malloc(bufalloc+1,MYF(MY_WME))))
+ if (!(buffer = my_malloc(PSI_NOT_INSTRUMENTED, bufalloc+1, MYF(MY_WME))))
return 1;
bufbytes=my_eof=0;
out_length=bufread;
- if (!(out_buff=my_malloc(out_length,MYF(MY_WME))))
+ if (!(out_buff=my_malloc(PSI_NOT_INSTRUMENTED, out_length, MYF(MY_WME))))
return(1);
return 0;
}
@@ -979,7 +982,7 @@ int n;
bufalloc *= 2;
bufread *= 2;
}
- buffer = my_realloc(buffer, bufalloc+1, MYF(MY_WME));
+ buffer = my_realloc(PSI_NOT_INSTRUMENTED, buffer, bufalloc+1, MYF(MY_WME));
if (! buffer)
return(-1);
}
diff --git a/extra/resolve_stack_dump.c b/extra/resolve_stack_dump.c
index 1aae413d2a9..15a2a0e9bf1 100644
--- a/extra/resolve_stack_dump.c
+++ b/extra/resolve_stack_dump.c
@@ -224,8 +224,8 @@ static int init_sym_entry(SYM_ENTRY* se, char* buf)
static void init_sym_table()
{
char buf[512];
- if (my_init_dynamic_array(&sym_table, sizeof(SYM_ENTRY), INIT_SYM_TABLE,
- INC_SYM_TABLE, MYF(0)))
+ if (my_init_dynamic_array(&sym_table, PSI_NOT_INSTRUMENTED, sizeof(SYM_ENTRY),
+ INIT_SYM_TABLE, INC_SYM_TABLE, MYF(0)))
die("Failed in my_init_dynamic_array() -- looks like out of memory problem");
while (fgets(buf, sizeof(buf), fp_sym))