1
/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software Foundation,
14
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
16
#ifndef TABLE_ALL_INSTR_H
17
#define TABLE_ALL_INSTR_H
20
@file storage/perfschema/table_all_instr.h
21
Abstract tables for all instruments (declarations).
24
#include "pfs_instr_class.h"
25
#include "pfs_instr.h"
26
#include "pfs_engine_table.h"
27
#include "table_helper.h"
30
@addtogroup Performance_schema_tables
34
/** Position of a cursor on table_all_instr. */
35
struct pos_all_instr : public PFS_double_index,
36
public PFS_instrument_view_constants
39
: PFS_double_index(FIRST_VIEW, 0)
42
inline void reset(void)
44
m_index_1= FIRST_VIEW;
48
inline bool has_more_view(void)
49
{ return (m_index_1 <= LAST_VIEW); }
51
inline void next_view(void)
59
Abstract table, a union of all instrumentations instances.
60
This table is a union of:
61
- a view on all mutex instances,
62
- a view on all rwlock instances,
63
- a view on all cond instances,
64
- a view on all file instances,
65
- a view on all socket instances
67
class table_all_instr : public PFS_engine_table
70
virtual int rnd_next();
71
virtual int rnd_pos(const void *pos);
72
virtual void reset_position(void);
75
table_all_instr(const PFS_engine_table_share *share);
83
Build a row in the mutex instance view.
84
@param pfs the mutex instance
86
virtual void make_mutex_row(PFS_mutex *pfs)= 0;
88
Build a row in the rwlock instance view.
89
@param pfs the rwlock instance
91
virtual void make_rwlock_row(PFS_rwlock *pfs)= 0;
93
Build a row in the condition instance view.
94
@param pfs the condition instance
96
virtual void make_cond_row(PFS_cond *pfs)= 0;
98
Build a row in the file instance view.
99
@param pfs the file instance
101
virtual void make_file_row(PFS_file *pfs)= 0;
103
Build a row in the socket instance view.
104
@param pfs the socket instance
106
virtual void make_socket_row(PFS_socket *pfs)= 0;
108
/** Current position. */
110
/** Next position. */
111
pos_all_instr m_next_pos;