Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
codes
codes
Commits
a4ad277f
Commit
a4ad277f
authored
Jun 14, 2018
by
Caitlin Ross
Browse files
fixing segfaults when using virtual time sampling
parent
7606e0ef
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/networks/model-net/dragonfly-custom.C
View file @
a4ad277f
...
...
@@ -1004,7 +1004,7 @@ void router_custom_setup(router_state * r, tw_lp * lp)
r
->
busy_time_ross_sample
=
(
tw_stime
*
)
calloc
(
p
->
radix
,
sizeof
(
tw_stime
));
if
(
g_st_model_stats
)
lp
->
model_types
->
mstat_sz
=
sizeof
(
tw_lpid
)
+
(
sizeof
(
int64_t
)
+
sizeof
(
tw_stime
))
*
p
->
radix
;
if
(
g_st_use_analysis_lps
)
if
(
g_st_use_analysis_lps
&&
g_st_model_stats
)
lp
->
model_types
->
sample_struct_sz
=
sizeof
(
struct
dfly_router_sample
)
+
(
sizeof
(
tw_stime
)
+
sizeof
(
int64_t
))
*
p
->
radix
;
r
->
ross_rsample
.
busy_time
=
(
tw_stime
*
)
calloc
(
p
->
radix
,
sizeof
(
tw_stime
));
r
->
ross_rsample
.
link_traffic_sample
=
(
int64_t
*
)
calloc
(
p
->
radix
,
sizeof
(
int64_t
));
...
...
src/networks/model-net/dragonfly.c
View file @
a4ad277f
...
...
@@ -911,7 +911,7 @@ static void router_setup(router_state * r, tw_lp * lp)
r
->
busy_time_ross_sample
=
(
tw_stime
*
)
calloc
(
p
->
radix
,
sizeof
(
tw_stime
));
if
(
g_st_model_stats
)
lp
->
model_types
->
mstat_sz
=
sizeof
(
tw_lpid
)
+
(
sizeof
(
int64_t
)
+
sizeof
(
tw_stime
))
*
p
->
radix
;
if
(
g_st_use_analysis_lps
)
if
(
g_st_use_analysis_lps
&&
g_st_model_stats
)
lp
->
model_types
->
sample_struct_sz
=
sizeof
(
struct
dfly_router_sample
)
+
(
sizeof
(
tw_stime
)
+
sizeof
(
int64_t
))
*
p
->
radix
;
r
->
ross_rsample
.
busy_time
=
(
tw_stime
*
)
calloc
(
p
->
radix
,
sizeof
(
tw_stime
));
r
->
ross_rsample
.
link_traffic_sample
=
(
int64_t
*
)
calloc
(
p
->
radix
,
sizeof
(
int64_t
));
...
...
src/networks/model-net/fattree.c
View file @
a4ad277f
...
...
@@ -1172,7 +1172,7 @@ void switch_init(switch_state * r, tw_lp * lp)
r
->
busy_time_sample
=
(
tw_stime
*
)
malloc
(
r
->
radix
*
sizeof
(
tw_stime
));
// ROSS Instrumentation
if
(
g_st_use_analysis_lps
)
if
(
g_st_use_analysis_lps
&&
g_st_model_stats
)
lp
->
model_types
->
sample_struct_sz
=
sizeof
(
struct
fattree_switch_sample
)
+
sizeof
(
int
)
*
r
->
radix
;
rc_stack_create
(
&
r
->
st
);
...
...
src/networks/model-net/model-net-lp.c
View file @
a4ad277f
...
...
@@ -146,7 +146,8 @@ void mn_event_collect(model_net_wrap_msg *m, tw_lp *lp, char *buffer, int *colle
sub_msg
=
((
char
*
)
m
)
+
msg_offsets
[((
model_net_base_state
*
)
lp
->
cur_state
)
->
net_id
];
if
(((
model_net_base_state
*
)
lp
->
cur_state
)
->
sub_model_type
)
{
(((
model_net_base_state
*
)
lp
->
cur_state
)
->
sub_model_type
->
ev_trace
)(
sub_msg
,
lp
,
buffer
,
collect_flag
);
if
(
g_st_ev_trace
)
(((
model_net_base_state
*
)
lp
->
cur_state
)
->
sub_model_type
->
ev_trace
)(
sub_msg
,
lp
,
buffer
,
collect_flag
);
}
break
;
default:
// this shouldn't happen, but can help detect an issue
...
...
src/networks/model-net/slimfly.c
View file @
a4ad277f
...
...
@@ -902,8 +902,8 @@ void slim_router_setup(router_state * r, tw_lp * lp)
r
->
busy_time
=
(
tw_stime
*
)
malloc
(
p
->
radix
*
sizeof
(
tw_stime
));
// ROSS Instrumentation
if
(
g_st_use_analysis_lps
)
lp
->
model_types
->
sample_struct_sz
=
sizeof
(
struct
slimfly_router_sample
)
+
sizeof
(
int
)
*
p
->
radix
;
if
(
g_st_use_analysis_lps
&&
g_st_model_stats
)
lp
->
model_types
->
sample_struct_sz
=
sizeof
(
struct
slimfly_router_sample
)
+
sizeof
(
int
)
*
p
->
radix
;
rc_stack_create
(
&
r
->
st
);
...
...
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