Commit 2d9622cf authored by Jonathan Jenkins's avatar Jonathan Jenkins
Browse files

debug messages for scheduler

parent 88287f5e
...@@ -12,6 +12,14 @@ ...@@ -12,6 +12,14 @@
#include "codes/model-net-method.h" #include "codes/model-net-method.h"
#include "codes/quicklist.h" #include "codes/quicklist.h"
#define MN_SCHED_DEBUG_VERBOSE 0
#if MN_SCHED_DEBUG_VERBOSE
#define dprintf(_fmt, ...) printf(_fmt, __VA_ARGS__);
#else
#define dprintf(_fmt, ...)
#endif
/// scheduler-specific data structures /// scheduler-specific data structures
typedef struct mn_sched_qitem { typedef struct mn_sched_qitem {
...@@ -226,6 +234,8 @@ int fcfs_next( ...@@ -226,6 +234,8 @@ int fcfs_next(
is_last_packet = 0; is_last_packet = 0;
} }
dprintf("%lu (mn): issuing packet of size %lu (of %lu) from %lu to %lu\n",
lp->gid, psize, q->rem, q->req.src_lp, q->req.final_dest_lp);
*poffset = s->method->model_net_method_packet_event(q->req.category, *poffset = s->method->model_net_method_packet_event(q->req.category,
q->req.final_dest_lp, psize, q->req.is_pull, q->req.msg_size, 0.0, q->req.final_dest_lp, psize, q->req.is_pull, q->req.msg_size, 0.0,
q->req.remote_event_size, q->remote_event, q->req.self_event_size, q->req.remote_event_size, q->remote_event, q->req.self_event_size,
...@@ -381,6 +391,8 @@ int rr_next( ...@@ -381,6 +391,8 @@ int rr_next(
is_last_packet = 0; is_last_packet = 0;
} }
dprintf("%lu (mn): issuing packet of size %lu (of %lu) from %lu to %lu\n",
lp->gid, psize, q->rem, q->req.src_lp, q->req.final_dest_lp);
*poffset = s->method->model_net_method_packet_event(q->req.category, *poffset = s->method->model_net_method_packet_event(q->req.category,
q->req.final_dest_lp, psize, q->req.is_pull, q->req.msg_size, 0.0, q->req.final_dest_lp, psize, q->req.is_pull, q->req.msg_size, 0.0,
q->req.remote_event_size, q->remote_event, q->req.self_event_size, q->req.remote_event_size, q->remote_event, q->req.self_event_size,
...@@ -427,6 +439,10 @@ void rr_next_rc ( ...@@ -427,6 +439,10 @@ void rr_next_rc (
qlist_add(ent, &s->reqs); qlist_add(ent, &s->reqs);
mn_sched_qitem *q = qlist_entry(ent, mn_sched_qitem, ql); mn_sched_qitem *q = qlist_entry(ent, mn_sched_qitem, ql);
q->rem += q->req.packet_size; q->rem += q->req.packet_size;
dprintf("%lu (mn): rc issuing packet of size %lu (of %lu) from "
"%lu to %lu\n",
lp->gid, q->req.packet_size, q->rem, q->req.src_lp,
q->req.final_dest_lp);
} }
else if (rc->rtn == 1){ else if (rc->rtn == 1){
// re-create the q item // re-create the q item
...@@ -451,6 +467,10 @@ void rr_next_rc ( ...@@ -451,6 +467,10 @@ void rr_next_rc (
else { q->local_event = NULL; } else { q->local_event = NULL; }
// add back to front of list // add back to front of list
qlist_add(&q->ql, &s->reqs); qlist_add(&q->ql, &s->reqs);
dprintf("%lu (mn): rc issuing packet of size %lu (of %lu) from "
"%lu to %lu\n",
lp->gid, q->rem, q->rem, q->req.src_lp,
q->req.final_dest_lp);
} }
else { else {
assert(0); assert(0);
......
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