List:Commits« Previous MessageNext Message »
From:Christopher Powers Date:August 6 2011 12:01am
Subject:bzr push into mysql-trunk branch (chris.powers:3349 to 3351) WL#4896
View as plain text  
 3351 Christopher Powers	2011-08-05
      WL#4896 "Performance Schema Net IO"
      
      Disable instrumenting IDLE wait times for testing.

    modified:
      mysql-test/suite/perfschema/include/socket_summary_check.inc
      sql/sql_parse.cc
 3350 Christopher Powers	2011-08-05
      WL#4896 "Performance Schema Net IO"
      
      - Removed unnecessary DBUG_ASSERT()s wreaking havoc on SPARC pushbuild

    modified:
      storage/perfschema/pfs.cc
 3349 Christopher Powers	2011-08-05
      WL#4896 "Performance Schema Net IO"
      
      test updates from merge with mysql-trunk

    modified:
      include/mysql/psi/psi_abi_v1.h.pp
      mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result
=== modified file 'mysql-test/suite/perfschema/include/socket_summary_check.inc'
--- a/mysql-test/suite/perfschema/include/socket_summary_check.inc	2011-08-05 00:20:04 +0000
+++ b/mysql-test/suite/perfschema/include/socket_summary_check.inc	2011-08-05 23:59:49 +0000
@@ -76,7 +76,7 @@ if(`SELECT COUNT(*) $part1`)
 #
 #    If we run this check sufficient frequent than AVG_TIMER_* can be removed from other checks.
 #-----------------------------------------------------------------------------------------------
-let $my_lo= 0.80;
+let $my_lo= 0.90;
 let $my_hi= 1.01;
 
 let $my_rules=

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2011-08-03 18:29:12 +0000
+++ b/sql/sql_parse.cc	2011-08-05 23:59:49 +0000
@@ -805,7 +805,7 @@ bool do_command(THD *thd)
   ulong packet_length;
   NET *net= &thd->net;
   enum enum_server_command command;
-  MYSQL_IDLE_WAIT_VARIABLES(idle_locker, idle_state) /* no ; */
+  //MYSQL_IDLE_WAIT_VARIABLES(idle_locker, idle_state) /* no ; */
 
   DBUG_ENTER("do_command");
 
@@ -853,13 +853,13 @@ bool do_command(THD *thd)
     - do not time the wait on the socket
     - time the wait as IDLE server time instead.
   */
-  mysql_socket_set_state(net->vio->mysql_socket, PSI_SOCKET_STATE_IDLE);
-  MYSQL_START_IDLE_WAIT(idle_locker, &idle_state);
+  //mysql_socket_set_state(net->vio->mysql_socket, PSI_SOCKET_STATE_IDLE);
+  //MYSQL_START_IDLE_WAIT(idle_locker, &idle_state);
 
   packet_length= my_net_read(net);
 
