ROSS
st-instrumentation.h File Reference
#include "tw-opts.h"
#include "ross-types.h"

Go to the source code of this file.

Data Structures

struct  st_stats_buffer
struct  st_pe_stats
struct  st_kp_stats
struct  st_lp_stats
struct  st_event_data
struct  st_model_types

Macros

#define INST_MAX_LENGTH   4096
#define st_buffer_free_space(buf)
#define st_buffer_write_ptr(buf)
#define st_buffer_read_ptr(buf)

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

◆ INST_MAX_LENGTH

#define INST_MAX_LENGTH   4096

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

Referenced by st_buffer_allocate(), and st_buffer_init().

◆ st_buffer_free_space

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

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

Referenced by st_buffer_push().

◆ st_buffer_read_ptr

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

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

Referenced by st_buffer_write().

◆ st_buffer_write_ptr

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

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

Referenced by st_buffer_push().

Typedef Documentation

◆ ev_trace_f

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

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

◆ model_stat_f

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

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

◆ sample_event_f

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

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

◆ sample_metadata

typedef struct sample_metadata sample_metadata

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

◆ sample_revent_f

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

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

◆ st_kp_stats

typedef struct st_kp_stats st_kp_stats

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

◆ st_lp_stats

typedef struct st_lp_stats st_lp_stats

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

◆ st_model_types

typedef struct st_model_types st_model_types

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

◆ st_pe_stats

typedef struct st_pe_stats st_pe_stats

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

Enumeration Type Documentation

◆ collection_types

Enumerator
GVT_COL 
RT_COL 
ANALYSIS_LP 
EV_TRACE 
MODEL_COL 
NUM_COL_TYPES 

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

◆ granularity_types

Enumerator
GRAN_PE 
GRAN_KP 
GRAN_LP 
GRAN_ALL 

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

◆ inst_data_types

Enumerator
PE_TYPE 
KP_TYPE 
LP_TYPE 
MODEL_TYPE 

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

◆ stats_types_enum

Enumerator
NO_STATS 
GVT_STATS 
RT_STATS 
VT_STATS 
ALL_STATS 

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

◆ traces_enum

Enumerator
NO_TRACE 
FULL_TRACE 
RB_TRACE 
COMMIT_TRACE 

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

Function Documentation

◆ specialized_lp_init_mapping()

void specialized_lp_init_mapping ( )
extern

◆ specialized_lp_run()

void specialized_lp_run ( )
extern

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

References g_st_sampling_end, and g_tw_ts_end.

Referenced by st_inst_init().

◆ specialized_lp_setup()

◆ st_buffer_allocate()

◆ st_buffer_finalize()

void st_buffer_finalize ( int type)

Definition at line 200 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().

◆ st_buffer_init()

◆ st_buffer_push()

◆ st_buffer_write()

void st_buffer_write ( int end_of_sim,
int type )

◆ st_collect_engine_data()

◆ st_collect_engine_data_kps()

◆ st_collect_engine_data_lps()

◆ st_collect_engine_data_pes()

◆ st_collect_event_data()

◆ st_collect_model_data()

◆ st_inst_dump()

◆ st_inst_finalize()

◆ st_inst_init()

◆ st_inst_opts()

const tw_optdef * st_inst_opts ( )
extern

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

References inst_options.

Referenced by tw_init().

◆ st_model_settype()

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().

◆ st_model_setup_types()

void st_model_setup_types ( tw_lp * lp)

◆ st_special_lp_opts()

const tw_optdef * st_special_lp_opts ( void )
extern

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

References special_lp_opt.

Referenced by tw_init().

Variable Documentation

◆ g_st_analysis_nlp

◆ g_st_buffer_free_percent

int g_st_buffer_free_percent
extern

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

Referenced by st_buffer_write().

◆ g_st_buffer_size

int g_st_buffer_size
extern

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

Referenced by st_buffer_init(), and st_buffer_write().

◆ g_st_disable_out

◆ g_st_engine_stats

◆ g_st_ev_trace

◆ g_st_gvt_sampling

int g_st_gvt_sampling
extern

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

Referenced by st_inst_init().

◆ g_st_kp_data

int g_st_kp_data
extern

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

Referenced by st_collect_engine_data().

◆ g_st_lp_data

int g_st_lp_data
extern

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

Referenced by st_collect_engine_data().

◆ g_st_model_stats

◆ g_st_model_types

st_model_types* g_st_model_types
extern

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

Referenced by st_model_setup_types().

◆ g_st_num_gvt

int g_st_num_gvt
extern

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

Referenced by tw_gvt_step2().

◆ g_st_pe_data

int g_st_pe_data
extern

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

Referenced by st_collect_engine_data().

◆ g_st_rt_interval

◆ g_st_rt_samp_start_cycles

◆ g_st_rt_sampling

◆ g_st_sample_count

int g_st_sample_count
extern

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

Referenced by analysis_init().

◆ g_st_sampling_end

double g_st_sampling_end
extern

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

Referenced by specialized_lp_run(), and st_create_sample_event().

◆ g_st_stats_out

char g_st_stats_out[4096]
extern

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

Referenced by st_buffer_init().

◆ g_st_stats_path

char g_st_stats_path[4096]
extern

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

Referenced by st_buffer_allocate().

◆ g_st_total_model_lps

tw_lpid g_st_total_model_lps
extern

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

Referenced by specialized_lp_setup(), and tw_getlocal_lp().

◆ g_st_use_analysis_lps

int g_st_use_analysis_lps
extern

◆ g_st_vt_interval

double g_st_vt_interval
extern

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

Referenced by st_create_sample_event().

◆ seq_analysis

FILE * seq_analysis

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

Referenced by analysis_commit(), and st_buffer_init().

◆ seq_ev_trace

FILE* seq_ev_trace
extern

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

Referenced by st_buffer_init(), and st_collect_event_data().

◆ seq_model

FILE * seq_model

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

Referenced by st_buffer_init(), and st_collect_model_data().

◆ stats_directory

char stats_directory[4096]
extern

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

Referenced by st_buffer_allocate(), and st_buffer_init().