ROSS
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
st-instrumentation.h File Reference
#include <ross.h>
#include <inttypes.h>

Go to the source code of this file.

Data Structures

struct  st_stats_buffer
 
struct  sample_metadata
 
struct  st_pe_stats
 
struct  st_kp_stats
 
struct  st_lp_stats
 
struct  st_event_data
 
struct  st_model_types
 
struct  model_metadata
 

Macros

#define INST_MAX_LENGTH   4096
 
#define st_buffer_free_space(buf)   (buf->size - buf->count)
 
#define st_buffer_write_ptr(buf)   (buf->buffer + buf->write_pos)
 
#define st_buffer_read_ptr(buf)   (buf->buffer + buf->read_pos)
 

Typedefs

typedef struct sample_metadata sample_metadata
 
typedef struct st_pe_stats st_pe_stats
 
typedef struct st_kp_stats st_kp_stats
 
typedef struct st_lp_stats st_lp_stats
 
typedef void(* ev_trace_f )(void *msg, tw_lp *lp, char *buffer, int *collect_flag)
 
typedef void(* sample_event_f )(void *state, tw_bf *b, tw_lp *lp, void *sample)
 
typedef void(* sample_revent_f )(void *state, tw_bf *b, tw_lp *lp, void *sample)
 
typedef void(* model_stat_f )(void *sv, tw_lp *lp, char *buffer)
 
typedef struct st_model_types st_model_types
 

Enumerations

enum  collection_types {
  GVT_COL, RT_COL, ANALYSIS_LP, EV_TRACE,
  MODEL_COL, NUM_COL_TYPES
}
 
enum  inst_data_types { PE_TYPE, KP_TYPE, LP_TYPE, MODEL_TYPE }
 
enum  granularity_types { GRAN_PE, GRAN_KP, GRAN_LP, GRAN_ALL }
 
enum  traces_enum { NO_TRACE, FULL_TRACE, RB_TRACE, COMMIT_TRACE }
 
enum  stats_types_enum {
  NO_STATS, GVT_STATS, RT_STATS, VT_STATS,
  ALL_STATS
}
 

Functions

void st_buffer_allocate ()
 
void st_buffer_init (int type)
 
void st_buffer_push (int type, char *data, int size)
 
void st_buffer_write (int end_of_sim, int type)
 
void st_buffer_finalize (int type)
 
const tw_optdefst_inst_opts ()
 
void st_inst_init (void)
 
void st_inst_dump ()
 
void st_inst_finalize (tw_pe *me)
 
void st_collect_engine_data (tw_pe *me, int col_type)
 
void st_collect_engine_data_pes (tw_pe *pe, sample_metadata *sample_md, tw_statistics *s, int col_type)
 
void st_collect_engine_data_kps (tw_pe *me, tw_kp *kp, sample_metadata *sample_md, int col_type)
 
void st_collect_engine_data_lps (tw_lp *lp, sample_metadata *sample_md, int col_type)
 
void st_collect_event_data (tw_event *cev, double recv_rt)
 
void specialized_lp_setup ()
 
void specialized_lp_init_mapping ()
 
void specialized_lp_run ()
 
const tw_optdefst_special_lp_opts (void)
 
void st_model_setup_types (tw_lp *lp)
 
void st_model_settype (tw_lpid i, st_model_types *model_types)
 
void st_collect_model_data (tw_pe *pe, double current_rt, int stats_type)
 

Variables

char stats_directory [4096]
 
int g_st_buffer_size
 
int g_st_buffer_free_percent
 
FILE * seq_ev_trace
 
FILE * seq_model
 
FILE * seq_analysis
 
char g_st_stats_out [4096]
 
char g_st_stats_path [4096]
 
int g_st_pe_data
 
int g_st_kp_data
 
int g_st_lp_data
 
int g_st_disable_out
 
int g_st_model_stats
 
int g_st_engine_stats
 
int g_st_gvt_sampling
 
int g_st_num_gvt
 
int g_st_rt_sampling
 
tw_clock g_st_rt_interval
 
tw_clock g_st_rt_samp_start_cycles
 
int g_st_ev_trace
 
int g_st_use_analysis_lps
 
tw_lpid g_st_analysis_nlp
 
double g_st_vt_interval
 
double g_st_sampling_end
 
tw_lpid g_st_total_model_lps
 
int g_st_sample_count
 
st_model_typesg_st_model_types
 

Macro Definition Documentation

#define INST_MAX_LENGTH   4096

Definition at line 11 of file st-instrumentation.h.

Referenced by st_buffer_allocate(), and st_buffer_init().

#define st_buffer_free_space (   buf)    (buf->size - buf->count)

Definition at line 14 of file st-instrumentation.h.

Referenced by st_buffer_push().

#define st_buffer_read_ptr (   buf)    (buf->buffer + buf->read_pos)

Definition at line 16 of file st-instrumentation.h.

Referenced by st_buffer_write().

#define st_buffer_write_ptr (   buf)    (buf->buffer + buf->write_pos)

Definition at line 15 of file st-instrumentation.h.

Referenced by st_buffer_push().

Typedef Documentation

typedef void(* ev_trace_f)(void *msg, tw_lp *lp, char *buffer, int *collect_flag)

Definition at line 188 of file st-instrumentation.h.

typedef void(* model_stat_f)(void *sv, tw_lp *lp, char *buffer)

Definition at line 214 of file st-instrumentation.h.

typedef void(* sample_event_f)(void *state, tw_bf *b, tw_lp *lp, void *sample)

Definition at line 197 of file st-instrumentation.h.

Definition at line 38 of file st-instrumentation.h.

typedef void(* sample_revent_f)(void *state, tw_bf *b, tw_lp *lp, void *sample)

Definition at line 198 of file st-instrumentation.h.

typedef struct st_kp_stats st_kp_stats

Definition at line 98 of file st-instrumentation.h.

typedef struct st_lp_stats st_lp_stats

Definition at line 99 of file st-instrumentation.h.

Definition at line 215 of file st-instrumentation.h.

typedef struct st_pe_stats st_pe_stats

Definition at line 97 of file st-instrumentation.h.

Enumeration Type Documentation

Enumerator
GVT_COL 
RT_COL 
ANALYSIS_LP 
EV_TRACE 
MODEL_COL 
NUM_COL_TYPES 

Definition at line 40 of file st-instrumentation.h.

Enumerator
GRAN_PE 
GRAN_KP 
GRAN_LP 
GRAN_ALL 

Definition at line 56 of file st-instrumentation.h.

Enumerator
PE_TYPE 
KP_TYPE 
LP_TYPE 
MODEL_TYPE 

Definition at line 49 of file st-instrumentation.h.

Enumerator
NO_STATS 
GVT_STATS 
RT_STATS 
VT_STATS 
ALL_STATS 

Definition at line 230 of file st-instrumentation.h.

Enumerator
NO_TRACE 
FULL_TRACE 
RB_TRACE 
COMMIT_TRACE 

Definition at line 171 of file st-instrumentation.h.

Function Documentation

void specialized_lp_init_mapping ( )

Definition at line 41 of file specialized-lps.c.

References analysis_start_gid, g_st_analysis_nlp, g_tw_kp, g_tw_lp, g_tw_mynode, g_tw_nlp, g_tw_pe, st_analysis_lp_settype(), tw_lp_onkp(), and tw_lp_onpe().

Referenced by tw_define_lps().

Here is the call graph for this function:

Here is the caller graph for this function:

void specialized_lp_run ( )

Definition at line 52 of file specialized-lps.c.

References g_st_sampling_end, and g_tw_ts_end.

Referenced by st_inst_init().

Here is the caller graph for this function:

void specialized_lp_setup ( )

Definition at line 18 of file specialized-lps.c.

References ALL_STATS, ANALYSIS_LP, analysis_start_gid, g_st_analysis_nlp, g_st_engine_stats, g_st_model_stats, g_st_total_model_lps, g_st_use_analysis_lps, g_tw_nkp, g_tw_nlp, g_tw_synchronization_protocol, MPI_COMM_ROSS, SEQUENTIAL, st_buffer_init(), and VT_STATS.

Referenced by tw_define_lps().

Here is the call graph for this function:

Here is the caller graph for this function:

void st_buffer_allocate ( )

Definition at line 16 of file st-stats-buffer.c.

References buffer_fh, g_st_engine_stats, g_st_ev_trace, g_st_model_stats, g_st_stats_path, g_st_use_analysis_lps, g_tw_masternode, g_tw_mynode, INST_MAX_LENGTH, MPI_COMM_ROSS, NUM_COL_TYPES, prev_offsets, stats_directory, tw_calloc(), and TW_LOC.

Referenced by tw_define_lps().

Here is the call graph for this function:

Here is the caller graph for this function:

void st_buffer_finalize ( int  type)

Definition at line 188 of file st-stats-buffer.c.

References buffer_fh, g_st_disable_out, g_tw_mynode, missed_bytes, and st_buffer_write().

Referenced by st_inst_finalize().

Here is the call graph for this function:

Here is the caller graph for this function:

void st_buffer_init ( int  type)
void st_buffer_push ( int  type,
char *  data,
int  size 
)
void st_buffer_write ( int  end_of_sim,
int  type 
)
void st_collect_engine_data ( tw_pe me,
int  col_type 
)
void st_collect_engine_data_kps ( tw_pe me,
tw_kp kp,
sample_metadata sample_md,
int  col_type 
)
void st_collect_engine_data_lps ( tw_lp lp,
sample_metadata sample_md,
int  col_type 
)
void st_collect_engine_data_pes ( tw_pe pe,
sample_metadata sample_md,
tw_statistics s,
int  col_type 
)

Definition at line 45 of file st-sim-engine.c.

References all_reduce_cnt, st_pe_stats::all_reduce_count, st_pe_stats::efficiency, sample_metadata::flag, g_tw_clock_rate, g_tw_gvt_done, g_tw_mynode, last_all_reduce_cnt, PE_TYPE, st_pe_stats::peid, tw_pe::pq, st_pe_stats::s_avl, tw_statistics::s_avl, st_pe_stats::s_buddy, tw_statistics::s_buddy, st_pe_stats::s_cancel_q, tw_statistics::s_cancel_q, st_pe_stats::s_e_rbs, tw_statistics::s_e_rbs, st_pe_stats::s_event_abort, tw_statistics::s_event_abort, st_pe_stats::s_event_process, tw_statistics::s_event_process, st_pe_stats::s_fc_attempts, tw_statistics::s_fc_attempts, st_pe_stats::s_fossil_collect, tw_statistics::s_fossil_collect, st_pe_stats::s_gvt, tw_statistics::s_gvt, st_pe_stats::s_lz4, tw_statistics::s_lz4, st_pe_stats::s_net_other, tw_statistics::s_net_other, st_pe_stats::s_net_read, tw_statistics::s_net_read, st_pe_stats::s_nevent_abort, tw_statistics::s_nevent_abort, st_pe_stats::s_nevent_processed, tw_statistics::s_nevent_processed, st_pe_stats::s_ngvts, st_pe_stats::s_nread_network, tw_statistics::s_nread_network, st_pe_stats::s_nsend_network, tw_statistics::s_nsend_network, st_pe_stats::s_pe_event_ties, tw_statistics::s_pe_event_ties, st_pe_stats::s_pq, tw_statistics::s_pq, st_pe_stats::s_pq_qsize, st_pe_stats::s_rb_secondary, tw_statistics::s_rb_secondary, st_pe_stats::s_rb_total, tw_statistics::s_rb_total, st_pe_stats::s_rollback, tw_statistics::s_rollback, sample_metadata::sample_sz, st_buffer_push(), st_get_allreduce_count(), tw_pe::stats, and tw_pq_get_size().

Referenced by st_collect_engine_data().

Here is the call graph for this function:

Here is the caller graph for this function:

void st_collect_event_data ( tw_event cev,
double  recv_rt 
)
void st_collect_model_data ( tw_pe pe,
double  current_rt,
int  stats_type 
)
void st_inst_dump ( )

Definition at line 88 of file st-instrumentation.c.

References ALL_STATS, ANALYSIS_LP, EV_TRACE, g_st_disable_out, g_st_engine_stats, g_st_ev_trace, g_st_model_stats, g_st_use_analysis_lps, GVT_COL, GVT_STATS, MODEL_COL, RT_COL, RT_STATS, and st_buffer_write().

Referenced by tw_gvt_step2().

Here is the call graph for this function:

Here is the caller graph for this function:

void st_inst_finalize ( tw_pe me)
void st_inst_init ( void  )

