1 /* Copyright (c) 2010, 2021, 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_H 24 #define PFS_EVENTS_H 25 26 /** 27 @file storage/perfschema/pfs_events.h 28 Events data structures (declarations). 29 */ 30 31 #include "pfs_column_types.h" 32 33 struct PFS_instr_class; 34 35 /** An event record. */ 36 struct PFS_events 37 { 38 /** THREAD_ID. */ 39 ulonglong m_thread_internal_id; 40 /** EVENT_ID. */ 41 ulonglong m_event_id; 42 /** END_EVENT_ID. */ 43 ulonglong m_end_event_id; 44 /** (EVENT_TYPE) */ 45 enum_event_type m_event_type; 46 /** NESTING_EVENT_ID. */ 47 ulonglong m_nesting_event_id; 48 /** NESTING_EVENT_TYPE */ 49 enum_event_type m_nesting_event_type; 50 /** NESTING_EVENT_LEVEL */ 51 uint m_nesting_event_level; 52 /** Instrument metadata. */ 53 PFS_instr_class *m_class; 54 /** 55 Timer start. 56 This member is populated only if m_class->m_timed is true. 57 */ 58 ulonglong m_timer_start; 59 /** 60 Timer end. 61 This member is populated only if m_class->m_timed is true. 62 */ 63 ulonglong m_timer_end; 64 /** Location of the instrumentation in the source code (file name). */ 65 const char *m_source_file; 66 /** Location of the instrumentation in the source code (line number). */ 67 uint m_source_line; 68 }; 69 70 #endif 71 72