MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:Vadim Tkachenko Date:June 24 2005 11:33am
Subject:bk commit into 5.0-hp tree (vtkachenko:1.2000)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0-hp repository of vtkachenko. When vtkachenko does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2000 05/06/24 13:33:39 vtkachenko@stripped +3 -0
  ha_innodb.h, ha_innodb.cc, srv0srv.c:
    Added srv_suspend timing

  sql/ha_innodb.h
    1.98 05/06/24 13:32:40 vtkachenko@stripped +1 -0
    Added srv_suspend timing

  sql/ha_innodb.cc
    1.214 05/06/24 13:32:40 vtkachenko@stripped +23 -0
    Added srv_suspend timing

  innobase/srv/srv0srv.c
    1.91 05/06/24 13:32:40 vtkachenko@stripped +17 -3
    Added srv_suspend timing

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	vtkachenko
# Host:	quadxeon.mysql.com
# Root:	/users/vtkachenko/bk/HP/mysql-5.0-hp-build

--- 1.90/innobase/srv/srv0srv.c	2005-05-12 23:08:17 +02:00
+++ 1.91/innobase/srv/srv0srv.c	2005-06-24 13:32:40 +02:00
@@ -345,6 +345,7 @@
 ulint		srv_n_lock_wait_count		= 0;
 ulint		srv_n_lock_wait_current_count	= 0;
 ib_longlong	srv_n_lock_wait_time		= 0;
+ib_longlong     srv_n_suspend_time		= 0;
 ulint		srv_n_lock_max_wait_time	= 0;
 
 
@@ -1439,6 +1440,10 @@
 		srv_n_lock_wait_count++;
 		srv_n_lock_wait_current_count++;
 
+	}
+	
+	if ((timed_mutexes) || (thr->lock_state == QUE_THR_LOCK_ROW))
+	{
 		ut_usectime(&sec, &ms);
 		start_time = (ib_longlong)sec * 1000000 + ms;
 	}
@@ -1493,12 +1498,21 @@
 
 	wait_time = ut_difftime(ut_time(), slot->suspend_time);
 
-	if (thr->lock_state == QUE_THR_LOCK_ROW) {
+	if ((timed_mutexes) || (thr->lock_state == QUE_THR_LOCK_ROW))
+	{
 		ut_usectime(&sec, &ms);
 		finish_time = (ib_longlong)sec * 1000000 + ms;
-
 		diff_time = (ulint) (finish_time - start_time);
-  
+	}
+	
+	if (timed_mutexes) 
+	{
+		srv_n_suspend_time= srv_n_suspend_time + diff_time;
+	}
+	
+	if (thr->lock_state == QUE_THR_LOCK_ROW)
+	{
+
 		srv_n_lock_wait_current_count--;
 		srv_n_lock_wait_time = srv_n_lock_wait_time + diff_time;
 		if (diff_time > srv_n_lock_max_wait_time) {

--- 1.213/sql/ha_innodb.cc	2005-06-23 11:12:59 +02:00
+++ 1.214/sql/ha_innodb.cc	2005-06-24 13:32:40 +02:00
@@ -6484,6 +6484,29 @@
   protocol->store((ulonglong)rw_lock_count_os_yield);
   protocol->store((ulonglong)rw_lock_wait_time/1000);
 
+  if (protocol->write())
+  {                                    
+    DBUG_RETURN(1);
+  }
+    
+  protocol->prepare_for_resend();
+  protocol->store("suspend_time", system_charset_info);
+  protocol->store("", system_charset_info);
+  protocol->store((ulonglong)0);
+  protocol->store((ulonglong)0);
+  protocol->store((ulonglong)0);
+  protocol->store((ulonglong)0);
+  protocol->store((ulonglong)0);
+  protocol->store((ulonglong)srv_n_suspend_time/1000);
+
+  if (flush)
+    srv_n_suspend_time= 0;
+
+  if (protocol->write())
+  {                                    
+    DBUG_RETURN(1);
+  }
+
  
 
 #ifdef MUTEX_PROTECT_TO_BE_ADDED_LATER

--- 1.97/sql/ha_innodb.h	2005-06-23 11:13:00 +02:00
+++ 1.98/sql/ha_innodb.h	2005-06-24 13:32:40 +02:00
@@ -242,6 +242,7 @@
 extern ulong srv_auto_extend_increment;
 extern ulong srv_n_spin_wait_rounds;
 extern ulong srv_n_free_tickets_to_enter;
+extern ulonglong srv_n_suspend_time;
 extern ulong srv_thread_sleep_delay;
 extern ulong srv_thread_concurrency;
 }
Thread
bk commit into 5.0-hp tree (vtkachenko:1.2000)Vadim Tkachenko24 Jun