MySQL 9.0.0
Source Code Documentation
pfs_events_stages.h
Go to the documentation of this file.
1/* Copyright (c) 2010, 2024, 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 designed to work 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 either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef PFS_EVENTS_STAGES_H
25#define PFS_EVENTS_STAGES_H
26
27/**
28 @file storage/perfschema/pfs_events_stages.h
29 Events waits data structures (declarations).
30*/
31
32#include <sys/types.h>
33#include <atomic>
34
38
39struct PFS_thread;
40struct PFS_account;
41struct PFS_user;
42struct PFS_host;
43
44/** A stage record. */
47};
48
51
55
60
61int init_events_stages_history_long(uint events_stages_history_long_sizing);
63
75
76#endif
char * user
Definition: mysqladmin.cc:66
const char * host
Definition: mysqladmin.cc:65
Events data structures (declarations).
ulong events_stages_history_long_size
Definition: pfs_events_stages.cc:48
void reset_events_stages_global()
Reset table EVENTS_STAGES_GLOBAL_BY_EVENT_NAME data.
Definition: pfs_events_stages.cc:237
void reset_events_stages_history()
Reset table EVENTS_STAGES_HISTORY data.
Definition: pfs_events_stages.cc:179
bool flag_events_stages_history_long
Consumer flag for table EVENTS_STAGES_HISTORY_LONG.
Definition: pfs_events_stages.cc:54
void reset_events_stages_by_thread()
Reset table EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME data.
Definition: pfs_events_stages.cc:203
PFS_cacheline_atomic_uint32 events_stages_history_long_index
Index in EVENTS_STAGES_HISTORY_LONG circular buffer.
Definition: pfs_events_stages.cc:59
bool events_stages_history_long_full
True if EVENTS_STAGES_HISTORY_LONG circular buffer is full.
Definition: pfs_events_stages.cc:57
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:140
int init_events_stages_history_long(uint events_stages_history_long_sizing)
Initialize table EVENTS_STAGES_HISTORY_LONG.
Definition: pfs_events_stages.cc:67
PFS_events_stages * events_stages_history_long_array
EVENTS_STAGES_HISTORY_LONG circular buffer.
Definition: pfs_events_stages.cc:61
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:184
void aggregate_host_stages(PFS_host *host)
void cleanup_events_stages_history_long()
Cleanup table EVENTS_STAGES_HISTORY_LONG.
Definition: pfs_events_stages.cc:90
bool flag_events_stages_history
Consumer flag for table EVENTS_STAGES_HISTORY.
Definition: pfs_events_stages.cc:52
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:108
bool flag_events_stages_current
Consumer flag for table EVENTS_STAGES_CURRENT.
Definition: pfs_events_stages.cc:50
void reset_events_stages_current()
Reset table EVENTS_STAGES_CURRENT data.
Definition: pfs_events_stages.cc:163
void reset_events_stages_by_account()
Reset table EVENTS_STAGES_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME data.
Definition: pfs_events_stages.cc:214
void reset_events_stages_by_host()
Reset table EVENTS_STAGES_SUMMARY_BY_HOST_BY_EVENT_NAME data.
Definition: pfs_events_stages.cc:232
void reset_events_stages_by_user()
Reset table EVENTS_STAGES_SUMMARY_BY_USER_BY_EVENT_NAME data.
Definition: pfs_events_stages.cc:223
Miscellaneous global dependencies (declarations).
Performance schema instrumentation interface.
Per account statistics.
Definition: pfs_account.h:67
An atomic uint32 variable, guaranteed to be alone in a CPU cache line.
Definition: pfs_global.h:77
A stage record.
Definition: pfs_events_stages.h:45
PSI_stage_progress m_progress
Definition: pfs_events_stages.h:46
An event record.
Definition: pfs_events.h:38
Per host statistics.
Definition: pfs_host.h:64
Instrumented thread implementation.
Definition: pfs_instr.h:375
Per user statistics.
Definition: pfs_user.h:63
Interface for an instrumented stage progress.
Definition: psi_stage_bits.h:63