4#ifndef ROSS_DO_NOT_PRINT
8 printf(
"\t%-50s %11lld\n", name, v);
15 printf(
"\t%-50s %11.2f %%\n", name, v);
22 printf(
"\t%-50s %11.1f\n", name, v);
29 printf(
"\t%-50s %11.4lf\n", name, v);
83 s->s_rio_load +=
pe->stats.s_rio_load;
84 s->s_rio_lp_init +=
pe->stats.s_rio_lp_init;
108 tw_stat model_net = model_nevent - model_e_rbs;
111 printf(
"\nSeparate Statistics for Model and Analysis LPs\n");
112 printf(
"Model LPs:\n");
113 show_lld(
"Total Events Processed", model_nevent);
114 show_lld(
"Events Rolled Back", model_e_rbs);
115 show_lld(
"Net Events Processed", model_net);
116 show_2f(
"Efficiency", 100.0 * (1.0 - ((
double) model_e_rbs / (
double) model_net)));
118 printf(
"\nAnalysis LPs:\n");
121 show_lld(
"Net Events Processed", analysis_net);
122 show_2f(
"Efficiency", 100.0 * (1.0 - ((
double) s->
s_alp_e_rbs / (
double) analysis_net)));
129 bzero(&s,
sizeof(s));
130 size_t m_alloc, m_waste;
146#ifndef ROSS_DO_NOT_PRINT
150 printf(
"\nTW Library Statistics:\n");
156 printf(
"\t%-50s %11.9lf\n",
157 "Minimum TS Offset Detected in Conservative Mode",
163 "Percent Remote Events",
171 "Percent Remote Events",
187 "Event Rate (events/sec)",
193 printf(
"\nTW Memory Statistics:\n");
195 show_lld(
"Memory Allocated", m_alloc / 1024);
196 show_lld(
"Memory Wasted", m_waste / 1024);
200 printf(
"TW Network Statistics:\n");
205 printf(
"\nTW Data Structure sizes in bytes (sizeof):\n");
216 printf(
"\nTW Clock Cycle Statistics (MAX values in secs at %1.4lf GHz):\n",
g_tw_clock_rate / 1000000000.0);
251 mkdir(
"ross_all_lp_stats", 0777);
255 char pe_log_file_path[40];
256 snprintf(pe_log_file_path, 40,
"ross_all_lp_stats/pe_%lu.txt", me->
id);
257 FILE* pe_log_file = fopen(pe_log_file_path,
"w");
259 fprintf(pe_log_file,
"Time spent processing events for each LP:\n");
264 fprintf(pe_log_file,
"LPID: %lu\t- Processing time: %e\t- Events processed: %u\n",
tw_lpid g_st_analysis_nlp
int g_st_use_analysis_lps
tw_statistics * tw_net_statistics(tw_pe *, tw_statistics *)
Function to reduce all the statistics for output.
void tw_net_barrier(void)
unsigned int tw_pq_get_size(tw_pq *)
double g_tw_min_detected_offset
unsigned int g_tw_events_per_pe_extra
unsigned long long g_tw_clock_rate
void tw_wall_sub(tw_wtime *r, tw_wtime *a, tw_wtime *b)
unsigned int g_tw_events_per_pe
unsigned int g_tw_gvt_done
void tw_calloc_stats(size_t *alloc, size_t *waste)
unsigned int g_tw_sim_started
double tw_wall_to_double(tw_wtime *t)
tw_synch g_tw_synchronization_protocol
void tw_gvt_stats(FILE *F)
static int tw_ismaster(void)
static tw_lp * tw_getlp(tw_lpid id)
static tw_kp * tw_getkp(tw_kpid id)
unsigned long long tw_stat
unsigned int s_nevent_processed
long s_e_rbs
Number of events rolled back by this LP.
long s_rb_secondary
Number of secondary rollbacks by this LP.
tw_stat s_nevent_processed
Number of events processed.
long s_rb_total
Number of total rollbacks by this LP.
tw_rng_stream * rng
RNG stream array for this LP.
tw_lptype * type
Type of this LP, including service callbacks.
struct st_lp_stats * lp_stats
void * cur_state
Current application LP data.
size_t state_sz
Number of bytes that SV is for the LP.
final_f final
Final handler routine.
Holds the entire PE state.
Statistics tallied over the duration of the simulation.
double s_min_detected_offset
tw_stat s_nsend_remote_rb
tw_stat s_alp_nevent_processed
tw_stat s_nsend_loc_remote
tw_clock s_fossil_collect
tw_stat s_nevent_processed
tw_stat s_nsend_net_remote
tw_stat s_events_past_end
static void show_1f(const char *name, double v)
static void show_2f(const char *name, double v)
static void show_lld(const char *name, tw_stat v)
void tw_get_stats(tw_pe *pe, tw_statistics *s)
static void show_4f(const char *name, double v)
void tw_all_lp_stats(tw_pe *me)
void st_print_analysis_LP_stats(tw_statistics *s)