Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
2d9622cf
Commit
2d9622cf
authored
Aug 15, 2014
by
Jonathan Jenkins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug messages for scheduler
parent
88287f5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
src/models/networks/model-net/model-net-sched-impl.c
src/models/networks/model-net/model-net-sched-impl.c
+20
-0
No files found.
src/models/networks/model-net/model-net-sched-impl.c
View file @
2d9622cf
...
...
@@ -12,6 +12,14 @@
#include "codes/model-net-method.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
typedef
struct
mn_sched_qitem
{
...
...
@@ -226,6 +234,8 @@ int fcfs_next(
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
,
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
,
...
...
@@ -381,6 +391,8 @@ int rr_next(
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
,
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
,
...
...
@@ -427,6 +439,10 @@ void rr_next_rc (
qlist_add
(
ent
,
&
s
->
reqs
);
mn_sched_qitem
*
q
=
qlist_entry
(
ent
,
mn_sched_qitem
,
ql
);
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
){
// re-create the q item
...
...
@@ -451,6 +467,10 @@ void rr_next_rc (
else
{
q
->
local_event
=
NULL
;
}
// add back to front of list
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
{
assert
(
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment