List:Commits« Previous MessageNext Message »
From:Marc Alff Date:March 28 2012 10:47am
Subject:bzr push into mysql-trunk-pfs-tuning branch (marc.alff:3484 to 3485)
View as plain text  
 3485 Marc Alff	2012-03-28
      Performance tuning, continued

    modified:
      storage/perfschema/pfs_global.cc
      storage/perfschema/pfs_global.h
      storage/perfschema/pfs_instr.cc
      storage/perfschema/pfs_instr_class.cc
      storage/perfschema/pfs_setup_actor.cc
      storage/perfschema/pfs_setup_object.cc
 3484 Marc Alff	2012-03-28 [merge]
      Merge mysql-trunk --> mysql-trunk-pfs-tuning

    added:
      mysql-test/suite/rpl/r/rpl_gtid_sql_until_before_after.result
      mysql-test/suite/rpl/t/rpl_gtid_sql_until_before_after.test
    modified:
      include/my_md5.h
      mysql-test/collections/default.experimental
      mysql-test/include/subquery_sj.inc
      mysql-test/r/sp-bugs.result
      mysql-test/r/sp-code.result
      mysql-test/r/sp_notembedded.result
      mysql-test/r/subquery_sj_all.result
      mysql-test/r/subquery_sj_all_bka.result
      mysql-test/r/subquery_sj_all_bka_nixbnl.result
      mysql-test/r/subquery_sj_all_bkaunique.result
      mysql-test/r/subquery_sj_dupsweed.result
      mysql-test/r/subquery_sj_dupsweed_bka.result
      mysql-test/r/subquery_sj_dupsweed_bka_nixbnl.result
      mysql-test/r/subquery_sj_dupsweed_bkaunique.result
      mysql-test/r/subquery_sj_firstmatch.result
      mysql-test/r/subquery_sj_firstmatch_bka.result
      mysql-test/r/subquery_sj_firstmatch_bka_nixbnl.result
      mysql-test/r/subquery_sj_firstmatch_bkaunique.result
      mysql-test/r/subquery_sj_loosescan.result
      mysql-test/r/subquery_sj_loosescan_bka.result
      mysql-test/r/subquery_sj_loosescan_bka_nixbnl.result
      mysql-test/r/subquery_sj_loosescan_bkaunique.result
      mysql-test/r/subquery_sj_mat.result
      mysql-test/r/subquery_sj_mat_bka.result
      mysql-test/r/subquery_sj_mat_bka_nixbnl.result
      mysql-test/r/subquery_sj_mat_bkaunique.result
      mysql-test/r/subquery_sj_mat_nosj.result
      mysql-test/r/subquery_sj_none.result
      mysql-test/r/subquery_sj_none_bka.result
      mysql-test/r/subquery_sj_none_bka_nixbnl.result
      mysql-test/r/subquery_sj_none_bkaunique.result
      mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_verbose.result
      mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_verbose.test
      mysql-test/suite/engines/funcs/t/se_string_having.test
      mysql-test/suite/engines/funcs/t/ta_add_column.test
      mysql-test/suite/engines/funcs/t/ta_add_column_first.test
      mysql-test/suite/engines/funcs/t/ta_add_column_middle.test
      mysql-test/suite/engines/funcs/t/tc_multicolumn_different.test
      mysql-test/suite/funcs_2/t/innodb_charset.test
      mysql-test/suite/innodb/r/innodb-index-online-purge.result
      mysql-test/suite/innodb/r/innodb-index-online.result
      mysql-test/suite/innodb/t/disabled.def
      mysql-test/suite/innodb/t/innodb-index-online.test
      mysql-test/suite/innodb/t/innodb_bug11766634.test
      mysql-test/suite/innodb/t/innodb_mysql.test
      mysql-test/suite/parts/t/partition_alter1_1_innodb.test
      mysql-test/suite/parts/t/partition_alter2_2_1_innodb.test
      mysql-test/suite/parts/t/partition_basic_innodb.test
      mysql-test/suite/parts/t/partition_decimal_myisam.test
      mysql-test/suite/parts/t/partition_int_myisam.test
      mysql-test/t/sp-bugs.test
      mysql-test/t/sp-code.test
      mysql-test/t/sp_notembedded.test
      sql/log_event.cc
      sql/rpl_gtid.h
      sql/rpl_gtid_set.cc
      sql/rpl_rli.cc
      sql/rpl_rli.h
      sql/rpl_slave.cc
      sql/rpl_slave.h
      sql/sql_executor.cc
      sql/sql_lex.h
      sql/sql_show.cc
      sql/sql_yacc.yy
      storage/innobase/api/api0api.cc
      storage/innobase/api/api0misc.cc
      storage/innobase/buf/buf0lru.cc
      storage/innobase/fil/fil0fil.cc
      storage/innobase/handler/handler0alter.cc
      storage/innobase/include/api0api.h
      storage/innobase/include/buf0lru.h
      storage/innobase/include/buf0types.h
      storage/innobase/include/fil0fil.h
      storage/innobase/row/row0mysql.cc
      storage/perfschema/pfs_instr.cc
