MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pfs.cc File Reference
#include "my_global.h"
#include "thr_lock.h"
#include "mysql/psi/psi.h"
#include "mysql/psi/mysql_thread.h"
#include "my_pthread.h"
#include "sql_const.h"
#include "pfs.h"
#include "pfs_instr_class.h"
#include "pfs_instr.h"
#include "pfs_host.h"
#include "pfs_user.h"
#include "pfs_account.h"
#include "pfs_global.h"
#include "pfs_column_values.h"
#include "pfs_timer.h"
#include "pfs_events_waits.h"
#include "pfs_events_stages.h"
#include "pfs_events_statements.h"
#include "pfs_setup_actor.h"
#include "pfs_setup_object.h"
#include "sql_error.h"
#include "sp_head.h"
#include "pfs_digest.h"
Include dependency graph for pfs.cc:

Go to the source code of this file.

Classes

struct  PFS_spawn_thread_arg

Macros

#define REGISTER_BODY_V1(KEY_T, PREFIX, REGISTER_FUNC)
#define INIT_BODY_V1(T, KEY, ID)
#define SET_STATEMENT_ATTR_BODY(LOCKER, ATTR, VALUE)
#define INC_STATEMENT_ATTR_BODY(LOCKER, ATTR, VALUE)

Functions

 pthread_key (PFS_thread *, THR_PFS)
void * pfs_spawn_thread (void *arg)

Variables

bool THR_PFS_initialized = false
PSI_v1 PFS_v1
C_MODE_END struct PSI_bootstrap PFS_bootstrap

Detailed Description

The performance schema implementation of all instruments.

Definition in file pfs.cc.

Macro Definition Documentation

#define INC_STATEMENT_ATTR_BODY (   LOCKER,
  ATTR,
  VALUE 
)
Value:
PSI_statement_locker_state *state; \
state= reinterpret_cast<PSI_statement_locker_state*> (LOCKER); \
if (unlikely(state == NULL)) \
return; \
if (state->m_discarded) \
return; \
state->ATTR+= VALUE; \
if (state->m_flags & STATE_FLAG_EVENT) \
{ \
pfs= reinterpret_cast<PFS_events_statements*> (state->m_statement); \
DBUG_ASSERT(pfs != NULL); \
pfs->ATTR+= VALUE; \
} \
return;

Definition at line 4643 of file pfs.cc.

#define INIT_BODY_V1 (   T,
  KEY,
  ID 
)
Value:
PFS_##T##_class *klass; \
PFS_##T *pfs; \
klass= find_##T##_class(KEY); \
if (unlikely(klass == NULL)) \
return NULL; \
if (! klass->m_enabled) \
return NULL; \
pfs= create_##T(klass, ID); \
return reinterpret_cast<PSI_##T *> (pfs)

Definition at line 1474 of file pfs.cc.

#define SET_STATEMENT_ATTR_BODY (   LOCKER,
  ATTR,
  VALUE 
)
Value:
PSI_statement_locker_state *state; \
state= reinterpret_cast<PSI_statement_locker_state*> (LOCKER); \
if (unlikely(state == NULL)) \
return; \
if (state->m_discarded) \
return; \
state->ATTR= VALUE; \
if (state->m_flags & STATE_FLAG_EVENT) \
{ \
pfs= reinterpret_cast<PFS_events_statements*> (state->m_statement); \
DBUG_ASSERT(pfs != NULL); \
pfs->ATTR= VALUE; \
} \
return;

Definition at line 4626 of file pfs.cc.

Variable Documentation

C_MODE_END struct PSI_bootstrap PFS_bootstrap
Initial value:
{
get_interface
}

Entry point to the performance schema implementation. This singleton is used to discover the performance schema services.

Definition at line 5254 of file pfs.cc.

PSI_v1 PFS_v1

Implementation of the instrumentation interface.

See Also
PSI_v1.

Definition at line 5140 of file pfs.cc.

bool THR_PFS_initialized = false

True when THR_PFS is initialized.

Definition at line 1114 of file pfs.cc.