List:Commits« Previous MessageNext Message »
From:Marc Alff Date:July 10 2010 3:31am
Subject:bzr commit into mysql-next-mr branch (marc.alff:3162)
View as plain text  
#At file:///home/malff/BZR_TREE/mysql-next-mr-wl4674/ based on revid:marc.alff@stripped

 3162 Marc Alff	2010-07-09
      Added doxygen comments

    modified:
      include/mysql/psi/psi.h
      storage/perfschema/pfs.cc
      storage/perfschema/pfs_instr.cc
      storage/perfschema/pfs_instr.h
      storage/perfschema/pfs_setup_actor.h
      storage/perfschema/table_threads.h
=== modified file 'include/mysql/psi/psi.h'
--- a/include/mysql/psi/psi.h	2010-06-16 16:14:32 +0000
+++ b/include/mysql/psi/psi.h	2010-07-10 03:31:35 +0000
@@ -600,19 +600,53 @@ typedef void (*set_thread_id_v1_t)(struc
 */
 typedef struct PSI_thread* (*get_thread_v1_t)(void);
 
+/**
+  Assign a user name to the instrumented thread.
+  @param user the user name
+  @param user_len the user name length
+*/
 typedef void (*set_thread_user_v1_t)(const char *user, int user_len);
 
+/**
+  Assign a user name and host name to the instrumented thread.
+  @param user the user name
+  @param user_len the user name length
+  @param host the host name
+  @param host_len the host name length
+*/
 typedef void (*set_thread_user_host_v1_t)(const char *user, int user_len,
                                           const char *host, int host_len);
 
+/**
+  Assign a current database to the instrumented thread.
+  @param db the database name
+  @param db_len the database name length
+*/
 typedef void (*set_thread_db_v1_t)(const char* db, int db_len);
 
+/**
+  Assign a current command to the instrumented thread.
+  @param command the current command
+*/
 typedef void (*set_thread_command_v1_t)(int command);
 
+/**
+  Assign a start time to the instrumented thread.
+  @param start_time the thread start time
+*/
 typedef void (*set_thread_start_time_v1_t)(time_t start_time);
 
+/**
+  Assign a state to the instrumented thread.
+  @param state the thread state
+*/
 typedef void (*set_thread_state_v1_t)(const char* state);
 
+/**
+  Assign a process info to the instrumented thread.
+  @param info the process into string
+  @param info_len the process into string length
+*/
 typedef void (*set_thread_info_v1_t)(const char* info, int info_len);
 
 /**

=== modified file 'storage/perfschema/pfs.cc'
--- a/storage/perfschema/pfs.cc	2010-06-16 16:14:32 +0000
+++ b/storage/perfschema/pfs.cc	2010-07-10 03:31:35 +0000
@@ -1070,6 +1070,10 @@ get_thread_v1(void)
   return reinterpret_cast<PSI_thread*> (pfs);
 }
 
+/**
+  Implementation of the thread instrumentation interface.
+  @sa PSI_v1::set_thread_user.
+*/
 static void set_thread_user_v1(const char *user, int user_len)
 {
   PFS_thread *pfs= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);
@@ -1107,6 +1111,10 @@ static void set_thread_user_v1(const cha
   pfs->m_lock.dirty_to_allocated();
 }
 
+/**
+  Implementation of the thread instrumentation interface.
+  @sa PSI_v1::set_thread_user_host.
+*/
 static void set_thread_user_host_v1(const char *user, int user_len,
                                     const char *host, int host_len)
 {
@@ -1151,6 +1159,10 @@ static void set_thread_user_host_v1(cons
   pfs->m_lock.dirty_to_allocated();
 }
 
+/**
+  Implementation of the thread instrumentation interface.
+  @sa PSI_v1::set_thread_db.
+*/
 static void set_thread_db_v1(const char* db, int db_len)
 {
   PFS_thread *pfs= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);
@@ -1169,6 +1181,10 @@ static void set_thread_db_v1(const char*
   }
 }
 
+/**
+  Implementation of the thread instrumentation interface.
+  @sa PSI_v1::set_thread_command.
+*/
 static void set_thread_command_v1(int command)
 {
   PFS_thread *pfs= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);
@@ -1184,6 +1200,10 @@ static void set_thread_command_v1(int co
   }
 }
 
+/**
+  Implementation of the thread instrumentation interface.
+  @sa PSI_v1::set_thread_start_time.
+*/
 static void set_thread_start_time_v1(time_t start_time)
 {
   PFS_thread *pfs= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);
@@ -1196,6 +1216,10 @@ static void set_thread_start_time_v1(tim
   }
 }
 
+/**
+  Implementation of the thread instrumentation interface.
+  @sa PSI_v1::set_thread_state.
+*/
 static void set_thread_state_v1(const char* state)
 {
   PFS_thread *pfs= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);
@@ -1211,6 +1235,10 @@ static void set_thread_state_v1(const ch
   }
 }
 
+/**
+  Implementation of the thread instrumentation interface.
+  @sa PSI_v1::set_thread_info.
+*/
 static void set_thread_info_v1(const char* info, int info_len)
 {
   PFS_thread *pfs= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);

=== modified file 'storage/perfschema/pfs_instr.cc'
--- a/storage/perfschema/pfs_instr.cc	2010-06-15 14:23:08 +0000
+++ b/storage/perfschema/pfs_instr.cc	2010-07-10 03:31:35 +0000
@@ -747,7 +747,7 @@ PFS_thread* create_thread(PFS_thread_cla
           pfs->m_username_length= 0;
           pfs->m_hostname_length= 0;
           pfs->m_dbname_length= 0;
-          pfs->m_command= 0; /* FIXME: revise this */
+          pfs->m_command= 0;
           pfs->m_start_time= 0;
           pfs->m_processlist_state_length= 0;
           pfs->m_processlist_info_length= 0;

=== modified file 'storage/perfschema/pfs_instr.h'
--- a/storage/perfschema/pfs_instr.h	2010-06-15 14:23:08 +0000
+++ b/storage/perfschema/pfs_instr.h	2010-07-10 03:31:35 +0000
@@ -229,17 +229,29 @@ struct PFS_thread
   */
   PFS_single_stat_chain *m_instr_class_wait_stats;
 
+  /** User name. */
   char m_username[USERNAME_LENGTH];
+  /** Length of @c m_username. */
   uint m_username_length;
+  /** Host name. */
   char m_hostname[HOSTNAME_LENGTH];
+  /** Length of @c m_hostname. */
   uint m_hostname_length;
+  /** Database name. */
   char m_dbname[NAME_LEN];
+  /** Length of @c m_dbname. */
   uint m_dbname_length;
+  /** Current command. */
   int m_command;
+  /** Start time. */
   time_t m_start_time;
+  /** Processlist state. */
   const char *m_processlist_state_ptr;
+  /** Length of @c m_processlist_state_ptr. */
   uint m_processlist_state_length;
+  /** Processlist info. */
   const char *m_processlist_info_ptr;
+  /** Length of @c m_processlist_info_length. */
   uint m_processlist_info_length;
 };
 

=== modified file 'storage/perfschema/pfs_setup_actor.h'
--- a/storage/perfschema/pfs_setup_actor.h	2010-07-02 16:15:37 +0000
+++ b/storage/perfschema/pfs_setup_actor.h	2010-07-10 03:31:35 +0000
@@ -43,6 +43,7 @@ struct PFS_setup_actor_key
     the format is "<username><0x00><hostname><0x00><rolename><0x00>"
   */
   char m_hash_key[USERNAME_LENGTH + 1 + HOSTNAME_LENGTH + 1 + ROLENAME_LENGTH + 1];
+  /** Length of @c m_hash_key. */
   uint m_key_length;
 };
 
@@ -50,12 +51,19 @@ struct PFS_setup_actor
 {
   /** Internal lock. */
   pfs_lock m_lock;
+  /** Hash key. */
   PFS_setup_actor_key m_key;
+  /** User name. This points inside the hash key. */
   const char *m_username;
+  /** Length of @c m_username. */
   uint m_username_length;
+  /** Host name. This points inside the hash key. */
   const char *m_hostname;
+  /** Length of @c m_hostname. */
   uint m_hostname_length;
+  /** Role name. This points inside the hash key. */
   const char *m_rolename;
+  /** Length of @c m_rolename. */
   uint m_rolename_length;
 };
 

=== modified file 'storage/perfschema/table_threads.h'
--- a/storage/perfschema/table_threads.h	2010-07-02 16:15:37 +0000
+++ b/storage/perfschema/table_threads.h	2010-07-10 03:31:35 +0000
@@ -33,25 +33,37 @@ struct row_threads
 {
   /** Column THREAD_ID. */
   ulong m_thread_internal_id;
-  /** Column ID. */
+  /** Column PROCESSLIST_ID. */
   ulong m_thread_id;
   /** Column NAME. */
   const char* m_name;
   /** Length in bytes of @c m_name. */
   uint m_name_length;
-
+  /** Column PROCESSLIST_USER. */
   char m_username[USERNAME_LENGTH];
+  /** Length in bytes of @c m_username. */
   uint m_username_length;
+  /** Column PROCESSLIST_HOST. */
   char m_hostname[HOSTNAME_LENGTH];
+  /** Length in bytes of @c m_hostname. */
   uint m_hostname_length;
+  /** Column PROCESSLIST_DB. */
   char m_dbname[NAME_LEN];
+  /** Length in bytes of @c m_dbname. */
   uint m_dbname_length;
+  /** Column PROCESSLIST_COMMAND. */
   int m_command;
+  /** Column PROCESSLIST_TIME. */
   time_t m_start_time;
+  /** Column PROCESSLIST_STATE. */
   const char* m_processlist_state_ptr;
+  /** Length in bytes of @c m_processlist_state_ptr. */
   uint m_processlist_state_length;
+  /** Column PROCESSLIST_INFO. */
   const char* m_processlist_info_ptr;
+  /** Length in bytes of @c m_processlist_info_ptr. */
   uint m_processlist_info_length;
+  /** Column INSTRUMENTED. */
   bool *m_enabled_ptr;
 };
 


Attachment: [text/bzr-bundle] bzr/marc.alff@oracle.com-20100710033135-lit77jt01j651qxm.bundle
Thread
bzr commit into mysql-next-mr branch (marc.alff:3162) Marc Alff10 Jul