32#ifdef HAVE_SYS_SOCKET_H
33#include <sys/socket.h>
54#if defined(HAVE_POSIX_MEMALIGN) || defined(HAVE_MEMALIGN) || \
55 defined(HAVE_ALIGNED_MALLOC)
56#define PFS_ALIGNMENT 64
57#define PFS_ALIGNED alignas(PFS_ALIGNMENT)
67#ifdef CPU_LEVEL1_DCACHE_LINESIZE
68#define PFS_CACHE_LINE_SIZE CPU_LEVEL1_DCACHE_LINESIZE
70#define PFS_CACHE_LINE_SIZE 128
135#define PFS_MALLOC_ARRAY(k, n, s, T, f) \
136 reinterpret_cast<T *>(pfs_malloc_array((k), (n), (s), (f)))
152#define PFS_FREE_ARRAY(k, n, s, p) pfs_free_array((k), (n), (s), (p))
155bool is_overflow(
size_t product,
size_t n1,
size_t n2);
158 const struct sockaddr_storage *src_addr,
165#define PFS_NEW(CLASS) (new (*THR_MALLOC) CLASS())
168 MY_ATTRIBUTE((format(printf, 1, 2)));
175#define SANITIZE_ARRAY_BODY(T, ARRAY, MAX, UNSAFE) \
177 if ((&ARRAY[0] <= UNSAFE) && (UNSAFE < &ARRAY[MAX])) { \
178 offset = ((intptr)UNSAFE - (intptr)ARRAY) % sizeof(T); \
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:251
static int flags[50]
Definition: hp_test1.cc:40
Header for compiler-dependent features.
Some integer typedefs for easier portability.
int myf
Definition: my_inttypes.h:94
const char * host
Definition: mysqladmin.cc:65
size_t size(const char *const c)
Definition: base64.h:46
uint pfs_get_socket_address(char *host, uint host_len, uint *port, const struct sockaddr_storage *src_addr, socklen_t src_len)
Convert raw ip address into readable format.
Definition: pfs_global.cc:210
void * pfs_malloc_array(PFS_builtin_memory_class *klass, size_t n, size_t size, myf flags)
Allocate an array of structures with overflow check.
Definition: pfs_global.cc:143
void pfs_print_error(const char *format,...)
Definition: pfs_global.cc:193
bool pfs_initialized
True when the performance schema is initialized.
Definition: pfs_global.cc:54
void * pfs_malloc(PFS_builtin_memory_class *klass, size_t size, myf flags)
Memory allocation for the performance schema.
Definition: pfs_global.cc:61
void pfs_free(PFS_builtin_memory_class *klass, size_t size, void *ptr)
Free memory allocated with.
Definition: pfs_global.cc:108
void pfs_free_array(PFS_builtin_memory_class *klass, size_t n, size_t size, void *ptr)
Free memory allocated with.
Definition: pfs_global.cc:171
bool is_overflow(size_t product, size_t n1, size_t n2)
Detect multiplication overflow.
Definition: pfs_global.cc:189
#define PFS_CACHE_LINE_SIZE
Definition: pfs_global.h:68
required uint64 port
Definition: replication_asynchronous_connection_failover.proto:33
Definition: pfs_builtin_memory.h:39
An atomic<T> variable, guaranteed to be alone in a CPU cache line.
Definition: pfs_global.h:111
char m_full_cache_line[PFS_CACHE_LINE_SIZE - sizeof(std::atomic< T >)]
Definition: pfs_global.h:113
PFS_cacheline_atomic_ptr()
Definition: pfs_global.h:115
std::atomic< T > m_ptr
Definition: pfs_global.h:112
An atomic size_t variable, guaranteed to be alone in a CPU cache line.
Definition: pfs_global.h:99
std::atomic< size_t > m_size_t
Definition: pfs_global.h:100
PFS_cacheline_atomic_size_t()
Definition: pfs_global.h:103
char m_full_cache_line[PFS_CACHE_LINE_SIZE - sizeof(std::atomic< size_t >)]
Definition: pfs_global.h:101
An atomic uint32 variable, guaranteed to be alone in a CPU cache line.
Definition: pfs_global.h:77
PFS_cacheline_atomic_uint32()
Definition: pfs_global.h:81
char m_full_cache_line[PFS_CACHE_LINE_SIZE - sizeof(std::atomic< uint32 >)]
Definition: pfs_global.h:79
std::atomic< uint32 > m_u32
Definition: pfs_global.h:78
An atomic uint64 variable, guaranteed to be alone in a CPU cache line.
Definition: pfs_global.h:88
char m_full_cache_line[PFS_CACHE_LINE_SIZE - sizeof(std::atomic< uint64 >)]
Definition: pfs_global.h:90
std::atomic< uint64 > m_u64
Definition: pfs_global.h:89
PFS_cacheline_atomic_uint64()
Definition: pfs_global.h:92
int n
Definition: xcom_base.cc:509