Motr  M0
dump.c File Reference
#include <dlfcn.h>
#include <err.h>
#include <sys/stat.h>
#include <stdio.h>
#include <sysexits.h>
#include <execinfo.h>
#include <signal.h>
#include <bfd.h>
#include <stdlib.h>
#include <unistd.h>
#include "lib/memory.h"
#include "lib/assert.h"
#include "lib/errno.h"
#include "lib/tlist.h"
#include "lib/varr.h"
#include "lib/getopts.h"
#include "lib/uuid.h"
#include "rpc/item.h"
#include "rpc/rpc_opcodes_xc.h"
#include "fop/fop.h"
#include "stob/domain.h"
#include "stob/stob.h"
#include "stob/addb2.h"
#include "stob/addb2_xc.h"
#include "motr/init.h"
#include "module/instance.h"
#include "rpc/rpc_opcodes.h"
#include "rpc/bulk_xc.h"
#include "rpc/addb2.h"
#include "rpc/addb2_xc.h"
#include "be/addb2.h"
#include "be/addb2_xc.h"
#include "motr/client.h"
#include "motr/client_internal_xc.h"
#include "motr/addb_xc.h"
#include "motr/client_xc.h"
#include "ioservice/io_addb2.h"
#include "ioservice/io_addb2_xc.h"
#include "dix/dix_addb_xc.h"
#include "dix/req_xc.h"
#include "cas/cas_addb2_xc.h"
#include "addb2/identifier.h"
#include "addb2/consumer.h"
#include "addb2/storage.h"
#include "addb2/counter.h"
#include "addb2/histogram.h"
#include "dtm0/addb2.h"
#include "cob/cob_xc.h"
#include "net/addb2.h"
#include "cas/cas_addb2.h"
#include "m0t1fs/linux_kernel/m0t1fs_addb2.h"
#include "sns/cm/cm.h"
#include "motr/addb.h"
#include "dix/dix_addb.h"
#include "xcode/xcode.h"
#include "scripts/systemtap/kem/kem_id.h"
#include "addb2/addb2_internal.h"
#include "lib/trace.h"
#include "lib/thread.h"

Go to the source code of this file.

Data Structures

struct  fom
 
struct  m0_addb2__context
 
struct  plugin
 

Macros

#define DOM   "./_addb2-dump_%d"
 
#define COUNTER   &counter, &skip, &skip, &skip, &skip, &skip, &skip
 
#define FID   &fid, &skip
 
#define TIMED   &duration, &sym
 
#define HIST
 
#define SKIP2   &skip, &skip
 
#define U64   "%16"PRIx64
 
#define BEND   (buf + strlen(buf))
 
#define BEND   (buf + strlen(buf))
 

Enumerations

enum  { BUF_SIZE = 4096, PLUGINS_MAX = 64 }
 

Functions

static void id_init (void)
 
static void id_fini (void)
 
static void id_set (struct m0_addb2__id_intrp *intrp)
 
static void id_set_nr (struct m0_addb2__id_intrp *intrp, int nr)
 
static struct m0_addb2__id_intrpid_get (uint64_t id)
 
static void rec_dump (struct m0_addb2__context *ctx, const struct m0_addb2_record *rec)
 
static void val_dump (struct m0_addb2__context *ctx, const char *prefix, const struct m0_addb2_value *val, int indent, bool cr)
 
static void context_fill (struct m0_addb2__context *ctx, const struct m0_addb2_value *val)
 
static void file_dump (struct m0_stob_domain *dom, const char *fname, const uint64_t start_time, const uint64_t stop_time)
 
static int plugin_load (struct plugin *plugin)
 
static void plugin_unload (struct plugin *plugin)
 
static int plugins_load (void)
 
static void plugins_unload (void)
 
static void libbfd_init (const char *libpath)
 
static void libbfd_fini (void)
 
static void libbfd_resolve (uint64_t delta, char *buf)
 
static void flate (void)
 
static void deflate (void)
 
static void misc_init (void)
 
static void misc_fini (void)
 
void m0_dix_cm_repair_cpx_init (void)
 
void m0_dix_cm_repair_cpx_fini (void)
 
void m0_dix_cm_rebalance_cpx_init (void)
 
void m0_dix_cm_rebalance_cpx_fini (void)
 
static int plugin_add (const char *path)
 
int main (int argc, char **argv)
 Test server for m0console. More...
 
static bool intrps_equal (const struct m0_addb2__id_intrp *intrp0, const struct m0_addb2__id_intrp *intrp1)
 
static void dec (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void hex (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void hex0x (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void oct (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void ptr (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void bol (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void fid (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void skip (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void _clock (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void duration (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void fom_type (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void sm_state (const struct m0_sm_conf *conf, struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void fom_state (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void fom_phase (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void rpcop (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void sym (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void counter (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void hbar (char *buf, uint32_t val, uint32_t m)
 
static void hist (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void sm_trans (const struct m0_sm_conf *conf, const char *name, struct m0_addb2__context *ctx, char *buf)
 
static void fom_state_counter (struct m0_addb2__context *ctx, char *buf)
 
static void fop_counter (struct m0_addb2__context *ctx, char *buf)
 
static void rpc_in (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void rpc_out (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void tx_state (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void dtx0_state (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void tx_state_counter (struct m0_addb2__context *ctx, char *buf)
 
static void dtx0_state_counter (struct m0_addb2__context *ctx, char *buf)
 
static void beop_state_counter (struct m0_addb2__context *ctx, char *buf)
 
static void op_state (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void state_counter (struct m0_addb2__context *ctx, char *buf)
 
static void dix_op_state (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void dix_state_counter (struct m0_addb2__context *ctx, char *buf)
 
static void cas_op_state (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void cas_state_counter (struct m0_addb2__context *ctx, char *buf)
 
static void ioo_req_state (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void ioo_state_counter (struct m0_addb2__context *ctx, char *buf)
 
static void cob_req_state (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void bulk_op_state (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void stob_io_req_state (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static void attr (struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
 
static int pad (int indent)
 
static unsigned int count_nonempty_vals (const struct m0_addb2_value *val)
 
static void val_dump_json (struct m0_addb2__context *ctx, const struct m0_addb2_value *val, bool output_timestamp)
 
static void val_dump_plaintext (struct m0_addb2__context *ctx, const char *prefix, const struct m0_addb2_value *val, int indent, bool cr)
 
static int asymbol_cmp (const void *a0, const void *a1)
 

Variables

static struct plugin plugins [PLUGINS_MAX]
 
static size_t plugins_nr
 
static struct m0_varr value_id
 
int optind
 
static bool flatten = false
 
static bool deflatten = false
 
static bool json_output = false
 
static const char * json_extra_data = NULL
 
static m0_bindex_t offset = 0
 
static int delay = 0
 
struct m0_sm_conf fom_states_conf
 
struct m0_sm_conf be_tx_sm_conf
 
struct m0_sm_conf m0_dtx_sm_conf
 
struct m0_sm_conf op_states_conf
 
struct m0_sm_conf m0_op_conf
 
struct m0_sm_conf dix_req_sm_conf
 
struct m0_sm_conf cas_req_sm_conf
 
struct m0_sm_conf io_sm_conf
 
struct m0_addb2__id_intrp ids []
 
struct m0_fom_typem0_fom__types [M0_OPCODES_NR]
 
static bfd * abfd
 
static asymbol ** syms
 
static uint64_t base
 
static size_t nr
 

Macro Definition Documentation

◆ BEND [1/2]

#define BEND   (buf + strlen(buf))

◆ BEND [2/2]

#define BEND   (buf + strlen(buf))