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
a4d43ae4
Commit
a4d43ae4
authored
Dec 02, 2016
by
Caitlin Ross
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added event tracing support to model net base lp
parent
63751b09
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
6 deletions
+32
-6
codes/model-net-method.h
codes/model-net-method.h
+2
-0
src/network-workloads/model-net-synthetic.c
src/network-workloads/model-net-synthetic.c
+2
-2
src/networks/model-net/dragonfly.c
src/networks/model-net/dragonfly.c
+8
-4
src/networks/model-net/model-net-lp.c
src/networks/model-net/model-net-lp.c
+20
-0
No files found.
codes/model-net-method.h
View file @
a4d43ae4
...
...
@@ -63,6 +63,8 @@ struct model_net_method
revent_f
mn_sample_rc_fn
;
init_f
mn_sample_init_fn
;
final_f
mn_sample_fini_fn
;
void
(
*
mn_ev_register
)(
st_event_collect
*
base_type
);
const
st_event_collect
*
(
*
mn_get_event_type
)();
};
extern
struct
model_net_method
*
method_array
[];
...
...
src/network-workloads/model-net-synthetic.c
View file @
a4d43ae4
...
...
@@ -405,8 +405,8 @@ int main(
if
(
g_st_ev_rb_collect
||
g_st_ev_collect
)
{
dragonfly_register_evcol
();
router_register_evcol
();
//
dragonfly_register_evcol();
//
router_register_evcol();
svr_register_evcol
();
}
...
...
src/networks/model-net/dragonfly.c
View file @
a4d43ae4
...
...
@@ -3289,14 +3289,14 @@ static const st_event_collect *dragonfly_get_event_type(void)
return
(
&
event_types
[
0
]);
}
void
dragonfly_register_evcol
()
void
dragonfly_register_evcol
(
st_event_collect
*
base_type
)
{
ev_type_register
(
LP_CONFIG_NM_TERM
,
dragonfly_get_event_type
()
);
ev_type_register
(
LP_CONFIG_NM_TERM
,
base_type
);
}
void
router_register_evcol
()
void
router_register_evcol
(
st_event_collect
*
base_type
)
{
ev_type_register
(
LP_CONFIG_NM_ROUT
,
dragonfly_get_event_type
()
);
ev_type_register
(
LP_CONFIG_NM_ROUT
,
base_type
);
}
/* returns the dragonfly lp type for lp registration */
...
...
@@ -3335,6 +3335,8 @@ struct model_net_method dragonfly_method =
.
mn_sample_rc_fn
=
(
void
*
)
dragonfly_sample_rc_fn
,
.
mn_sample_init_fn
=
(
void
*
)
dragonfly_sample_init
,
.
mn_sample_fini_fn
=
(
void
*
)
dragonfly_sample_fin
.
mn_ev_register
=
dragonfly_register_evcol
,
.
mn_get_event_type
=
dragonfly_get_event_type
,
};
struct
model_net_method
dragonfly_router_method
=
...
...
@@ -3354,4 +3356,6 @@ struct model_net_method dragonfly_router_method =
.
mn_sample_rc_fn
=
(
void
*
)
dragonfly_rsample_rc_fn
,
.
mn_sample_init_fn
=
(
void
*
)
dragonfly_rsample_init
,
.
mn_sample_fini_fn
=
(
void
*
)
dragonfly_rsample_fin
.
mn_ev_register
=
router_register_evcol
,
.
mn_get_event_type
=
dragonfly_get_event_type
,
};
src/networks/model-net/model-net-lp.c
View file @
a4d43ae4
...
...
@@ -113,6 +113,19 @@ tw_lptype model_net_base_lp = {
sizeof
(
model_net_base_state
),
};
void
mn_event_collect
(
model_net_wrap_msg
*
m
,
tw_lp
*
lp
,
char
*
buffer
)
{
int
type
=
(
int
)
m
->
h
.
event_type
;
memcpy
(
buffer
,
&
type
,
sizeof
(
type
));
}
st_event_collect
mn_event_types
=
{
(
rbev_col_f
)
mn_event_collect
,
sizeof
(
int
),
(
ev_col_f
)
mn_event_collect
,
sizeof
(
int
),
};
/**** END LP, EVENT PROCESSING FUNCTION DECLS ****/
/**** BEGIN IMPLEMENTATIONS ****/
...
...
@@ -151,6 +164,13 @@ void model_net_base_register(int *do_config_nets){
&
model_net_base_lp
);
else
method_array
[
i
]
->
mn_register
(
&
model_net_base_lp
);
if
(
g_st_ev_rb_collect
||
g_st_ev_collect
)
{
if
(
method_array
[
i
]
->
mn_ev_register
==
NULL
)
ev_type_register
(
model_net_lp_config_names
[
i
],
&
mn_event_types
);
else
method_array
[
i
]
->
mn_ev_register
(
&
mn_event_types
);
}
}
}
}
...
...
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