Definition at line 51 of file st-instrumentation.c.

References ALL_STATS, EV_TRACE, g_st_engine_stats, g_st_ev_trace, g_st_gvt_sampling, g_st_model_stats, g_st_rt_interval, g_st_rt_samp_start_cycles, g_st_rt_sampling, g_tw_clock_rate, GVT_COL, GVT_STATS, MODEL_COL, RT_COL, RT_STATS, specialized_lp_run(), st_buffer_init(), and tw_clock_read().

Referenced by tw_run().

Here is the call graph for this function:

Here is the caller graph for this function:

const tw_optdef* st_inst_opts ( )

Definition at line 46 of file st-instrumentation.c.

References inst_options.

Referenced by tw_init().

Here is the caller graph for this function:

void st_model_settype ( tw_lpid  i,
st_model_types model_types 
)

Definition at line 25 of file st-model-data.c.

References g_tw_lp, g_tw_masternode, g_tw_mynode, model_type_warned, model_types, and tw_lp::model_types.

Referenced by main().

Here is the caller graph for this function:

void st_model_setup_types ( tw_lp lp)

Definition at line 10 of file st-model-data.c.

References g_tw_lp_typemap, g_tw_masternode, g_tw_mynode, tw_lp::gid, model_type_warned, and tw_lp::model_types.

Referenced by tw_lp_setup_types().

Here is the caller graph for this function:

const tw_optdef* st_special_lp_opts ( void  )

Definition at line 67 of file specialized-lps.c.

References special_lp_opt.

Referenced by tw_init().

Here is the caller graph for this function:

Variable Documentation

tw_lpid g_st_analysis_nlp
int g_st_buffer_free_percent

Definition at line 10 of file st-stats-buffer.c.

Referenced by st_buffer_write().

int g_st_buffer_size

Definition at line 9 of file st-stats-buffer.c.

Referenced by st_buffer_init(), and st_buffer_write().

int g_st_disable_out
int g_st_engine_stats
int g_st_ev_trace
int g_st_gvt_sampling

Definition at line 14 of file st-instrumentation.c.

Referenced by st_inst_init().

int g_st_kp_data

Definition at line 7 of file st-instrumentation.c.

Referenced by st_collect_engine_data().

int g_st_lp_data

Definition at line 8 of file st-instrumentation.c.

Referenced by st_collect_engine_data().

int g_st_model_stats
st_model_types* g_st_model_types

Definition at line 3 of file st-model-data.c.

int g_st_num_gvt

Definition at line 15 of file st-instrumentation.c.

Referenced by tw_gvt_step2().

int g_st_pe_data

Definition at line 6 of file st-instrumentation.c.

Referenced by st_collect_engine_data().

tw_clock g_st_rt_interval
tw_clock g_st_rt_samp_start_cycles
int g_st_rt_sampling
int g_st_sample_count

Definition at line 13 of file specialized-lps.c.

Referenced by analysis_init().

double g_st_sampling_end

Definition at line 22 of file st-instrumentation.c.

Referenced by specialized_lp_run(), and st_create_sample_event().

char g_st_stats_out[4096]

Definition at line 4 of file st-instrumentation.c.

Referenced by st_buffer_init().

char g_st_stats_path[4096]

Definition at line 5 of file st-instrumentation.c.

Referenced by st_buffer_allocate().

tw_lpid g_st_total_model_lps

Definition at line 16 of file specialized-lps.c.

Referenced by specialized_lp_setup(), and tw_getlocal_lp().

int g_st_use_analysis_lps
double g_st_vt_interval

Definition at line 21 of file st-instrumentation.c.

Referenced by st_create_sample_event().

FILE * seq_analysis

Definition at line 13 of file st-stats-buffer.c.

Referenced by analysis_commit(), and st_buffer_init().

FILE* seq_ev_trace

Definition at line 13 of file st-stats-buffer.c.

Referenced by st_buffer_init(), and st_collect_event_data().

FILE * seq_model

Definition at line 13 of file st-stats-buffer.c.

Referenced by st_buffer_init(), and st_collect_model_data().

char stats_directory[4096]

Definition at line 8 of file st-stats-buffer.c.

Referenced by st_buffer_allocate(), and st_buffer_init().