=== modified file 'storage/perfschema/pfs_global.cc'
--- a/storage/perfschema/pfs_global.cc	2012-03-28 08:29:33 +0000
+++ b/storage/perfschema/pfs_global.cc	2012-03-28 10:46:02 +0000
@@ -52,10 +52,17 @@ void *pfs_malloc(size_t size, myf flags)
   if (unlikely(posix_memalign(& ptr, PFS_ALIGNEMENT, size)))
     return NULL;
 #else
+#ifdef HAVE_MEMALIGN
+  /* memalign() is obsolete */
+  ptr= memalign(PFS_ALIGNEMENT, size);
+  if (unlikely(ptr == NULL))
+    return NULL;
+#else
   ptr= malloc(size);
   if (unlikely(ptr == NULL))
     return NULL;
-#endif
+#endif /* HAVE_MEMALIGN */
+#endif /* HAVE_POSIX_MEMALIGN */
 
   pfs_allocated_memory+= size;
   if (flags & MY_ZEROFILL)

=== modified file 'storage/perfschema/pfs_global.h'
--- a/storage/perfschema/pfs_global.h	2012-03-28 08:29:33 +0000
+++ b/storage/perfschema/pfs_global.h	2012-03-28 10:46:02 +0000
@@ -29,13 +29,13 @@ extern bool pfs_initialized;
 /** Total memory allocated by the performance schema, in bytes. */
 extern ulonglong pfs_allocated_memory;
 
-#ifdef HAVE_POSIX_MEMALIGN
+#if defined(HAVE_POSIX_MEMALIGN) || defined(HAVE_MEMALIGN)
 #define PFS_ALIGNEMENT 128
 #define PFS_ALIGNED MY_ALIGNED(PFS_ALIGNEMENT)
 #else
 #error "Really ? What platform is this ?"
 #define PFS_ALIGNED
-#endif /* HAVE_POSIX_MEMALIGN */
+#endif /* HAVE_POSIX_MEMALIGN || HAVE_MEMALIGN */
 
 void *pfs_malloc(size_t size, myf flags);
 

=== modified file 'storage/perfschema/pfs_instr.cc'
--- a/storage/perfschema/pfs_instr.cc	2012-03-28 10:09:04 +0000
+++ b/storage/perfschema/pfs_instr.cc	2012-03-28 10:46:02 +0000
@@ -588,7 +588,7 @@ void PFS_scan::init(uint random, uint ma
 */
 PFS_mutex* create_mutex(PFS_mutex_class *klass, const void *identity)
 {
-  static uint mutex_monotonic_index= 0;
+  static uint PFS_ALIGNED mutex_monotonic_index= 0;
   uint index;
   uint attempts= 0;
   PFS_mutex *pfs;
@@ -666,7 +666,7 @@ void destroy_mutex(PFS_mutex *pfs)
 */
 PFS_rwlock* create_rwlock(PFS_rwlock_class *klass, const void *identity)
 {
-  static uint rwlock_monotonic_index= 0;
+  static uint PFS_ALIGNED rwlock_monotonic_index= 0;
   uint index;
   uint attempts= 0;
   PFS_rwlock *pfs;
@@ -729,7 +729,7 @@ void destroy_rwlock(PFS_rwlock *pfs)
 */
 PFS_cond* create_cond(PFS_cond_class *klass, const void *identity)
 {
-  static uint cond_monotonic_index= 0;
+  static uint PFS_ALIGNED cond_monotonic_index= 0;
   uint index;
   uint attempts= 0;
   PFS_cond *pfs;
@@ -798,7 +798,7 @@ PFS_thread* PFS_thread::get_current_thre
 PFS_thread* create_thread(PFS_thread_class *klass, const void *identity,
                           ulong thread_id)
 {
-  static uint thread_monotonic_index= 0;
+  static uint PFS_ALIGNED thread_monotonic_index= 0;
   uint index;
   uint attempts= 0;
   PFS_thread *pfs;
@@ -1155,7 +1155,7 @@ find_or_create_file(PFS_thread *thread,
   PFS_file **entry;
   uint retry_count= 0;
   const uint retry_max= 3;
-  static uint file_monotonic_index= 0;
+  static uint PFS_ALIGNED file_monotonic_index= 0;
   uint index;
   uint attempts= 0;
 
@@ -1284,7 +1284,7 @@ void destroy_file(PFS_thread *thread, PF
 PFS_table* create_table(PFS_table_share *share, PFS_thread *opening_thread,
                         const void *identity)
 {
-  static uint table_monotonic_index= 0;
+  static uint PFS_ALIGNED table_monotonic_index= 0;
   uint index;
   uint attempts= 0;
   PFS_table *pfs;

=== modified file 'storage/perfschema/pfs_instr_class.cc'
--- a/storage/perfschema/pfs_instr_class.cc	2012-03-28 08:29:33 +0000
+++ b/storage/perfschema/pfs_instr_class.cc	2012-03-28 10:46:02 +0000
@@ -1257,7 +1257,7 @@ PFS_table_share* find_or_create_table_sh
   const uint retry_max= 3;
   bool enabled= true;
   bool timed= true;
-  static uint table_share_monotonic_index= 0;
+  static uint PFS_ALIGNED table_share_monotonic_index= 0;
   uint index;
   uint attempts= 0;
   PFS_table_share *pfs;
@@ -1300,8 +1300,7 @@ search:
   while (++attempts <= table_share_max)
   {
     /* See create_mutex() */
-    PFS_atomic::add_u32(& table_share_monotonic_index, 1);
-    index= table_share_monotonic_index % table_share_max;
+    index= PFS_atomic::add_u32(& table_share_monotonic_index, 1) % table_share_max;
     pfs= table_share_array + index;
 
     if (pfs->m_lock.is_free())

=== modified file 'storage/perfschema/pfs_setup_actor.cc'
--- a/storage/perfschema/pfs_setup_actor.cc	2012-03-28 08:29:33 +0000
+++ b/storage/perfschema/pfs_setup_actor.cc	2012-03-28 10:46:02 +0000
@@ -168,7 +168,7 @@ int insert_setup_actor(const String *use
   if (unlikely(pins == NULL))
     return HA_ERR_OUT_OF_MEM;
 
-  static uint setup_actor_monotonic_index= 0;
+  static uint PFS_ALIGNED setup_actor_monotonic_index= 0;
   uint index;
   uint attempts= 0;
   PFS_setup_actor *pfs;
@@ -176,8 +176,7 @@ int insert_setup_actor(const String *use
   while (++attempts <= setup_actor_max)
   {
     /* See create_mutex() */
-    PFS_atomic::add_u32(& setup_actor_monotonic_index, 1);
-    index= setup_actor_monotonic_index % setup_actor_max;
+    index= PFS_atomic::add_u32(& setup_actor_monotonic_index, 1) % setup_actor_max;
     pfs= setup_actor_array + index;
 
     if (pfs->m_lock.is_free())

=== modified file 'storage/perfschema/pfs_setup_object.cc'
--- a/storage/perfschema/pfs_setup_object.cc	2012-03-28 08:29:33 +0000
+++ b/storage/perfschema/pfs_setup_object.cc	2012-03-28 10:46:02 +0000
@@ -162,7 +162,7 @@ int insert_setup_object(enum_object_type
   if (unlikely(pins == NULL))
     return HA_ERR_OUT_OF_MEM;
 
-  static uint setup_object_monotonic_index= 0;
+  static uint PFS_ALIGNED setup_object_monotonic_index= 0;
   uint index;
   uint attempts= 0;
   PFS_setup_object *pfs;
@@ -170,8 +170,7 @@ int insert_setup_object(enum_object_type
   while (++attempts <= setup_object_max)
   {
     /* See create_mutex() */
-    PFS_atomic::add_u32(& setup_object_monotonic_index, 1);
-    index= setup_object_monotonic_index % setup_object_max;
+    index= PFS_atomic::add_u32(& setup_object_monotonic_index, 1) % setup_object_max;
     pfs= setup_object_array + index;
 
     if (pfs->m_lock.is_free())

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-pfs-tuning branch (marc.alff:3484 to 3485) Marc Alff28 Mar