#At file:///home/cpowers/work/dev/mysql-trunk-wl4896/ based on revid:chris.powers@stripped
3222 Christopher Powers 2011-02-02
WL#4896 "Performance Schema Net IO"
- Updated abi files
- Fixed compiler warnings
- Updates to table definition of socket_instances
modified:
include/mysql/psi/psi_abi_v1.h.pp
include/mysql/psi/psi_abi_v2.h.pp
storage/perfschema/pfs.cc
storage/perfschema/table_socket_instances.cc*
storage/perfschema/table_socket_instances.h*
=== modified file 'include/mysql/psi/psi_abi_v1.h.pp'
--- a/include/mysql/psi/psi_abi_v1.h.pp 2011-01-26 22:26:41 +0000
+++ b/include/mysql/psi/psi_abi_v1.h.pp 2011-02-03 05:40:19 +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 '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-03 05:40:19 +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-03 05:03:04 +0000
+++ b/storage/perfschema/pfs.cc 2011-02-03 05:40:19 +0000
@@ -3546,7 +3546,7 @@ static void end_socket_wait_v1(PSI_socke
PFS_socket *socket= reinterpret_cast<PFS_socket *> (state->m_socket);
DBUG_ASSERT(socket != NULL);
- PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread);
+//TBD PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread);
PFS_single_stat *stat;
@@ -3589,7 +3589,7 @@ static void end_socket_wait_v1(PSI_socke
stat= NULL;
break;
}
-
+
register uint flags= state->m_flags;
if (flags & STATE_FLAG_TIMED)
=== modified file 'storage/perfschema/table_socket_instances.cc' (properties changed: -x to +x)
--- a/storage/perfschema/table_socket_instances.cc 2010-12-08 03:24:30 +0000
+++ b/storage/perfschema/table_socket_instances.cc 2011-02-03 05:40:19 +0000
@@ -41,28 +41,23 @@ static const TABLE_FIELD_TYPE field_type
{ NULL, 0}
},
{
- { C_STRING_WITH_LEN("SOCKET_ID") },
- { C_STRING_WITH_LEN("int(11)") },
- { NULL, 0}
- },
- {
- { C_STRING_WITH_LEN("IP") },
- { C_STRING_WITH_LEN("varchar(128)") },
+ { C_STRING_WITH_LEN("THREAD_ID") },
+ { C_STRING_WITH_LEN("int(10)") },
{ NULL, 0}
},
{
- { C_STRING_WITH_LEN("PORT") },
- { C_STRING_WITH_LEN("int(11)") },
+ { C_STRING_WITH_LEN("SOCKET_ID") },
+ { C_STRING_WITH_LEN("int(10)") },
{ NULL, 0}
},
{
- { C_STRING_WITH_LEN("BYTES_READ") },
- { C_STRING_WITH_LEN("bigint(20)") },
+ { C_STRING_WITH_LEN("IP") },
+ { C_STRING_WITH_LEN("varchar(64)") },
{ NULL, 0}
},
{
- { C_STRING_WITH_LEN("BYTES_WRITE") },
- { C_STRING_WITH_LEN("bigint(20)") },
+ { C_STRING_WITH_LEN("PORT") },
+ { C_STRING_WITH_LEN("int(10)") },
{ NULL, 0}
}
};
@@ -70,7 +65,7 @@ static const TABLE_FIELD_TYPE field_type
TABLE_FIELD_DEF
table_socket_instances::m_field_def=
-{ 7, field_types };
+{ 6, field_types };
PFS_engine_table_share
table_socket_instances::m_share=
@@ -156,12 +151,11 @@ void table_socket_instances::make_row(PF
m_row.m_event_name= safe_class->m_name;
m_row.m_event_name_length= safe_class->m_name_length;
m_row.m_identity= pfs->m_identity;
+ m_row.m_thread_id= pfs->m_thread_id;
m_row.m_fd= pfs->m_fd;
m_row.m_ip= pfs->m_ip;
m_row.m_ip_length= pfs->m_ip_length;
m_row.m_port= pfs->m_port;
- m_row.m_bytes_read= pfs->m_socket_stat.m_io_stat.m_read_bytes; //TBD
- m_row.m_bytes_write= pfs->m_socket_stat.m_io_stat.m_write_bytes;
if (pfs->m_lock.end_optimistic_lock(&lock))
m_row_exists= true;
@@ -192,21 +186,18 @@ int table_socket_instances::read_row_val
case 1: /* OBJECT_INSTANCE_BEGIN */
set_field_ulonglong(f, (intptr)m_row.m_identity);
break;
- case 2: /* SOCKET_ID */
+ case 2: /* THREAD_ID */
+ set_field_ulong(f, m_row.m_thread_id);
+ break;
+ case 3: /* SOCKET_ID */
set_field_ulong(f, m_row.m_fd);
break;
- case 3: /* IP */
+ case 4: /* IP */
set_field_varchar_utf8(f, m_row.m_ip, m_row.m_ip_length);
break;
- case 4: /* PORT */
+ case 5: /* PORT */
set_field_ulong(f, m_row.m_port);
break;
- case 5: /* BYTES_READ */
- set_field_ulonglong(f, m_row.m_bytes_read);
- break;
- case 6: /* BYTES_WRITE */
- set_field_ulonglong(f, m_row.m_bytes_write);
- break;
default:
DBUG_ASSERT(false);
}
=== modified file 'storage/perfschema/table_socket_instances.h' (properties changed: -x to +x)
--- a/storage/perfschema/table_socket_instances.h 2010-12-07 19:50:08 +0000
+++ b/storage/perfschema/table_socket_instances.h 2011-02-03 05:40:19 +0000
@@ -38,6 +38,8 @@ struct row_socket_instances
uint m_event_name_length;
/** Column OBJECT_INSTANCE_BEGIN */
const void *m_identity;
+ /** Column THREAD_ID */
+ uint m_thread_id;
/** Column SOCKET_ID */
uint m_fd;
/** Column IP. */
@@ -46,10 +48,6 @@ struct row_socket_instances
uint m_ip_length;
/** Column PORT */
uint m_port;
- /** Column BYTES_READ */
- ulonglong m_bytes_read; // TBD
- /** Column BYTES_WRITE */
- ulonglong m_bytes_write;
};
/** Table PERFORMANCE_SCHEMA.SOCKET_INSTANCES. */
Attachment: [text/bzr-bundle] bzr/chris.powers@oracle.com-20110203054019-pw8ylc67ke9la3sg.bundle
| Thread |
|---|
| • bzr commit into mysql-trunk-wl5379 branch (chris.powers:3222) WL#4896 | Christopher Powers | 3 Feb |