#At file:///home/cpowers/work/dev/mysql-trunk-wl4896/ based on revid:cpowers@tma-1-20110207213649-njawkiv1pzup1e78
3225 Christopher Powers 2011-02-07
WL#4896 "Performance Schema Net IO"
- Fixed warning in pfs.cc
- Updated abi_check.out files
modified:
include/mysql/psi/psi_abi_v1.h.pp
include/mysql/psi/psi_abi_v2.h.pp
storage/perfschema/pfs.cc
=== modified file 'include/mysql/psi/psi_abi_v1.h.pp'
--- a/include/mysql/psi/psi_abi_v1.h.pp 2011-02-07 19:17:08 +0000
+++ b/include/mysql/psi/psi_abi_v1.h.pp 2011-02-07 22:17:15 +0000
@@ -8,6 +8,7 @@ struct PSI_table_share;
struct PSI_table;
struct PSI_thread;
struct PSI_file;
+struct PSI_socket;
struct PSI_table_locker;
struct PSI_bootstrap
{
@@ -66,11 +67,29 @@ enum PSI_table_lock_operation
PSI_TABLE_LOCK= 0,
PSI_TABLE_EXTERNAL_LOCK= 1,
};
+enum PSI_socket_operation
+{
+ PSI_SOCKET_CREATE= 0,
+ PSI_SOCKET_CONNECT= 1,
+ PSI_SOCKET_BIND= 2,
+ PSI_SOCKET_CLOSE= 3,
+ PSI_SOCKET_SEND= 4,
+ PSI_SOCKET_RECV= 5,
+ PSI_SOCKET_SENDTO= 6,
+ PSI_SOCKET_RECVFROM= 7,
+ PSI_SOCKET_SENDMSG= 8,
+ PSI_SOCKET_RECVMSG= 9,
+ PSI_SOCKET_SEEK= 10,
+ PSI_SOCKET_OPT= 11,
+ PSI_SOCKET_STAT= 12,
+ PSI_SOCKET_SHUTDOWN= 13
+};
typedef unsigned int PSI_mutex_key;
typedef unsigned int PSI_rwlock_key;
typedef unsigned int PSI_cond_key;
typedef unsigned int PSI_thread_key;
typedef unsigned int PSI_file_key;
+typedef unsigned int PSI_socket_key;
struct PSI_mutex_info_v1
{
PSI_mutex_key *m_key;
@@ -101,6 +120,12 @@ struct PSI_file_info_v1
const char *m_name;
int m_flags;
};
+struct PSI_socket_info_v1
+{
+ PSI_socket_key *m_key;
+ const char *m_name;
+ int m_flags;
+};
struct PSI_mutex_locker_state_v1
{
uint m_flags;
@@ -165,6 +190,19 @@ struct PSI_table_locker_state_v1
int m_src_line;
void *m_wait;
};
+struct PSI_socket_locker_state_v1
+{
+ uint m_flags;
+ struct PSI_socket *m_socket;
+ struct PSI_thread *m_thread;
+ size_t m_number_of_bytes;
+ ulonglong m_timer_start;
+ ulonglong (*m_timer)(void);
+ enum PSI_socket_operation m_operation;
+ const char* m_src_file;
+ int m_src_line;
+ void *m_wait;
+};
typedef void (*register_mutex_v1_t)
(const char *category, struct PSI_mutex_info_v1 *info, int count);
typedef void (*register_rwlock_v1_t)
@@ -175,6 +213,8 @@ typedef void (*register_thread_v1_t)
(const char *category, struct PSI_thread_info_v1 *info, int count);
typedef void (*register_file_v1_t)
(const char *category, struct PSI_file_info_v1 *info, int count);
+typedef void (*register_socket_v1_t)
+ (const char *category, struct PSI_socket_info_v1 *info, int count);
typedef struct PSI_mutex* (*init_mutex_v1_t)
(PSI_mutex_key key, const void *identity);
typedef void (*destroy_mutex_v1_t)(struct PSI_mutex *mutex);
@@ -184,6 +224,9 @@ typedef void (*destroy_rwlock_v1_t)(stru
typedef struct PSI_cond* (*init_cond_v1_t)
(PSI_cond_key key, const void *identity);
typedef void (*destroy_cond_v1_t)(struct PSI_cond *cond);
+typedef struct PSI_socket* (*init_socket_v1_t)
+ (PSI_socket_key key, const void *identity);
+typedef void (*destroy_socket_v1_t)(struct PSI_socket *socket);
typedef struct PSI_table_share* (*get_table_share_v1_t)
(my_bool temporary, struct TABLE_SHARE *share);
typedef void (*release_table_share_v1_t)(struct PSI_table_share *share);
@@ -243,6 +286,9 @@ typedef struct PSI_file_locker* (*get_th
typedef struct PSI_file_locker* (*get_thread_file_descriptor_locker_v1_t)
(struct PSI_file_locker_state_v1 *state,
File file, enum PSI_file_operation op);
+typedef struct PSI_socket_locker* (*get_thread_socket_locker_v1_t)
+ (struct PSI_socket_locker_state_v1 *state,
+ struct PSI_socket *socket, enum PSI_socket_operation op);
typedef void (*unlock_mutex_v1_t)
(struct PSI_mutex *mutex);
typedef void (*unlock_rwlock_v1_t)
@@ -283,6 +329,18 @@ typedef void (*start_file_wait_v1_t)
const char *src_file, uint src_line);
typedef void (*end_file_wait_v1_t)
(struct PSI_file_locker *locker, size_t count);
+typedef void (*start_socket_wait_v1_t)
+ (struct PSI_socket_locker *locker, size_t count,
+ const char *src_file, uint src_line);
+typedef void (*end_socket_wait_v1_t)
+ (struct PSI_socket_locker *locker, size_t count);
+typedef void (*set_socket_descriptor_v1_t)(struct PSI_socket *socket,
+ uint fd);
+typedef void (*set_socket_address_v1_t)(struct PSI_socket *socket,
+ const struct sockaddr * addr);
+typedef void (*set_socket_info_v1_t)(struct PSI_socket *socket,
+ uint fd,
+ const struct sockaddr * addr);
struct PSI_v1
{
register_mutex_v1_t register_mutex;
@@ -290,12 +348,15 @@ struct PSI_v1
register_cond_v1_t register_cond;
register_thread_v1_t register_thread;
register_file_v1_t register_file;
+ register_socket_v1_t register_socket;
init_mutex_v1_t init_mutex;
destroy_mutex_v1_t destroy_mutex;
init_rwlock_v1_t init_rwlock;
destroy_rwlock_v1_t destroy_rwlock;
init_cond_v1_t init_cond;
destroy_cond_v1_t destroy_cond;
+ init_socket_v1_t init_socket;
+ destroy_socket_v1_t destroy_socket;
get_table_share_v1_t get_table_share;
release_table_share_v1_t release_table_share;
drop_table_share_v1_t drop_table_share;
@@ -324,6 +385,7 @@ struct PSI_v1
get_thread_file_name_locker_v1_t get_thread_file_name_locker;
get_thread_file_stream_locker_v1_t get_thread_file_stream_locker;
get_thread_file_descriptor_locker_v1_t get_thread_file_descriptor_locker;
+ get_thread_socket_locker_v1_t get_thread_socket_locker;
unlock_mutex_v1_t unlock_mutex;
unlock_rwlock_v1_t unlock_rwlock;
signal_cond_v1_t signal_cond;
@@ -346,6 +408,11 @@ struct PSI_v1
end_file_open_wait_and_bind_to_descriptor;
start_file_wait_v1_t start_file_wait;
end_file_wait_v1_t end_file_wait;
+ start_socket_wait_v1_t start_socket_wait;
+ end_socket_wait_v1_t end_socket_wait;
+ set_socket_descriptor_v1_t set_socket_descriptor;
+ set_socket_address_v1_t set_socket_address;
+ set_socket_info_v1_t set_socket_info;
};
typedef struct PSI_v1 PSI;
typedef struct PSI_mutex_info_v1 PSI_mutex_info;
@@ -353,10 +420,12 @@ typedef struct PSI_rwlock_info_v1 PSI_rw
typedef struct PSI_cond_info_v1 PSI_cond_info;
typedef struct PSI_thread_info_v1 PSI_thread_info;
typedef struct PSI_file_info_v1 PSI_file_info;
+typedef struct PSI_socket_info_v1 PSI_socket_info;
typedef struct PSI_mutex_locker_state_v1 PSI_mutex_locker_state;
typedef struct PSI_rwlock_locker_state_v1 PSI_rwlock_locker_state;
typedef struct PSI_cond_locker_state_v1 PSI_cond_locker_state;
typedef struct PSI_file_locker_state_v1 PSI_file_locker_state;
typedef struct PSI_table_locker_state_v1 PSI_table_locker_state;
+typedef struct PSI_socket_locker_state_v1 PSI_socket_locker_state;
extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
C_MODE_END
=== modified file 'include/mysql/psi/psi_abi_v2.h.pp'
--- a/include/mysql/psi/psi_abi_v2.h.pp 2011-01-26 22:26:41 +0000
+++ b/include/mysql/psi/psi_abi_v2.h.pp 2011-02-07 22:17:15 +0000
@@ -75,10 +75,14 @@ enum PSI_socket_operation
PSI_SOCKET_CLOSE= 3,
PSI_SOCKET_SEND= 4,
PSI_SOCKET_RECV= 5,
- PSI_SOCKET_SEEK= 6,
- PSI_SOCKET_OPT= 7,
- PSI_SOCKET_STAT= 8,
- PSI_SOCKET_SHUTDOWN= 9
+ PSI_SOCKET_SENDTO= 6,
+ PSI_SOCKET_RECVFROM= 7,
+ PSI_SOCKET_SENDMSG= 8,
+ PSI_SOCKET_RECVMSG= 9,
+ PSI_SOCKET_SEEK= 10,
+ PSI_SOCKET_OPT= 11,
+ PSI_SOCKET_STAT= 12,
+ PSI_SOCKET_SHUTDOWN= 13
};
typedef unsigned int PSI_mutex_key;
typedef unsigned int PSI_rwlock_key;
=== modified file 'storage/perfschema/pfs.cc'
--- a/storage/perfschema/pfs.cc 2011-02-07 21:34:45 +0000
+++ b/storage/perfschema/pfs.cc 2011-02-07 22:17:15 +0000
@@ -3630,7 +3630,7 @@ static void end_socket_wait_v1(PSI_socke
}
/** Aggregate the number of bytes for the operation */
- if (byte_count > -1)
+ if ((int)byte_count > -1)
io_stat->aggregate_timed(byte_count);
}
Attachment: [text/bzr-bundle] bzr/chris.powers@oracle.com-20110207221715-e0cq6pg99bw2z57u.bundle
| Thread |
|---|
| • bzr commit into mysql-trunk-wl5379 branch (chris.powers:3225) WL#4896 | Christopher Powers | 7 Feb |