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
92433ec4
Commit
92433ec4
authored
Feb 16, 2018
by
Caitlin Ross
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'analysis-lp' into codes-nemo-sampling
parents
1114973a
71b1dd55
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
24 deletions
+46
-24
src/network-workloads/model-net-synthetic-fattree.c
src/network-workloads/model-net-synthetic-fattree.c
+6
-3
src/networks/model-net/fattree.c
src/networks/model-net/fattree.c
+40
-21
No files found.
src/network-workloads/model-net-synthetic-fattree.c
View file @
92433ec4
...
...
@@ -156,8 +156,11 @@ st_model_types ft_svr_model_types[] = {
(
ev_trace_f
)
ft_svr_event_collect
,
sizeof
(
int
),
(
model_stat_f
)
ft_svr_model_stat_collect
,
0
},
{
NULL
,
0
,
NULL
,
0
,
NULL
,
0
}
0
,
NULL
,
NULL
,
0
},
{
NULL
,
0
,
NULL
,
0
,
NULL
,
0
,
NULL
,
NULL
,
0
}
};
static
const
st_model_types
*
ft_svr_get_model_stat_types
(
void
)
...
...
@@ -471,7 +474,7 @@ int main(
svr_add_lp_type
();
if
(
g_st_ev_trace
)
if
(
g_st_ev_trace
||
g_st_model_stats
||
g_st_use_analysis_lps
)
ft_svr_register_model_stats
();
codes_mapping_setup
();
...
...
src/networks/model-net/fattree.c
View file @
92433ec4
...
...
@@ -297,17 +297,26 @@ struct switch_state
};
/* ROSS Instrumentation Support */
struct
fattree_sample
struct
fattree_
cn_
sample
{
tw_lpid
lpid
;
tw_lpid
terminal_id
;
tw_stime
end_time
;
int
vc_occupancy
;
};
struct
fattree_switch_sample
{
tw_lpid
switch_id
;
int
*
vc_occupancy
;
tw_stime
end_time
;
};
void
fattree_event_collect
(
fattree_message
*
m
,
tw_lp
*
lp
,
char
*
buffer
,
int
*
collect_flag
);
void
fattree_model_stat_collect
(
ft_terminal_state
*
s
,
tw_lp
*
lp
,
char
*
buffer
);
static
void
ross_fattree_sample_fn
(
ft_terminal_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_sample
*
sample
);
static
void
ross_fattree_sample_rc_fn
(
ft_terminal_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_sample
*
sample
);
static
void
ross_fattree_ssample_fn
(
switch_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_sample
*
sample
);
static
void
ross_fattree_ssample_rc_fn
(
switch_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_sample
*
sample
);
static
void
ross_fattree_sample_fn
(
ft_terminal_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_
cn_
sample
*
sample
);
static
void
ross_fattree_sample_rc_fn
(
ft_terminal_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_
cn_
sample
*
sample
);
static
void
ross_fattree_ssample_fn
(
switch_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_s
witch_s
ample
*
sample
);
static
void
ross_fattree_ssample_rc_fn
(
switch_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_s
witch_s
ample
*
sample
);
st_model_types
fattree_model_types
[]
=
{
{(
rbev_trace_f
)
fattree_event_collect
,
...
...
@@ -318,7 +327,7 @@ st_model_types fattree_model_types[] = {
0
,
// update when changing fattree_model_stat_collect
(
sample_event_f
)
ross_fattree_sample_fn
,
(
sample_revent_f
)
ross_fattree_sample_rc_fn
,
sizeof
(
struct
fattree_sample
)
}
,
sizeof
(
struct
fattree_
cn_
sample
)
}
,
{(
rbev_trace_f
)
fattree_event_collect
,
sizeof
(
int
),
(
ev_trace_f
)
fattree_event_collect
,
...
...
@@ -327,7 +336,7 @@ st_model_types fattree_model_types[] = {
0
,
// update when changing fattree_model_stat_collect
(
sample_event_f
)
ross_fattree_ssample_fn
,
(
sample_revent_f
)
ross_fattree_ssample_rc_fn
,
sizeof
(
struct
fattree_sample
)
}
,
0
}
,
// updated in switch_init()
{
NULL
,
0
,
NULL
,
0
,
NULL
,
0
,
NULL
,
NULL
,
0
}
};
/* End of ROSS model stats collection */
...
...
@@ -1166,6 +1175,10 @@ void switch_init(switch_state * r, tw_lp * lp)
r
->
busy_time
=
(
tw_stime
*
)
malloc
(
r
->
radix
*
sizeof
(
tw_stime
));
r
->
busy_time_sample
=
(
tw_stime
*
)
malloc
(
r
->
radix
*
sizeof
(
tw_stime
));
// ROSS Instrumentation
if
(
g_st_use_analysis_lps
)
lp
->
model_types
->
sample_struct_sz
=
sizeof
(
struct
fattree_switch_sample
)
+
sizeof
(
int
)
*
r
->
radix
;
rc_stack_create
(
&
r
->
st
);
for
(
int
i
=
0
;
i
<
r
->
radix
;
i
++
)
...
...
@@ -3038,17 +3051,17 @@ void fattree_model_stat_collect(ft_terminal_state *s, tw_lp *lp, char *buffer)
return
;
}
static
void
ross_fattree_sample_fn
(
ft_terminal_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_sample
*
sample
)
static
void
ross_fattree_sample_fn
(
ft_terminal_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_
cn_
sample
*
sample
)
{
(
void
)
lp
;
(
void
)
bf
;
(
void
)
s
;
(
void
)
sample
;
sample
->
terminal_id
=
s
->
terminal_id
;
sample
->
end_time
=
tw_now
(
lp
);
sample
->
vc_occupancy
=
s
->
vc_occupancy
[
0
];
return
;
}
static
void
ross_fattree_sample_rc_fn
(
ft_terminal_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_sample
*
sample
)
static
void
ross_fattree_sample_rc_fn
(
ft_terminal_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_
cn_
sample
*
sample
)
{
(
void
)
lp
;
(
void
)
bf
;
...
...
@@ -3058,27 +3071,33 @@ static void ross_fattree_sample_rc_fn(ft_terminal_state * s, tw_bf * bf, tw_lp *
return
;
}
static
void
ross_fattree_ssample_fn
(
switch_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_sample
*
sample
)
static
void
ross_fattree_ssample_fn
(
switch_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_s
witch_s
ample
*
sample
)
{
(
void
)
lp
;
(
void
)
bf
;
(
void
)
s
;
(
void
)
sample
;
int
i
;
sample
->
switch_id
=
s
->
switch_id
;
sample
->
end_time
=
tw_now
(
lp
);
sample
->
vc_occupancy
=
(
int
*
)((
&
sample
->
end_time
)
+
1
);
for
(
i
=
0
;
i
<
s
->
radix
;
i
++
)
sample
->
vc_occupancy
[
i
]
=
s
->
vc_occupancy
[
i
];
return
;
}
static
void
ross_fattree_ssample_rc_fn
(
switch_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_sample
*
sample
)
static
void
ross_fattree_ssample_rc_fn
(
switch_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_s
witch_s
ample
*
sample
)
{
(
void
)
lp
;
(
void
)
bf
;
(
void
)
s
;
(
void
)
sample
;
return
;
}
static
const
st_model_types
*
fattree_get_model_stat_types
(
void
)
static
const
st_model_types
*
fattree_get_
cn_
model_stat_types
(
void
)
{
return
(
&
fattree_model_types
[
0
]);
}
...
...
@@ -3105,7 +3124,7 @@ struct model_net_method fattree_method =
.
mn_collective_call
=
NULL
,
.
mn_collective_call_rc
=
NULL
,
.
mn_model_stat_register
=
fattree_register_model_stats
,
.
mn_get_model_stat_types
=
fattree_get_model_stat_types
.
mn_get_model_stat_types
=
fattree_get_
cn_
model_stat_types
};
#ifdef ENABLE_CORTEX
...
...
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