Data Structures | Functions | Variables

RecProcess.cc File Reference

Record process definitions. More...

#include "libts.h"
#include "I_Tasks.h"
#include "P_EventSystem.h"
#include "P_RecCore.h"
#include "P_RecProcess.h"
#include "P_RecMessage.h"
#include "P_RecUtils.h"
#include "P_RecFile.h"
#include "mgmtapi.h"
#include "ProcessManager.h"
Include dependency graph for RecProcess.cc:

Go to the source code of this file.

Data Structures

struct  raw_stat_sync_cont
struct  config_update_cont
struct  sync_cont

Functions

bool i_am_the_record_owner (RecT rec_type)
void RecProcess_set_raw_stat_sync_interval_ms (int ms)
void RecProcess_set_config_update_interval_ms (int ms)
void RecProcess_set_remote_sync_interval_ms (int ms)
static int raw_stat_get_total (RecRawStatBlock *rsb, int id, RecRawStat *total)
static int raw_stat_sync_to_global (RecRawStatBlock *rsb, int id)
static int raw_stat_clear (RecRawStatBlock *rsb, int id)
static int raw_stat_clear_sum (RecRawStatBlock *rsb, int id)
static int raw_stat_clear_count (RecRawStatBlock *rsb, int id)
static int recv_message_cb__process (RecMessage *msg, RecMessageT msg_type, void *cookie)
int RecProcessInit (RecModeT mode_type, Diags *_diags)
void RecMessageInit ()
int RecProcessInitMessage (RecModeT mode_type)
int RecProcessStart (void)
RecRawStatBlockRecAllocateRawStatBlock (int num_stats)
int _RecRegisterRawStat (RecRawStatBlock *rsb, RecT rec_type, const char *name, RecDataT data_type, RecPersistT persist_type, int id, RecRawStatSyncCb sync_cb)
int RecRawStatSyncSum (const char *name, RecDataT data_type, RecData *data, RecRawStatBlock *rsb, int id)
int RecRawStatSyncCount (const char *name, RecDataT data_type, RecData *data, RecRawStatBlock *rsb, int id)
int RecRawStatSyncAvg (const char *name, RecDataT data_type, RecData *data, RecRawStatBlock *rsb, int id)
int RecRawStatSyncHrTimeAvg (const char *name, RecDataT data_type, RecData *data, RecRawStatBlock *rsb, int id)
int RecRawStatSyncIntMsecsToFloatSeconds (const char *name, RecDataT data_type, RecData *data, RecRawStatBlock *rsb, int id)
int RecRawStatSyncMHrTimeAvg (const char *name, RecDataT data_type, RecData *data, RecRawStatBlock *rsb, int id)
int RecIncrRawStatBlock (RecRawStatBlock *, EThread *, RecRawStat *)
int RecSetRawStatSum (RecRawStatBlock *rsb, int id, int64_t data)
int RecSetRawStatCount (RecRawStatBlock *rsb, int id, int64_t data)
int RecSetRawStatBlock (RecRawStatBlock *, RecRawStat *)
int RecGetRawStatSum (RecRawStatBlock *rsb, int id, int64_t *data)
int RecGetRawStatCount (RecRawStatBlock *rsb, int id, int64_t *data)
int RecIncrGlobalRawStat (RecRawStatBlock *rsb, int id, int64_t incr)
int RecIncrGlobalRawStatSum (RecRawStatBlock *rsb, int id, int64_t incr)
int RecIncrGlobalRawStatCount (RecRawStatBlock *rsb, int id, int64_t incr)
int RecSetGlobalRawStatSum (RecRawStatBlock *rsb, int id, int64_t data)
int RecSetGlobalRawStatCount (RecRawStatBlock *rsb, int id, int64_t data)
int RecGetGlobalRawStatSum (RecRawStatBlock *rsb, int id, int64_t *data)
int RecGetGlobalRawStatCount (RecRawStatBlock *rsb, int id, int64_t *data)
RecRawStatRecGetGlobalRawStatPtr (RecRawStatBlock *rsb, int id)
int64_t * RecGetGlobalRawStatSumPtr (RecRawStatBlock *rsb, int id)
int64_t * RecGetGlobalRawStatCountPtr (RecRawStatBlock *rsb, int id)
int RecRegisterRawStatSyncCb (const char *name, RecRawStatSyncCb sync_cb, RecRawStatBlock *rsb, int id)
int RecExecRawStatSyncCbs ()
void RecSignalManager (int id, const char *msg, size_t msgsize)
int RecRegisterManagerCb (int _signal, RecManagerCb _fn, void *_data)
int RecMessageSend (RecMessage *msg)

Variables

static bool message_initialized_p = false
static bool g_started = false
static EventNotify g_force_req_notify
static int g_rec_raw_stat_sync_interval_ms = REC_RAW_STAT_SYNC_INTERVAL_MS
static int g_rec_config_update_interval_ms = REC_CONFIG_UPDATE_INTERVAL_MS
static int g_rec_remote_sync_interval_ms = REC_REMOTE_SYNC_INTERVAL_MS
static Eventraw_stat_sync_cont_event
static Eventconfig_update_cont_event
static Eventsync_cont_event

Detailed Description

Record process definitions.

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file RecProcess.cc.


Function Documentation

int _RecRegisterRawStat ( RecRawStatBlock rsb,
RecT  rec_type,
const char *  name,
RecDataT  data_type,
RecPersistT  persist_type,
int  id,
RecRawStatSyncCb  sync_cb 
)
bool i_am_the_record_owner ( RecT  rec_type  ) 
static int raw_stat_clear ( RecRawStatBlock rsb,
int  id 
) [static]
static int raw_stat_clear_count ( RecRawStatBlock rsb,
int  id 
) [static]
static int raw_stat_clear_sum ( RecRawStatBlock rsb,
int  id 
) [static]
static int raw_stat_get_total ( RecRawStatBlock rsb,
int  id,
RecRawStat total 
) [static]
static int raw_stat_sync_to_global ( RecRawStatBlock rsb,
int  id 
) [static]
RecRawStatBlock* RecAllocateRawStatBlock ( int  num_stats  ) 
int RecExecRawStatSyncCbs (  ) 
int RecGetGlobalRawStatCount ( RecRawStatBlock rsb,
int  id,
int64_t *  data 
)

Definition at line 811 of file RecProcess.cc.

References RecRawStat::count, and RecRawStatBlock::global.

Referenced by aio_stats_cb().

int64_t* RecGetGlobalRawStatCountPtr ( RecRawStatBlock rsb,
int  id 
)

Definition at line 834 of file RecProcess.cc.

References RecRawStat::count, and RecRawStatBlock::global.

RecRawStat* RecGetGlobalRawStatPtr ( RecRawStatBlock rsb,
int  id 
)

Definition at line 822 of file RecProcess.cc.

References RecRawStatBlock::global.

Referenced by dumpICPstatEntry().

int RecGetGlobalRawStatSum ( RecRawStatBlock rsb,
int  id,
int64_t *  data 
)

Definition at line 804 of file RecProcess.cc.

References RecRawStatBlock::global, and RecRawStat::sum.

Referenced by aio_stats_cb(), cache_stats_bytes_used_cb(), and TSStatIntGet().

int64_t* RecGetGlobalRawStatSumPtr ( RecRawStatBlock rsb,
int  id 
)

Definition at line 828 of file RecProcess.cc.

References RecRawStatBlock::global, and RecRawStat::sum.

int RecGetRawStatCount ( RecRawStatBlock rsb,
int  id,
int64_t *  data 
)

Definition at line 746 of file RecProcess.cc.

References RecRawStat::count, and raw_stat_get_total().

int RecGetRawStatSum ( RecRawStatBlock rsb,
int  id,
int64_t *  data 
)

Definition at line 736 of file RecProcess.cc.

References raw_stat_get_total(), and RecRawStat::sum.

int RecIncrGlobalRawStat ( RecRawStatBlock rsb,
int  id,
int64_t  incr 
)
int RecIncrGlobalRawStatCount ( RecRawStatBlock rsb,
int  id,
int64_t  incr 
)

Definition at line 775 of file RecProcess.cc.

References RecRawStat::count, and RecRawStatBlock::global.

int RecIncrGlobalRawStatSum ( RecRawStatBlock rsb,
int  id,
int64_t  incr 
)

Definition at line 768 of file RecProcess.cc.

References RecRawStatBlock::global, and RecRawStat::sum.

int RecIncrRawStatBlock ( RecRawStatBlock ,
EThread ,
RecRawStat  
)

Definition at line 698 of file RecProcess.cc.

void RecMessageInit (  ) 
int RecMessageSend ( RecMessage msg  ) 
void RecProcess_set_config_update_interval_ms ( int  ms  ) 
void RecProcess_set_raw_stat_sync_interval_ms ( int  ms  ) 
void RecProcess_set_remote_sync_interval_ms ( int  ms  ) 
int RecProcessInit ( RecModeT  mode_type,
Diags _diags 
)

Definition at line 409 of file RecProcess.cc.

References g_mode_type, REC_ERR_FAIL, and RecCoreInit().

Referenced by initialize_process_manager().

int RecProcessInitMessage ( RecModeT  mode_type  ) 
int RecProcessStart ( void   ) 
int RecRawStatSyncAvg ( const char *  name,
RecDataT  data_type,
RecData data,
RecRawStatBlock rsb,
int  id 
)
int RecRawStatSyncCount ( const char *  name,
RecDataT  data_type,
RecData data,
RecRawStatBlock rsb,
int  id 
)
int RecRawStatSyncHrTimeAvg ( const char *  name,
RecDataT  data_type,
RecData data,
RecRawStatBlock rsb,
int  id 
)
int RecRawStatSyncIntMsecsToFloatSeconds ( const char *  name,
RecDataT  data_type,
RecData data,
RecRawStatBlock rsb,
int  id 
)
int RecRawStatSyncMHrTimeAvg ( const char *  name,
RecDataT  data_type,
RecData data,
RecRawStatBlock rsb,
int  id 
)
int RecRawStatSyncSum ( const char *  name,
RecDataT  data_type,
RecData data,
RecRawStatBlock rsb,
int  id 
)
int RecRegisterManagerCb ( int  _signal,
RecManagerCb  _fn,
void *  _data 
)

Definition at line 909 of file RecProcess.cc.

Referenced by LogConfig::register_mgmt_callbacks().

int RecRegisterRawStatSyncCb ( const char *  name,
RecRawStatSyncCb  sync_cb,
RecRawStatBlock rsb,
int  id 
)
int RecSetGlobalRawStatCount ( RecRawStatBlock rsb,
int  id,
int64_t  data 
)

Definition at line 793 of file RecProcess.cc.

References RecRawStat::count, and RecRawStatBlock::global.

Referenced by aio_stats_cb().

int RecSetGlobalRawStatSum ( RecRawStatBlock rsb,
int  id,
int64_t  data 
)

Definition at line 786 of file RecProcess.cc.

References RecRawStatBlock::global, and RecRawStat::sum.

Referenced by aio_stats_cb(), cache_stats_bytes_used_cb(), and TSStatIntSet().

int RecSetRawStatBlock ( RecRawStatBlock ,
RecRawStat  
)

Definition at line 725 of file RecProcess.cc.

int RecSetRawStatCount ( RecRawStatBlock rsb,
int  id,
int64_t  data 
)
int RecSetRawStatSum ( RecRawStatBlock rsb,
int  id,
int64_t  data 
)
void RecSignalManager ( int  id,
const char *  msg,
size_t  msgsize 
)
static int recv_message_cb__process ( RecMessage msg,
RecMessageT  msg_type,
void *  cookie 
) [static]

Variable Documentation

Definition at line 46 of file RecProcess.cc.

Definition at line 41 of file RecProcess.cc.

int g_rec_config_update_interval_ms = REC_CONFIG_UPDATE_INTERVAL_MS [static]

Definition at line 43 of file RecProcess.cc.

Referenced by RecProcess_set_config_update_interval_ms(), and RecProcessStart().

int g_rec_raw_stat_sync_interval_ms = REC_RAW_STAT_SYNC_INTERVAL_MS [static]

Definition at line 42 of file RecProcess.cc.

Referenced by RecProcess_set_raw_stat_sync_interval_ms(), and RecProcessStart().

int g_rec_remote_sync_interval_ms = REC_REMOTE_SYNC_INTERVAL_MS [static]

Definition at line 44 of file RecProcess.cc.

Referenced by RecProcess_set_remote_sync_interval_ms(), and RecProcessStart().

bool g_started = false [static]

Definition at line 40 of file RecProcess.cc.

Referenced by RecProcessStart().

bool message_initialized_p = false [static]

Definition at line 39 of file RecProcess.cc.

Referenced by RecMessageInit(), and RecMessageSend().

Definition at line 45 of file RecProcess.cc.

Definition at line 47 of file RecProcess.cc.