List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:November 25 2010 12:53pm
Subject:bzr push into mysql-5.1-telco-7.0 branch (jonas:4017 to 4018)
View as plain text  
 4018 Jonas Oreland	2010-11-25
      ndb - mt.cpp micro optimization (observed using oprofile on various load)

    modified:
      storage/ndb/src/kernel/vm/GlobalData.hpp
      storage/ndb/src/kernel/vm/mt.cpp
 4017 Jonas Oreland	2010-11-24 [merge]
      ndb - merge 63 to 70

    modified:
      mysql-test/suite/ndb/r/ndb_index.result
      mysql-test/suite/ndb/r/ndb_read_multi_range.result
      mysql-test/suite/ndb/r/ndb_subquery.result
      mysql-test/suite/ndb/t/ndb_index.test
      mysql-test/suite/ndb/t/ndb_read_multi_range.test
      mysql-test/suite/ndb/t/ndb_subquery.test
      sql/ha_ndbcluster.cc
      sql/ha_ndbcluster.h
=== modified file 'storage/ndb/src/kernel/vm/GlobalData.hpp'
--- a/storage/ndb/src/kernel/vm/GlobalData.hpp	2010-04-28 12:21:54 +0000
+++ b/storage/ndb/src/kernel/vm/GlobalData.hpp	2010-11-25 12:53:32 +0000
@@ -96,6 +96,7 @@ struct GlobalData {
   SimulatedBlock * getBlockInstance(BlockNumber fullBlockNo) {
     return getBlock(blockToMain(fullBlockNo), blockToInstance(fullBlockNo));
   }
+  SimulatedBlock * mt_getBlock(BlockNumber blockNo, Uint32 instanceNo);
   
   void           incrementWatchDogCounter(Uint32 place);
   Uint32 * getWatchDogPtr();

=== modified file 'storage/ndb/src/kernel/vm/mt.cpp'
--- a/storage/ndb/src/kernel/vm/mt.cpp	2010-11-09 10:45:29 +0000
+++ b/storage/ndb/src/kernel/vm/mt.cpp	2010-11-25 12:53:32 +0000
@@ -34,6 +34,16 @@
 
 #include "mt-asm.h"
 
+inline
+SimulatedBlock*
+GlobalData::mt_getBlock(BlockNumber blockNo, Uint32 instanceNo)
+{
+  SimulatedBlock* b = getBlock(blockNo);
+  if (b != 0 && instanceNo != 0)
+    b = b->getInstance(instanceNo);
+  return b;
+}
+
 #ifdef __GNUC__
 /* Provides a small (but noticeable) speedup in benchmarks. */
 #define memcpy __builtin_memcpy
@@ -2395,7 +2405,7 @@ execute_signals(thr_data *selfptr, thr_j
     }
     Uint32 bno = blockToMain(s->theReceiversBlockNumber);
     Uint32 ino = map_instance(s);
-    SimulatedBlock* block = globalData.getBlock(bno, ino);
+    SimulatedBlock* block = globalData.mt_getBlock(bno, ino);
     assert(block != 0);
 
     Uint32 gsn = s->theVerId_signalNumber;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (jonas:4017 to 4018) Jonas Oreland25 Nov