mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
add WITH_DBUG_TRACE CMake variable
This is a way do disable DBUG_ENTER()/DBUG_EXIT() stuff which is needed to dbug trace. Those who doesn't need it may avoid tests slowdown with -DWITH_DBUG_TRACE=OFF dbug/tests.c: add define which is neede always in this test innodb.log_file_name_debug.test: do not depend on DBUG trace stuff in test Benchmark results: each test eats less CPU and you can have more parallel jobs in MTR. patched: ./mtr -mem -par=8 -suite=innodb 185.34s user 86.85s system 133% cpu 3:23.27 total ./mtr -mem -par=8 -suite=main 80.96s user 36.01s system 182% cpu 1:04.07 total main.select [ pass ] 1660 main.select [ pass ] 1513 main.select [ pass ] 1543 main.select [ pass ] 1660 main.select [ pass ] 1521 main.select [ pass ] 1511 main.select [ pass ] 1508 main.select [ pass ] 1520 main.select [ pass ] 1514 main.select [ pass ] 1522 vanilla: ./mtr -mem -par=8 -suite=innodb 203.61s user 92.16s system 140% cpu 3:30.16 total ./mtr -mem -par=8 -suite=main 94.11s user 35.51s system 206% cpu 1:02.69 total main.select [ pass ] 2032 main.select [ pass ] 2017 main.select [ pass ] 2040 main.select [ pass ] 2183 main.select [ pass ] 2253 main.select [ pass ] 2075 main.select [ pass ] 2109 main.select [ pass ] 2080 main.select [ pass ] 2098 main.select [ pass ] 2114
This commit is contained in:
parent
7a546650fa
commit
28325b0863
5 changed files with 19 additions and 2 deletions
|
|
@ -64,6 +64,7 @@ extern void dbug_swap_code_state(void **code_state_store);
|
|||
extern void dbug_free_code_state(void **code_state_store);
|
||||
extern const char* _db_get_func_(void);
|
||||
|
||||
#ifdef DBUG_TRACE
|
||||
#define DBUG_LEAVE do { \
|
||||
_db_stack_frame_.line= __LINE__; \
|
||||
_db_return_ (&_db_stack_frame_); \
|
||||
|
|
@ -82,6 +83,13 @@ extern const char* _db_get_func_(void);
|
|||
#define DBUG_VOID_RETURN do {DBUG_LEAVE; return;} while(0)
|
||||
#endif
|
||||
|
||||
#else
|
||||
#define DBUG_LEAVE
|
||||
#define DBUG_ENTER(a)
|
||||
#define DBUG_RETURN(a1) return(a1)
|
||||
#define DBUG_VOID_RETURN return
|
||||
#endif
|
||||
|
||||
#define DBUG_EXECUTE(keyword,a1) \
|
||||
do {if (_db_keyword_(0, (keyword), 0)) { a1 }} while(0)
|
||||
#define DBUG_EXECUTE_IF(keyword,a1) \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue