List:Commits« Previous MessageNext Message »
From:Marc Alff Date:July 10 2009 5:47am
Subject:bzr push into mysql-5.4-perfschema branch (marc.alff:2825 to 2826)
View as plain text  
 2826 Marc Alff	2009-07-09
      
      Simplify dependencies for SunStudio on Solaris 10:
      compile the strings library without static inline functions.
      modified:
        include/my_sys.h
        include/mysql/psi/mysql_thread.h
        strings/Makefile.am

 2825 Marc Alff	2009-07-09
      Fixed test cases to have a predictable output on all platforms / builds
      modified:
        mysql-test/suite/perfschema/r/dml_setup_instruments.result
        mysql-test/suite/perfschema/t/binlog_mix.test
        mysql-test/suite/perfschema/t/binlog_row.test
        mysql-test/suite/perfschema/t/dml_setup_instruments.test

=== modified file 'include/my_sys.h'
--- a/include/my_sys.h	2009-07-10 01:33:40 +0000
+++ b/include/my_sys.h	2009-07-10 05:47:28 +0000
@@ -1083,9 +1083,10 @@ void netware_reg_user(const char *ip, co
 		      const char *application);
 #endif
 
+#ifdef HAVE_PSI_INTERFACE
+
 #include <mysql/psi/psi.h>
 
-#ifdef HAVE_PSI_INTERFACE
 /**
   Hook for the instrumentation interface.
   Code implementing the instrumentation interface should register here.

=== modified file 'include/mysql/psi/mysql_thread.h'
--- a/include/mysql/psi/mysql_thread.h	2009-07-10 01:33:40 +0000
+++ b/include/mysql/psi/mysql_thread.h	2009-07-10 05:47:28 +0000
@@ -63,6 +63,93 @@
 */
 
 /**
+  An instrumented mutex structure.
+  @sa mysql_mutex_t
+*/
+struct st_mysql_mutex
+{
+  /** The real mutex. */
+  pthread_mutex_t m_mutex;
+  /**
+    The instrumentation hook.
+    Note that this hook is not conditionally defined,
+    for binary compatibility of the @c mysql_mutex_t interface.
+  */
+  struct PSI_mutex *m_psi;
+};
+
+/**
+  Type of an instrumented mutex.
+  @c mysql_mutex_t is a drop-in replacement for @c pthread_mutex_t.
+  @sa mysql_mutex_assert_owner
+  @sa mysql_mutex_assert_not_owner
+  @sa mysql_mutex_init
+  @sa mysql_mutex_lock
+  @sa mysql_mutex_unlock
+  @sa mysql_mutex_destroy
+*/
+typedef struct st_mysql_mutex mysql_mutex_t;
+
+/**
+  An instrumented rwlock structure.
+  @sa mysql_rwlock_t
+*/
+struct st_mysql_rwlock
+{
+  /** The real rwlock */
+  rw_lock_t m_rwlock;
+  /**
+    The instrumentation hook.
+    Note that this hook is not conditionally defined,
+    for binary compatibility of the @c mysql_rwlock_t interface.
+  */
+  struct PSI_rwlock *m_psi;
+};
+
+/**
+  Type of an instrumented rwlock.
+  @c mysql_rwlock_t is a drop-in replacement for @c pthread_rwlock_t.
+  @sa mysql_rwlock_init
+  @sa mysql_rwlock_rdlock
+  @sa mysql_rwlock_tryrdlock
+  @sa mysql_rwlock_wrlock
+  @sa mysql_rwlock_trywrlock
+  @sa mysql_rwlock_unlock
+  @sa mysql_rwlock_destroy
+*/
+typedef struct st_mysql_rwlock mysql_rwlock_t;
+
+/**
+  An instrumented cond structure.
+  @sa mysql_cond_t
+*/
+struct st_mysql_cond
+{
+  /** The real condition */
+  pthread_cond_t m_cond;
+  /**
+    The instrumentation hook.
+    Note that this hook is not conditionally defined,
+    for binary compatibility of the @c mysql_cond_t interface.
+  */
+  struct PSI_cond *m_psi;
+};
+
+/**
+  Type of an instrumented condition.
+  @c mysql_cond_t is a drop-in replacement for @c pthread_cond_t.
+  @sa mysql_cond_init
+  @sa mysql_cond_wait
+  @sa mysql_cond_timedwait
+  @sa mysql_cond_signal
+  @sa mysql_cond_broadcast
+  @sa mysql_cond_destroy
+*/
+typedef struct st_mysql_cond mysql_cond_t;
+
+#ifndef DISABLE_MYSQL_THREAD_H
+
+/**
   @def mysql_mutex_assert_owner(M)
   Wrapper, to use safe_mutex_assert_owner with instrumented mutexes.
   @c mysql_mutex_assert_owner is a drop-in replacement
@@ -380,34 +467,6 @@
   #define mysql_thread_set_psi_id(I) do {} while (0)
 #endif
 
-/**
-  An instrumented mutex structure.
-  @sa mysql_mutex_t
-*/
-struct st_mysql_mutex
-{
-  /** The real mutex. */
-  pthread_mutex_t m_mutex;
-  /**
-    The instrumentation hook.
-    Note that this hook is not conditionally defined,
-    for binary compatibility of the @c mysql_mutex_t interface.
-  */
-  struct PSI_mutex *m_psi;
-};
-
-/**
-  Type of an instrumented mutex.
-  @c mysql_mutex_t is a drop-in replacement for @c pthread_mutex_t.
-  @sa mysql_mutex_assert_owner
-  @sa mysql_mutex_assert_not_owner
-  @sa mysql_mutex_init
-  @sa mysql_mutex_lock
-  @sa mysql_mutex_unlock
-  @sa mysql_mutex_destroy
-*/
-typedef struct st_mysql_mutex mysql_mutex_t;
-
 static inline int inline_mysql_mutex_init(
 #ifdef HAVE_PSI_INTERFACE
   PSI_mutex_key key,
@@ -533,35 +592,6 @@ static inline int inline_mysql_mutex_unl
   return result;
 }
 
-/**
-  An instrumented rwlock structure.
-  @sa mysql_rwlock_t
-*/
-struct st_mysql_rwlock
-{
-  /** The real rwlock */
-  rw_lock_t m_rwlock;
-  /**
-    The instrumentation hook.
-    Note that this hook is not conditionally defined,
-    for binary compatibility of the @c mysql_rwlock_t interface.
-  */
-  struct PSI_rwlock *m_psi;
-};
-
-/**
-  Type of an instrumented rwlock.
-  @c mysql_rwlock_t is a drop-in replacement for @c pthread_rwlock_t.
-  @sa mysql_rwlock_init
-  @sa mysql_rwlock_rdlock
-  @sa mysql_rwlock_tryrdlock
-  @sa mysql_rwlock_wrlock
-  @sa mysql_rwlock_trywrlock
-  @sa mysql_rwlock_unlock
-  @sa mysql_rwlock_destroy
-*/
-typedef struct st_mysql_rwlock mysql_rwlock_t;
-
 static inline int inline_mysql_rwlock_init(
 #ifdef HAVE_PSI_INTERFACE
   PSI_rwlock_key key,
@@ -699,34 +729,6 @@ static inline int inline_mysql_rwlock_un
   return result;
 }
 
-/**
-  An instrumented cond structure.
-  @sa mysql_cond_t
-*/
-struct st_mysql_cond
-{
-  /** The real condition */
-  pthread_cond_t m_cond;
-  /**
-    The instrumentation hook.
-    Note that this hook is not conditionally defined,
-    for binary compatibility of the @c mysql_cond_t interface.
-  */
-  struct PSI_cond *m_psi;
-};
-
-/**
-  Type of an instrumented condition.
-  @c mysql_cond_t is a drop-in replacement for @c pthread_cond_t.
-  @sa mysql_cond_init
-  @sa mysql_cond_wait
-  @sa mysql_cond_timedwait
-  @sa mysql_cond_signal
-  @sa mysql_cond_broadcast
-  @sa mysql_cond_destroy
-*/
-typedef struct st_mysql_cond mysql_cond_t;
-
 static inline int inline_mysql_cond_init(
 #ifdef HAVE_PSI_INTERFACE
   PSI_cond_key key,
@@ -858,6 +860,8 @@ static inline void inline_mysql_thread_s
 }
 #endif
 
+#endif /* DISABLE_MYSQL_THREAD_H */
+
 /** @} (end of group Thread_instrumentation) */
 
 #endif

=== modified file 'strings/Makefile.am'
--- a/strings/Makefile.am	2009-03-24 14:24:44 +0000
+++ b/strings/Makefile.am	2009-07-10 05:47:28 +0000
@@ -1,4 +1,5 @@
 # Copyright (C) 2000-2006 MySQL AB
+# Copyright (C) 2009 Sun Microsystems, Inc
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +16,16 @@
 
 # This file is public domain and comes with NO WARRANTY of any kind
 
-AM_CPPFLAGS =		-I$(top_srcdir)/include
+#
+# Note that the string library is built with #define THREAD,
+# which by default cause all the thread related code (my_pthread.h)
+# and therefore the associated instrumentation (mysql/psi/mysql_thread.h)
+# to be used.
+# Since the string code itself is not instrumented, we use
+# #define DISABLE_MYSQL_THREAD_H here to avoid unneeded dependencies.
+#
+
+AM_CPPFLAGS =		-I$(top_srcdir)/include -DDISABLE_MYSQL_THREAD_H
 pkglib_LTLIBRARIES =	libmystrings.la
 libmystrings_la_LDFLAGS =   -static
 libmystrings_la_SOURCES = 

Thread
bzr push into mysql-5.4-perfschema branch (marc.alff:2825 to 2826) Marc Alff10 Jul