summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2015-06-17 13:09:22 +0400
committerSergey Vojtovich <svoj@mariadb.org>2015-06-19 15:06:34 +0400
commit12d9fe14bea38eaa2ff0f5edeea22d4c7a5debed (patch)
tree330f309dd955bfec99f6e3131f846b67586dcf9e /include
parent8f603bcbcac4a9091b6adbca3fd3655a947e759a (diff)
downloadmariadb-git-12d9fe14bea38eaa2ff0f5edeea22d4c7a5debed.tar.gz
MDEV-7956 - handler::rebind_psi() takes 0.07% in OLTP RO
Do not call handler::rebind_psi() and handler::unbind_psi() when performance schema is compiled out. Overhead change: handler::rebind_psi 0.04% -> out of radar handler::unbind_psi 0.03% -> out of radar open_table 0.21% -> 0.18% close_thread_table 0.05% -> 0.05%
Diffstat (limited to 'include')
-rw-r--r--include/mysql/psi/mysql_table.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/mysql/psi/mysql_table.h b/include/mysql/psi/mysql_table.h
index bd703d75e1f..bf744ec664c 100644
--- a/include/mysql/psi/mysql_table.h
+++ b/include/mysql/psi/mysql_table.h
@@ -30,6 +30,9 @@
*/
#ifdef HAVE_PSI_TABLE_INTERFACE
+#define MYSQL_UNBIND_TABLE(handler) (handler)->unbind_psi()
+#define MYSQL_REBIND_TABLE(handler) (handler)->rebind_psi()
+
#define PSI_CALL_unbind_table PSI_TABLE_CALL(unbind_table)
#define PSI_CALL_rebind_table PSI_TABLE_CALL(rebind_table)
#define PSI_CALL_open_table PSI_TABLE_CALL(open_table)
@@ -38,6 +41,9 @@
#define PSI_CALL_release_table_share PSI_TABLE_CALL(release_table_share)
#define PSI_CALL_drop_table_share PSI_TABLE_CALL(drop_table_share)
#else
+#define MYSQL_UNBIND_TABLE(handler) /* no-op */
+#define MYSQL_REBIND_TABLE(handler) /* no-op */
+
#define PSI_CALL_unbind_table(A1) /* no-op */
#define PSI_CALL_rebind_table(A1,A2,A3) NULL
#define PSI_CALL_close_table(A1) /* no-op */