MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Marc Alff Date:January 26 2010 11:42pm
Subject:bzr commit into mysql-5.5-next-mr branch (marc.alff:2975) Bug#44210
View as plain text  
#At file:///home/malff/BZR_TREE/mysql-next-mr-marc-44210/ based on revid:marc.alff@stripped

 2975 Marc Alff	2010-01-26
      Bug#44210 Performance schema: pool-of-threads threads instrumentation is missing
      
      WL#5136 Pool of threads
      
      Added an explicit delete_thread() API in the instrumentation,
      to be used by the pool of threads implementations.

    modified:
      include/mysql/psi/psi.h
      include/mysql/psi/psi_abi_v1.h.pp
      storage/perfschema/pfs.cc
=== modified file 'include/mysql/psi/psi.h'
--- a/include/mysql/psi/psi.h	2009-12-01 00:49:15 +0000
+++ b/include/mysql/psi/psi.h	2010-01-26 23:42:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2009 Sun Microsystems, Inc
+/* Copyright (C) 2008-2010 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
@@ -614,6 +614,9 @@ typedef void (*set_thread_v1_t)(struct P
 /** Delete the current thread instrumentation. */
 typedef void (*delete_current_thread_v1_t)(void);
 
+/** Delete a thread instrumentation. */
+typedef void (*delete_thread_v1_t)(struct PSI_thread *thread);
+
 /**
   Get a mutex instrumentation locker.
   @param mutex the instrumented mutex to lock
@@ -890,6 +893,8 @@ struct PSI_v1
   set_thread_v1_t set_thread;
   /** @sa delete_current_thread_v1_t. */
   delete_current_thread_v1_t delete_current_thread;
+  /** @sa delete_thread_v1_t. */
+  delete_thread_v1_t delete_thread;
   /** @sa get_thread_mutex_locker_v1_t. */
   get_thread_mutex_locker_v1_t get_thread_mutex_locker;
   /** @sa get_thread_rwlock_locker_v1_t. */

=== modified file 'include/mysql/psi/psi_abi_v1.h.pp'
--- a/include/mysql/psi/psi_abi_v1.h.pp	2009-12-01 00:49:15 +0000
+++ b/include/mysql/psi/psi_abi_v1.h.pp	2010-01-26 23:42:54 +0000
@@ -127,6 +127,7 @@ typedef void (*set_thread_id_v1_t)(struc
 typedef struct PSI_thread* (*get_thread_v1_t)(void);
 typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
 typedef void (*delete_current_thread_v1_t)(void);
+typedef void (*delete_thread_v1_t)(struct PSI_thread *thread);
 typedef struct PSI_mutex_locker* (*get_thread_mutex_locker_v1_t)
   (struct PSI_mutex *mutex, enum PSI_mutex_operation op);
 typedef struct PSI_rwlock_locker* (*get_thread_rwlock_locker_v1_t)
@@ -204,6 +205,7 @@ struct PSI_v1
   get_thread_v1_t get_thread;
   set_thread_v1_t set_thread;
   delete_current_thread_v1_t delete_current_thread;
+  delete_thread_v1_t delete_thread;
   get_thread_mutex_locker_v1_t get_thread_mutex_locker;
   get_thread_rwlock_locker_v1_t get_thread_rwlock_locker;
   get_thread_cond_locker_v1_t get_thread_cond_locker;

=== modified file 'storage/perfschema/pfs.cc'
--- a/storage/perfschema/pfs.cc	2010-01-12 01:47:27 +0000
+++ b/storage/perfschema/pfs.cc	2010-01-26 23:42:54 +0000
@@ -1081,6 +1081,13 @@ static void delete_current_thread_v1(voi
   }
 }
 
+static void delete_thread_v1(PSI_thread *thread)
+{
+  PFS_thread *pfs= reinterpret_cast<PFS_thread*> (thread);
+  if (pfs != NULL)
+    destroy_thread(pfs);
+}
+
 static PSI_mutex_locker*
 get_thread_mutex_locker_v1(PSI_mutex *mutex, PSI_mutex_operation op)
 {
@@ -2007,6 +2014,7 @@ PSI_v1 PFS_v1=
   get_thread_v1,
   set_thread_v1,
   delete_current_thread_v1,
+  delete_thread_v1,
   get_thread_mutex_locker_v1,
   get_thread_rwlock_locker_v1,
   get_thread_cond_locker_v1,


Attachment: [text/bzr-bundle] bzr/marc.alff@sun.com-20100126234254-p7jzd6nuk0o8ym5h.bundle
Thread
bzr commit into mysql-5.5-next-mr branch (marc.alff:2975) Bug#44210Marc Alff27 Jan