-  MYSQL_END_IDLE_WAIT(idle_locker);
-  mysql_socket_set_state(net->vio->mysql_socket, PSI_SOCKET_STATE_ACTIVE);
+  //MYSQL_END_IDLE_WAIT(idle_locker);
+  //mysql_socket_set_state(net->vio->mysql_socket, PSI_SOCKET_STATE_ACTIVE);
 
   if (packet_length == packet_error)
   {

=== modified file 'storage/perfschema/pfs.cc'
--- a/storage/perfschema/pfs.cc	2011-08-05 06:40:29 +0000
+++ b/storage/perfschema/pfs.cc	2011-08-05 20:16:40 +0000
@@ -2820,7 +2820,7 @@ get_thread_socket_locker_v1(PSI_socket_l
     flags= STATE_FLAG_THREAD;
 
     /* Sockets in IDLE state are timed separately */
-	if (pfs_socket->m_timed)
+	  if (pfs_socket->m_timed)
       flags|= STATE_FLAG_TIMED;
 
     if (flag_events_waits_current)
@@ -2865,9 +2865,9 @@ get_thread_socket_locker_v1(PSI_socket_l
 
       /*
         Even if timing is disabled, end_socket_wait() still needs a locker to
-		capture the number of bytes sent or received by the socket operation.
-		For operations that do not have a byte count, then just increment the
-		event counter and return a NULL locker.
+	  	  capture the number of bytes sent or received by the socket operation.
+        For operations that do not have a byte count, then just increment the
+        event counter and return a NULL locker.
       */
       switch (op)
       {
@@ -4613,8 +4613,6 @@ static void end_socket_wait_v1(PSI_socke
   DBUG_ASSERT(state != NULL);
   PFS_socket *socket= reinterpret_cast<PFS_socket *>(state->m_socket);
   DBUG_ASSERT(socket != NULL);
-  PFS_thread *thread= reinterpret_cast<PFS_thread *>(state->m_thread);
-  DBUG_ASSERT(thread != NULL);
 
   ulonglong timer_end= 0;
   ulonglong wait_time= 0;
@@ -4626,39 +4624,39 @@ static void end_socket_wait_v1(PSI_socke
   
   switch (state->m_operation)
   {
-  /** Group read operations */
-  case PSI_SOCKET_RECV:
-  case PSI_SOCKET_RECVFROM:
-  case PSI_SOCKET_RECVMSG:
-    byte_stat= &socket->m_socket_stat.m_io_stat.m_read;
-    break;
-  /** Group write operations */
-  case PSI_SOCKET_SEND:
-  case PSI_SOCKET_SENDTO:
-  case PSI_SOCKET_SENDMSG:
-    byte_stat= &socket->m_socket_stat.m_io_stat.m_write;
-    break;
-  /** Group remainging operations as miscellaneous */
-  case PSI_SOCKET_CONNECT:
-  case PSI_SOCKET_CREATE:
-  case PSI_SOCKET_BIND:
-  case PSI_SOCKET_SEEK:
-  case PSI_SOCKET_OPT:
-  case PSI_SOCKET_STAT:
-  case PSI_SOCKET_SHUTDOWN:
-  case PSI_SOCKET_SELECT:
-    byte_stat= &socket->m_socket_stat.m_io_stat.m_misc;
-    break;
-  case PSI_SOCKET_CLOSE:
-    byte_stat= &socket->m_socket_stat.m_io_stat.m_misc;
-    /* This socket will no longer be used by the server */
-    socket_closed= true;
-    break;
+    /** Group read operations */
+    case PSI_SOCKET_RECV:
+    case PSI_SOCKET_RECVFROM:
+    case PSI_SOCKET_RECVMSG:
+      byte_stat= &socket->m_socket_stat.m_io_stat.m_read;
+      break;
+    /** Group write operations */
+    case PSI_SOCKET_SEND:
+    case PSI_SOCKET_SENDTO:
+    case PSI_SOCKET_SENDMSG:
+      byte_stat= &socket->m_socket_stat.m_io_stat.m_write;
+      break;
+    /** Group remainging operations as miscellaneous */
+    case PSI_SOCKET_CONNECT:
+    case PSI_SOCKET_CREATE:
+    case PSI_SOCKET_BIND:
+    case PSI_SOCKET_SEEK:
+    case PSI_SOCKET_OPT:
+    case PSI_SOCKET_STAT:
+    case PSI_SOCKET_SHUTDOWN:
+    case PSI_SOCKET_SELECT:
+      byte_stat= &socket->m_socket_stat.m_io_stat.m_misc;
+      break;
+    case PSI_SOCKET_CLOSE:
+      byte_stat= &socket->m_socket_stat.m_io_stat.m_misc;
+      /* This socket will no longer be used by the server */
+      socket_closed= true;
+      break;
 
-  default:
-    DBUG_ASSERT(false);
-    byte_stat= NULL;
-    break;
+    default:
+      DBUG_ASSERT(false);
+      byte_stat= NULL;
+      break;
   }
 
   /** Aggregation for EVENTS_WAITS_SUMMARY_BY_INSTANCE */
@@ -4693,6 +4691,7 @@ static void end_socket_wait_v1(PSI_socke
   /** Global thread aggregation */
   if (flags & STATE_FLAG_THREAD)
   {
+    PFS_thread *thread= reinterpret_cast<PFS_thread *>(state->m_thread);
     DBUG_ASSERT(thread != NULL);
 
     PFS_single_stat *event_name_array;
@@ -4721,10 +4720,6 @@ static void end_socket_wait_v1(PSI_socke
     /* Aggregate to EVENTS_WAITS_CURRENT and EVENTS_WAITS_HISTORY */
     if (flags & STATE_FLAG_EVENT)
     {
-      DBUG_ASSERT(flags & STATE_FLAG_THREAD);
-      PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread);
-      DBUG_ASSERT(thread != NULL);
-
       PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait);
       DBUG_ASSERT(wait != NULL);
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (chris.powers:3349 to 3351) WL#4896Christopher Powers10 Aug