MySQL 26.7.0
Source Code Documentation
scheduler_psi.h
Go to the documentation of this file.
1// Copyright (c) 2026, 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 MYSQL_SCHEDULER_SCHEDULER_PSI_H
25#define MYSQL_SCHEDULER_SCHEDULER_PSI_H
26
31
32namespace mysql::scheduler {
33
34/// @brief Scheduler instrumentation parameters, packed into this
35/// structure to simplify construction of a Scheduler class instance and
36/// prevent mistakes when passing a lot of integer parameters into the
37/// class constructor
39 /// mutex: Key for mutex associated with scheduler condition variable
41 /// mutex: Key for mutex associated with cv used to end execution
43 /// cv: Key for cv used by scheduler thread for all notifications
45 /// cv: Key for cv ending execution
47 /// mutex: Key for mutex protecting enqueued tasks
49 /// mutex: Key for mutex protecting phase queues
51 /// thread: Scheduler thread key
53 /// stage: stopping scheduler
55 /// stage: waiting for work
57 /// stage: scheduler thread stopped
59 /// stage: check dependencies
61 /// stage: check stage queues
63 /// stage: enqueue ready tasks
65 /// stage: waiting for clock (cannot handle more dependencies)
67 /// stage: synchronizing scheduler - reached max task limit
69 /// memory: memory instrumentation object
71};
72
73} // namespace mysql::scheduler
74
75#endif // MYSQL_SCHEDULER_SCHEDULER_PSI_H
Polymorphism-free memory resource class with custom allocator and deallocator functions.
Definition: memory_resource.h:88
Class that wraps resources in a polymorphic manner.
PSI_cond_key Cv_key
Definition: condition_variable_srv.h:39
PSI_stage_key Stage_key
Definition: stage_srv.h:35
PSI_mutex_key Mutex_key
Definition: mutex_srv.h:41
PSI_thread_key Thread_key
Definition: thread_srv.h:43
Definition: base_dependency_tracker.h:41
Scheduler instrumentation parameters, packed into this structure to simplify construction of a Schedu...
Definition: scheduler_psi.h:38
concurrency::Stage_key key_stage_stopping
stage: stopping scheduler
Definition: scheduler_psi.h:54
concurrency::Cv_key key_cv_sched
cv: Key for cv used by scheduler thread for all notifications
Definition: scheduler_psi.h:44
concurrency::Stage_key key_stage_enqueueing_ready_tasks
stage: enqueue ready tasks
Definition: scheduler_psi.h:64
concurrency::Mutex_key key_mt_phases
mutex: Key for mutex protecting phase queues
Definition: scheduler_psi.h:50
concurrency::Mutex_key key_mt_tasks
mutex: Key for mutex protecting enqueued tasks
Definition: scheduler_psi.h:48
concurrency::Thread_key key_th_scheduler
thread: Scheduler thread key
Definition: scheduler_psi.h:52
concurrency::Stage_key key_stage_stopped
stage: scheduler thread stopped
Definition: scheduler_psi.h:58
concurrency::Stage_key key_stage_check_stage_queues
stage: check stage queues
Definition: scheduler_psi.h:62
concurrency::Cv_key key_cv_end
cv: Key for cv ending execution
Definition: scheduler_psi.h:46
concurrency::Stage_key key_stage_wait_clock_queue
stage: waiting for clock (cannot handle more dependencies)
Definition: scheduler_psi.h:66
concurrency::Mutex_key key_mt_sched
mutex: Key for mutex associated with scheduler condition variable
Definition: scheduler_psi.h:40
concurrency::Stage_key key_stage_waiting
stage: waiting for work
Definition: scheduler_psi.h:56
concurrency::Mutex_key key_mt_end
mutex: Key for mutex associated with cv used to end execution
Definition: scheduler_psi.h:42
allocators::Memory_resource memory_resource
memory: memory instrumentation object
Definition: scheduler_psi.h:70
concurrency::Stage_key key_stage_check_dependencies
stage: check dependencies
Definition: scheduler_psi.h:60
concurrency::Stage_key key_reached_max_task_limit
stage: synchronizing scheduler - reached max task limit
Definition: scheduler_psi.h:68