MySQL 8.2.0
Source Code Documentation
pfs_events_stages.h
Go to the documentation of this file.
1/* Copyright (c) 2010, 2023, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef PFS_EVENTS_STAGES_H
24#define PFS_EVENTS_STAGES_H
25
26/**
27 @file storage/perfschema/pfs_events_stages.h
28 Events waits data structures (declarations).
29*/
30
31#include <sys/types.h>
32#include <atomic>
33
37
38struct PFS_thread;
39struct PFS_account;
40struct PFS_user;
41struct PFS_host;
42
43/** A stage record. */
46};
47
50
54
59
60int init_events_stages_history_long(uint events_stages_history_long_sizing);
62
74
75#endif
char * user
Definition: mysqladmin.cc:64
const char * host
Definition: mysqladmin.cc:63
Events data structures (declarations).
ulong events_stages_history_long_size
Definition: pfs_events_stages.cc:47
void reset_events_stages_global()
Reset table EVENTS_STAGES_GLOBAL_BY_EVENT_NAME data.
Definition: pfs_events_stages.cc:236
void reset_events_stages_history()
Reset table EVENTS_STAGES_HISTORY data.
Definition: pfs_events_stages.cc:178
bool flag_events_stages_history_long
Consumer flag for table EVENTS_STAGES_HISTORY_LONG.
Definition: pfs_events_stages.cc:53
void reset_events_stages_by_thread()
Reset table EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME data.
Definition: pfs_events_stages.cc:202
PFS_cacheline_atomic_uint32 events_stages_history_long_index
Index in EVENTS_STAGES_HISTORY_LONG circular buffer.
Definition: pfs_events_stages.cc:58
bool events_stages_history_long_full
True if EVENTS_STAGES_HISTORY_LONG circular buffer is full.
Definition: pfs_events_stages.cc:56
void insert_events_stages_history_long(PFS_events_stages *stage)
Insert a stage record in table EVENTS_STAGES_HISTORY_LONG.
Definition: pfs_events_stages.cc:139
int init_events_stages_history_long(uint events_stages_history_long_sizing)
Initialize table EVENTS_STAGES_HISTORY_LONG.
Definition: pfs_events_stages.cc:66
PFS_events_stages * events_stages_history_long_array
EVENTS_STAGES_HISTORY_LONG circular buffer.
Definition: pfs_events_stages.cc:60
void aggregate_account_stages(PFS_account *account)
void aggregate_user_stages(PFS_user *user)
void reset_events_stages_history_long()
Reset table EVENTS_STAGES_HISTORY_LONG data.
Definition: pfs_events_stages.cc:183
void aggregate_host_stages(PFS_host *host)
void cleanup_events_stages_history_long()
Cleanup table EVENTS_STAGES_HISTORY_LONG.
Definition: pfs_events_stages.cc:89
bool flag_events_stages_history
Consumer flag for table EVENTS_STAGES_HISTORY.
Definition: pfs_events_stages.cc:51
void insert_events_stages_history(PFS_thread *thread, PFS_events_stages *stage)
Insert a stage record in table EVENTS_STAGES_HISTORY.
Definition: pfs_events_stages.cc:107
bool flag_events_stages_current
Consumer flag for table EVENTS_STAGES_CURRENT.
Definition: pfs_events_stages.cc:49
void reset_events_stages_current()
Reset table EVENTS_STAGES_CURRENT data.
Definition: pfs_events_stages.cc:162
void reset_events_stages_by_account()
Reset table EVENTS_STAGES_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME data.
Definition: pfs_events_stages.cc:213
void reset_events_stages_by_host()
Reset table EVENTS_STAGES_SUMMARY_BY_HOST_BY_EVENT_NAME data.
Definition: pfs_events_stages.cc:231
void reset_events_stages_by_user()
Reset table EVENTS_STAGES_SUMMARY_BY_USER_BY_EVENT_NAME data.
Definition: pfs_events_stages.cc:222
Miscellaneous global dependencies (declarations).
Performance schema instrumentation interface.
Per account statistics.
Definition: pfs_account.h:66
An atomic uint32 variable, guaranteed to be alone in a CPU cache line.
Definition: pfs_global.h:76
A stage record.
Definition: pfs_events_stages.h:44
PSI_stage_progress m_progress
Definition: pfs_events_stages.h:45
An event record.
Definition: pfs_events.h:37
Per host statistics.
Definition: pfs_host.h:63
Instrumented thread implementation.
Definition: pfs_instr.h:374
Per user statistics.
Definition: pfs_user.h:62
Interface for an instrumented stage progress.
Definition: psi_stage_bits.h:62