Commit b5849f45 authored by monty@mashka.mysql.fi's avatar monty@mashka.mysql.fi

Add more information about memory usage to debug log

parent 2d3840f5
...@@ -194,6 +194,8 @@ void mysql_print_status(THD *thd) ...@@ -194,6 +194,8 @@ void mysql_print_status(THD *thd)
printf("\nStatus information:\n\n"); printf("\nStatus information:\n\n");
my_getwd(current_dir, sizeof(current_dir),MYF(0)); my_getwd(current_dir, sizeof(current_dir),MYF(0));
printf("Current dir: %s\n", current_dir); printf("Current dir: %s\n", current_dir);
printf("Running threads: %d Stack size: %ld\n", thread_count,
(long) thread_stack);
if (thd) if (thd)
thd->proc_info="locks"; thd->proc_info="locks";
thr_print_locks(); // Write some debug info thr_print_locks(); // Write some debug info
...@@ -271,8 +273,9 @@ Maximum total allocated space: %d\n\ ...@@ -271,8 +273,9 @@ Maximum total allocated space: %d\n\
Space available in freed fastbin blocks: %d\n\ Space available in freed fastbin blocks: %d\n\
Total allocated space: %d\n\ Total allocated space: %d\n\
Total free space: %d\n\ Total free space: %d\n\
Top-most, releasable space: %d\n", Top-most, releasable space: %d\n\
(int) info.arena, Estimated memory (with thread stack): %ld\n",
(int) info.arena ,
(int) info.ordblks, (int) info.ordblks,
(int) info.smblks, (int) info.smblks,
(int) info.hblks, (int) info.hblks,
...@@ -281,7 +284,8 @@ Top-most, releasable space: %d\n", ...@@ -281,7 +284,8 @@ Top-most, releasable space: %d\n",
(int) info.fsmblks, (int) info.fsmblks,
(int) info.uordblks, (int) info.uordblks,
(int) info.fordblks, (int) info.fordblks,
(int) info.keepcost); (int) info.keepcost,
(long) (thread_count * thread_stack + info.hblkhd + info.arena));
#endif #endif
puts(""); puts("");
if (thd) if (thd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment