Commit e0203ac6 authored by Caitlin Ross's avatar Caitlin Ross

added event tracing functionality to fat tree LPs

parent e116532c
......@@ -3,6 +3,9 @@
#include <ross.h>
/* Functions used for ROSS event tracing */
extern void fattree_register_evtrace();
/* Global variable for modelnet output directory name */
extern char *modelnet_stats_dir;
......
......@@ -2959,6 +2959,33 @@ tw_lptype fattree_lps[] =
{NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0},
};
/* For ROSS event tracing */
void fattree_event_collect(fattree_message *m, tw_lp *lp, char *buffer)
{
int type = (int) m->type;
memcpy(buffer, &type, sizeof(type));
}
st_trace_type fattree_trace_types[] = {
{(rbev_trace_f) fattree_event_collect,
sizeof(int),
(ev_trace_f) fattree_event_collect,
sizeof(int)},
{0}
};
static const st_trace_type *fattree_get_trace_types(void)
{
return(&fattree_trace_types[0]);
}
static void fattree_register_trace(st_trace_type *base_type)
{
trace_type_register(LP_CONFIG_NM, base_type);
trace_type_register("fattree_switch", base_type);
}
/*** END of ROSS event tracing additions */
/* returns the fattree lp type for lp registration */
static const tw_lptype* fattree_get_cn_lp_type(void)
{
......@@ -2987,6 +3014,8 @@ struct model_net_method fattree_method =
.mn_report_stats = fattree_report_stats,
// .model_net_method_find_local_device = NULL,
.mn_collective_call = NULL,
.mn_collective_call_rc = NULL
.mn_collective_call_rc = NULL,
.mn_trace_register = fattree_register_trace,
.mn_get_trace_type = fattree_get_trace_types
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment