3 #define __STDC_FORMAT_MACROS 1
21 sample_md.
ts = pe->
GVT;
48 int buf_size =
sizeof(*sample_md) +
sizeof(pe_stats);
49 char buffer[buf_size];
75 pe_stats.
efficiency = (float) 100.0 * (1.0 - ((
float) pe_stats.
s_e_rbs / (float) net_events));
94 memcpy(&buffer[0], sample_md,
sizeof(*sample_md));
95 memcpy(&buffer[
sizeof(*sample_md)], &pe_stats,
sizeof(pe_stats));
105 int buf_size =
sizeof(*sample_md) +
sizeof(kp_stats);
106 char buffer[buf_size];
128 kp_stats.
efficiency = (float) 100.0 * (1.0 - ((
float) kp_stats.
s_e_rbs / (float) net_events));
134 memcpy(&buffer[index], sample_md,
sizeof(*sample_md));
135 index +=
sizeof(*sample_md);
136 memcpy(&buffer[index], &kp_stats,
sizeof(kp_stats));
137 index +=
sizeof(kp_stats);
139 if (index != buf_size)
140 tw_error(
TW_LOC,
"size of data being pushed to buffer is incorrect!\n");
148 int buf_size =
sizeof(*sample_md) +
sizeof(lp_stats);
149 char buffer[buf_size];
169 lp_stats.
efficiency = (float) 100.0 * (1.0 - ((
float) lp_stats.
s_e_rbs / (float) net_events));
175 memcpy(&buffer[index], sample_md,
sizeof(*sample_md));
176 index +=
sizeof(*sample_md);
177 memcpy(&buffer[index], &lp_stats,
sizeof(lp_stats));
178 index +=
sizeof(lp_stats);
180 if (index != buf_size)
181 tw_error(
TW_LOC,
"size of data being pushed to buffer is incorrect!\n");
unsigned int g_tw_gvt_done
unsigned int s_nsend_network
static tw_statistics last_pe_stats[3]
unsigned long long g_tw_clock_rate
void st_collect_engine_data_pes(tw_pe *pe, sample_metadata *sample_md, tw_statistics *s, int col_type)
unsigned int s_rb_secondary
struct st_lp_stats * lp_stats
void tw_error(const char *file, int line, const char *fmt,...) NORETURN
struct st_kp_stats * kp_stats
tw_statistics stats
per PE counters
struct st_kp_stats * last_stats[3]
void st_collect_engine_data(tw_pe *pe, int col_type)
unsigned int s_nevent_abort
void st_buffer_push(int type, char *data, int size)
static tw_clock tw_clock_read(void)
unsigned int all_reduce_count
Holds the entire PE state.
unsigned int s_nevent_processed
unsigned int s_pe_event_ties
unsigned int s_nsend_network
unsigned int tw_pq_get_size(splay_tree *st)
static tw_kp * tw_getkp(tw_kpid id)
tw_kp * kp
kp – Kernel process that we belong to (must match pe).
Statistics tallied over the duration of the simulation.
struct st_lp_stats * last_stats[3]
void tw_get_stats(tw_pe *me, tw_statistics *s)
unsigned int s_nread_network
unsigned int s_rb_secondary
unsigned int s_nevent_processed
unsigned int s_nread_network
void st_collect_engine_data_lps(tw_lp *lp, sample_metadata *sample_md, int col_type)
tw_pq * pq
Priority queue used to sort events.
unsigned int s_nevent_processed
unsigned int s_nread_network
static tw_lp * tw_getlp(tw_lpid id)
static tw_stat all_reduce_cnt
tw_clock s_fossil_collect
tw_stat st_get_allreduce_count()
unsigned int s_nevent_abort
tw_stime GVT
Global Virtual Time.
unsigned long long tw_stat
tw_kpid id
ID number, otherwise its not available to the app.
unsigned int s_nsend_network
tw_stat s_nevent_processed
unsigned int s_fc_attempts
long g_st_current_interval
unsigned int s_nevent_abort
void st_collect_engine_data_kps(tw_pe *pe, tw_kp *kp, sample_metadata *sample_md, int col_type)
static tw_stat last_all_reduce_cnt
tw_stime last_time
Time of the current event being processed.