Updates to slave catchup mode to use fake events
Addition of fake EPOLLOUT event mechanism New memlog feature for debugging purposes
This commit is contained in:
51
server/include/memlog.h
Normal file
51
server/include/memlog.h
Normal file
@ -0,0 +1,51 @@
|
||||
#ifndef _MEMLOG_H
|
||||
#define _MEMLOG_H
|
||||
/*
|
||||
* This file is distributed as part of MariaDB MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright MariaDB Ab 2014
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file memlog.h The memory logging mechanism
|
||||
*
|
||||
* @verbatim
|
||||
* Revision History
|
||||
*
|
||||
* Date Who Description
|
||||
* 26/09/14 Mark Riddoch Initial implementation
|
||||
*
|
||||
* @endverbatim
|
||||
*/
|
||||
#include <spinlock.h>
|
||||
|
||||
typedef enum { ML_INT, ML_LONG, ML_LONGLONG, ML_STRING } MEMLOGTYPE;
|
||||
|
||||
typedef struct memlog {
|
||||
char *name;
|
||||
SPINLOCK lock;
|
||||
void *values;
|
||||
int offset;
|
||||
int size;
|
||||
MEMLOGTYPE type;
|
||||
struct memlog *next;
|
||||
} MEMLOG;
|
||||
|
||||
|
||||
extern MEMLOG *memlog_create(char *, MEMLOGTYPE, int);
|
||||
extern void memlog_destroy(MEMLOG *);
|
||||
extern void memlog_log(MEMLOG *, void *);
|
||||
extern void memlog_flush_all();
|
||||
#endif
|
||||
Reference in New Issue
Block a user