16 #include "my_global.h"
37 bool with_accounts,
bool with_threads,
40 DBUG_ASSERT(visitor != NULL);
48 for ( ; pfs < pfs_last; pfs++)
59 for ( ; pfs < pfs_last; pfs++)
70 for ( ; pfs < pfs_last; pfs++)
81 for ( ; pfs < pfs_last; pfs++)
90 bool with_accounts,
bool with_threads,
93 DBUG_ASSERT(visitor != NULL);
101 for ( ; pfs < pfs_last; pfs++)
114 for ( ; pfs < pfs_last; pfs++)
118 PFS_account *safe_account= sanitize_account(pfs->m_account);
119 if ((safe_account != NULL) && (safe_account->m_host == host))
127 else if (pfs->m_host == host)
141 bool with_accounts,
bool with_threads,
144 DBUG_ASSERT(visitor != NULL);
152 for ( ; pfs < pfs_last; pfs++)
165 for ( ; pfs < pfs_last; pfs++)
169 PFS_account *safe_account= sanitize_account(pfs->m_account);
170 if ((safe_account != NULL) && (safe_account->m_user == user))
178 else if (pfs->m_user == user)
195 DBUG_ASSERT(visitor != NULL);
203 for ( ; pfs < pfs_last; pfs++)
215 visit_all_mutex(visitor);
216 visit_all_rwlock(visitor);
217 visit_all_cond(visitor);
218 visit_all_file(visitor);
223 visit_all_mutex_classes(visitor);
224 visit_all_mutex_instances(visitor);
231 for ( ; pfs < pfs_last; pfs++)
244 for ( ; pfs < pfs_last; pfs++)
255 visit_all_rwlock_classes(visitor);
256 visit_all_rwlock_instances(visitor);
263 for ( ; pfs < pfs_last; pfs++)
276 for ( ; pfs < pfs_last; pfs++)
287 visit_all_cond_classes(visitor);
288 visit_all_cond_instances(visitor);
295 for ( ; pfs < pfs_last; pfs++)
308 for ( ; pfs < pfs_last; pfs++)
319 visit_all_file_classes(visitor);
320 visit_all_file_instances(visitor);
327 for ( ; pfs < pfs_last; pfs++)
340 for ( ; pfs < pfs_last; pfs++)
354 DBUG_ASSERT(visitor != NULL);
358 if (klass->is_singleton())
361 if (likely(pfs != NULL))
373 for ( ; pfs < pfs_last; pfs++)
386 DBUG_ASSERT(visitor != NULL);
390 if (klass->is_singleton())
393 if (likely(pfs != NULL))
405 for ( ; pfs < pfs_last; pfs++)
418 DBUG_ASSERT(visitor != NULL);
422 if (klass->is_singleton())
425 if (likely(pfs != NULL))
437 for ( ; pfs < pfs_last; pfs++)
450 DBUG_ASSERT(visitor != NULL);
454 if (klass->is_singleton())
457 if (likely(pfs != NULL))
469 for ( ; pfs < pfs_last; pfs++)
484 DBUG_ASSERT(visitor != NULL);
488 if (klass->is_singleton())
491 if (likely(pfs != NULL))
503 for ( ; pfs < pfs_last; pfs++)
520 DBUG_ASSERT(visitor != NULL);
521 DBUG_ASSERT(thread != NULL);
526 if (klass->is_singleton())
529 if (likely(pfs != NULL))
541 for ( ; pfs < pfs_last; pfs++)
543 if (unlikely((pfs->
m_class == klass) &&
559 DBUG_ASSERT(visitor != NULL);
560 DBUG_ASSERT(klass != NULL);
564 case PFS_CLASS_SOCKET:
568 thread, visit_class);
584 DBUG_ASSERT(visitor != NULL);
591 for ( ; share < share_last; share++)
602 for ( ; table < table_last; table++)
614 DBUG_ASSERT(visitor != NULL);
621 for ( ; table < table_last; table++)
634 DBUG_ASSERT(visitor != NULL);
641 for ( ; table < table_last; table++)
658 PFS_connection_wait_visitor::~PFS_connection_wait_visitor()
696 PFS_connection_all_wait_visitor::~PFS_connection_all_wait_visitor()
709 for ( ; stat < stat_last; stat++)
717 visit_connection_slice(pfs);
722 visit_connection_slice(pfs);
727 visit_connection_slice(pfs);
732 visit_connection_slice(pfs);
740 PFS_connection_stage_visitor::~PFS_connection_stage_visitor()
745 m_stat.aggregate(& global_instr_class_stages_array[
m_index]);
774 PFS_connection_statement_visitor::~PFS_connection_statement_visitor()
779 m_stat.aggregate(& global_instr_class_statements_array[
m_index]);
807 PFS_connection_all_statement_visitor::~PFS_connection_all_statement_visitor()
814 for ( ; stat < stat_last; stat++)
824 for ( ; stat < stat_last; stat++)
832 visit_connection_slice(pfs);
837 visit_connection_slice(pfs);
842 visit_connection_slice(pfs);
847 visit_connection_slice(pfs);
853 PFS_connection_stat_visitor::~PFS_connection_stat_visitor()
861 m_stat.aggregate_disconnected(pfs->m_disconnected_count);
866 m_stat.aggregate_disconnected(pfs->m_disconnected_count);
871 m_stat.aggregate_disconnected(pfs->m_disconnected_count);
876 m_stat.aggregate_active(1);
879 PFS_instance_wait_visitor::PFS_instance_wait_visitor()
883 PFS_instance_wait_visitor::~PFS_instance_wait_visitor()
947 PFS_object_wait_visitor::~PFS_object_wait_visitor()
958 uint safe_key_count= sanitize_index_count(pfs->
m_key_count);
965 if (table_share != NULL)
967 uint safe_key_count= sanitize_index_count(table_share->
m_key_count);
972 PFS_table_io_wait_visitor::PFS_table_io_wait_visitor()
975 PFS_table_io_wait_visitor::~PFS_table_io_wait_visitor()
986 uint safe_key_count= sanitize_index_count(pfs->
m_key_count);
990 for (index= 0; index < safe_key_count; index++)
1003 if (likely(safe_share != NULL))
1006 uint safe_key_count= sanitize_index_count(safe_share->
m_key_count);
1010 for (index= 0; index < safe_key_count; index++)
1025 PFS_table_io_stat_visitor::~PFS_table_io_stat_visitor()
1030 uint safe_key_count= sanitize_index_count(pfs->
m_key_count);
1034 for (index= 0; index < safe_key_count; index++)
1045 if (likely(safe_share != NULL))
1047 uint safe_key_count= sanitize_index_count(safe_share->
m_key_count);
1051 for (index= 0; index < safe_key_count; index++)
1064 PFS_index_io_stat_visitor::~PFS_index_io_stat_visitor()
1082 PFS_table_lock_wait_visitor::~PFS_table_lock_wait_visitor()
1105 PFS_table_lock_stat_visitor::~PFS_table_lock_stat_visitor()
1118 PFS_instance_socket_io_stat_visitor::PFS_instance_socket_io_stat_visitor()
1121 PFS_instance_socket_io_stat_visitor::~PFS_instance_socket_io_stat_visitor()
1137 PFS_instance_file_io_stat_visitor::PFS_instance_file_io_stat_visitor()
1140 PFS_instance_file_io_stat_visitor::~PFS_instance_file_io_stat_visitor()