mirror of
https://github.com/MariaDB/server.git
synced 2025-01-25 00:04:33 +01:00
branches/5.1:
Fix Bug#36600 SHOW STATUS takes a lot of CPU in buf_get_latched_pages_number by removing the Innodb_buffer_pool_pages_latched variable from SHOW STATUS output in non-UNIV_DEBUG compilation. Approved by: Heikki
This commit is contained in:
parent
d1e9eb79ae
commit
461cc69ce7
5 changed files with 15 additions and 6 deletions
|
@ -2328,7 +2328,6 @@ buf_print(void)
|
||||||
|
|
||||||
ut_a(buf_validate());
|
ut_a(buf_validate());
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Returns the number of latched pages in the buffer pool. */
|
Returns the number of latched pages in the buffer pool. */
|
||||||
|
@ -2361,6 +2360,7 @@ buf_get_latched_pages_number(void)
|
||||||
|
|
||||||
return(fixed_pages_number);
|
return(fixed_pages_number);
|
||||||
}
|
}
|
||||||
|
#endif /* UNIV_DEBUG */
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Returns the number of pending buf pool ios. */
|
Returns the number of pending buf pool ios. */
|
||||||
|
|
|
@ -334,8 +334,10 @@ static SHOW_VAR innodb_status_variables[]= {
|
||||||
(char*) &export_vars.innodb_buffer_pool_pages_flushed, SHOW_LONG},
|
(char*) &export_vars.innodb_buffer_pool_pages_flushed, SHOW_LONG},
|
||||||
{"buffer_pool_pages_free",
|
{"buffer_pool_pages_free",
|
||||||
(char*) &export_vars.innodb_buffer_pool_pages_free, SHOW_LONG},
|
(char*) &export_vars.innodb_buffer_pool_pages_free, SHOW_LONG},
|
||||||
|
#ifdef UNIV_DEBUG
|
||||||
{"buffer_pool_pages_latched",
|
{"buffer_pool_pages_latched",
|
||||||
(char*) &export_vars.innodb_buffer_pool_pages_latched, SHOW_LONG},
|
(char*) &export_vars.innodb_buffer_pool_pages_latched, SHOW_LONG},
|
||||||
|
#endif /* UNIV_DEBUG */
|
||||||
{"buffer_pool_pages_misc",
|
{"buffer_pool_pages_misc",
|
||||||
(char*) &export_vars.innodb_buffer_pool_pages_misc, SHOW_LONG},
|
(char*) &export_vars.innodb_buffer_pool_pages_misc, SHOW_LONG},
|
||||||
{"buffer_pool_pages_total",
|
{"buffer_pool_pages_total",
|
||||||
|
|
|
@ -495,7 +495,15 @@ Prints info of the buffer pool data structure. */
|
||||||
void
|
void
|
||||||
buf_print(void);
|
buf_print(void);
|
||||||
/*============*/
|
/*============*/
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
Returns the number of latched pages in the buffer pool. */
|
||||||
|
|
||||||
|
ulint
|
||||||
|
buf_get_latched_pages_number(void);
|
||||||
|
/*==============================*/
|
||||||
#endif /* UNIV_DEBUG */
|
#endif /* UNIV_DEBUG */
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
Prints a page to stderr. */
|
Prints a page to stderr. */
|
||||||
|
|
||||||
|
@ -503,12 +511,7 @@ void
|
||||||
buf_page_print(
|
buf_page_print(
|
||||||
/*===========*/
|
/*===========*/
|
||||||
byte* read_buf); /* in: a database page */
|
byte* read_buf); /* in: a database page */
|
||||||
/*************************************************************************
|
|
||||||
Returns the number of latched pages in the buffer pool. */
|
|
||||||
|
|
||||||
ulint
|
|
||||||
buf_get_latched_pages_number(void);
|
|
||||||
/*==============================*/
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Returns the number of pending buf pool ios. */
|
Returns the number of pending buf pool ios. */
|
||||||
|
|
||||||
|
|
|
@ -501,7 +501,9 @@ struct export_var_struct{
|
||||||
ulint innodb_buffer_pool_pages_dirty;
|
ulint innodb_buffer_pool_pages_dirty;
|
||||||
ulint innodb_buffer_pool_pages_misc;
|
ulint innodb_buffer_pool_pages_misc;
|
||||||
ulint innodb_buffer_pool_pages_free;
|
ulint innodb_buffer_pool_pages_free;
|
||||||
|
#ifdef UNIV_DEBUG
|
||||||
ulint innodb_buffer_pool_pages_latched;
|
ulint innodb_buffer_pool_pages_latched;
|
||||||
|
#endif /* UNIV_DEBUG */
|
||||||
ulint innodb_buffer_pool_read_requests;
|
ulint innodb_buffer_pool_read_requests;
|
||||||
ulint innodb_buffer_pool_reads;
|
ulint innodb_buffer_pool_reads;
|
||||||
ulint innodb_buffer_pool_wait_free;
|
ulint innodb_buffer_pool_wait_free;
|
||||||
|
|
|
@ -1825,8 +1825,10 @@ srv_export_innodb_status(void)
|
||||||
= UT_LIST_GET_LEN(buf_pool->flush_list);
|
= UT_LIST_GET_LEN(buf_pool->flush_list);
|
||||||
export_vars.innodb_buffer_pool_pages_free
|
export_vars.innodb_buffer_pool_pages_free
|
||||||
= UT_LIST_GET_LEN(buf_pool->free);
|
= UT_LIST_GET_LEN(buf_pool->free);
|
||||||
|
#ifdef UNIV_DEBUG
|
||||||
export_vars.innodb_buffer_pool_pages_latched
|
export_vars.innodb_buffer_pool_pages_latched
|
||||||
= buf_get_latched_pages_number();
|
= buf_get_latched_pages_number();
|
||||||
|
#endif /* UNIV_DEBUG */
|
||||||
export_vars.innodb_buffer_pool_pages_total = buf_pool->curr_size;
|
export_vars.innodb_buffer_pool_pages_total = buf_pool->curr_size;
|
||||||
|
|
||||||
export_vars.innodb_buffer_pool_pages_misc = buf_pool->max_size
|
export_vars.innodb_buffer_pool_pages_misc = buf_pool->max_size
|
||||||
|
|
Loading…
Add table
Reference in a new issue