3371 Marc Alff 2011-05-04
Code cleanup, fixed the build without P_S
modified:
include/my_global.h
include/mysql/psi/mysql_thread.h
include/mysql/psi/psi.h
mysys/psi_noop.cc
sql/CMakeLists.txt
storage/perfschema/pfs_api.h
3370 Marc Alff 2011-05-04
PERFORMANCE SCHEMA performance optimization
Pre requisite for PSI_CALL(), continued
added:
storage/perfschema/pfs_api.h
modified:
include/my_global.h
include/my_sys.h
include/mysql/psi/mysql_thread.h
include/mysql/psi/psi.h
mysys/CMakeLists.txt
mysys/my_thr_init.c
mysys/psi_noop.cc
sql/CMakeLists.txt
sql/handler.cc
sql/mysqld.cc
sql/sql_acl.cc
sql/sql_base.cc
sql/sql_class.cc
sql/sql_class.h
sql/table.cc
storage/innobase/handler/ha_innodb.cc
storage/perfschema/pfs.cc
storage/perfschema/pfs_events_stages.cc
storage/perfschema/pfs_events_statements.cc
storage/perfschema/pfs_events_waits.cc
storage/perfschema/pfs_instr_class.cc
storage/perfschema/pfs_server.cc
=== modified file 'include/my_global.h'
--- a/include/my_global.h 2011-05-04 11:13:49 +0000
+++ b/include/my_global.h 2011-05-04 17:55:09 +0000
@@ -1489,13 +1489,12 @@ enum loglevel {
};
#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
-#define USE_PSI_V1
/* EXPERIMENTAL, DO NOT USE */
+/* #define USE_PSI_V1 */
/* #define PSI_CALL(API) pfs_ ## API ## _v1 */
+/* #include <../storage/perfschema/pfs_api.h> */
-#include <mysql/psi/psi.h>
-#include <../storage/perfschema/pfs_api.h>
#endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */
#endif /* my_global_h */
=== modified file 'include/mysql/psi/mysql_thread.h'
--- a/include/mysql/psi/mysql_thread.h 2011-05-04 11:13:49 +0000
+++ b/include/mysql/psi/mysql_thread.h 2011-05-04 17:55:09 +0000
@@ -606,7 +606,6 @@ static inline int inline_mysql_mutex_ini
#ifdef HAVE_PSI_MUTEX_INTERFACE
that->m_psi= PSI_CALL(init_mutex)(key, &that->m_mutex);
#else
-#warning "not using HAVE_PSI_MUTEX_INTERFACE"
that->m_psi= NULL;
#endif
#ifdef SAFE_MUTEX
=== modified file 'include/mysql/psi/psi.h'
--- a/include/mysql/psi/psi.h 2011-05-04 11:13:49 +0000
+++ b/include/mysql/psi/psi.h 2011-05-04 17:55:09 +0000
@@ -134,8 +134,6 @@ struct PSI_bootstrap
#ifndef DISABLE_PSI_MUTEX
#define HAVE_PSI_MUTEX_INTERFACE
-#else
-#warning "DISABLE_PSI_MUTEX"
#endif
/**
=== modified file 'mysys/psi_noop.cc'
--- a/mysys/psi_noop.cc 2011-05-04 11:13:49 +0000
+++ b/mysys/psi_noop.cc 2011-05-04 17:55:09 +0000
@@ -13,13 +13,18 @@
along with this program; if not, write to the Free Software Foundation,
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
+/*
+ Always provide the noop performance interface, for plugins.
+*/
+
+#define USE_PSI_V1
+#define HAVE_PSI_INTERFACE
+
#include "my_global.h"
#include "my_pthread.h"
#include "my_sys.h"
#include "mysql/psi/psi.h"
-#ifdef HAVE_PSI_INTERFACE
-
static void register_mutex_noop(const char *category,
PSI_mutex_info *info,
int count)
@@ -614,7 +619,6 @@ static PSI PSI_noop=
set_statement_no_good_index_used_noop,
end_statement_noop
};
-#endif
C_MODE_START
@@ -633,6 +637,7 @@ struct PSI_bootstrap *PSI_hook= NULL;
xyz_psi_server variable, obtained from PSI_bootstrap::get_interface()
with the version used at compile time for plugin XYZ.
*/
+
PSI *PSI_server= & PSI_noop;
void set_psi_server(PSI *psi)
=== modified file 'sql/CMakeLists.txt'
--- a/sql/CMakeLists.txt 2011-05-04 11:13:49 +0000
+++ b/sql/CMakeLists.txt 2011-05-04 17:55:09 +0000
@@ -310,7 +310,7 @@ ADD_CUSTOM_COMMAND(
MYSQL_ADD_EXECUTABLE(mysql_tzinfo_to_sql tztime.cc)
SET_TARGET_PROPERTIES(mysql_tzinfo_to_sql PROPERTIES COMPILE_FLAGS "-DTZINFO2SQL")
-TARGET_LINK_LIBRARIES(mysql_tzinfo_to_sql mysys perfschema)
+TARGET_LINK_LIBRARIES(mysql_tzinfo_to_sql mysys)
ADD_CUSTOM_TARGET(
GenServerSource
=== modified file 'storage/perfschema/pfs_api.h'
--- a/storage/perfschema/pfs_api.h 2011-05-04 11:13:49 +0000
+++ b/storage/perfschema/pfs_api.h 2011-05-04 17:55:09 +0000
@@ -1,4 +1,10 @@
+#ifndef PFS_API_H
+#define PFS_API_H
+
+#include <my_pthread.h>
+#include <mysql/psi/psi.h>
+
C_MODE_START
void pfs_register_mutex_v1(const char *category, struct PSI_mutex_info_v1 *info, int count);
@@ -230,3 +236,6 @@ void pfs_set_statement_no_good_index_use
void pfs_end_statement_v1(struct PSI_statement_locker *locker, void *stmt_da);
C_MODE_END
+
+#endif
+
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk-pfs-tuning branch (marc.alff:3370 to 3371) | Marc Alff | 4 May |