Fix pcf_labels type
This commit is contained in:
parent
30f68ea5df
commit
5b64737ad9
@ -217,7 +217,7 @@ model_nanos6_breakdown_connect(struct emu *emu)
|
||||
|
||||
int
|
||||
model_nanos6_breakdown_finish(struct emu *emu,
|
||||
const struct pcf_value_label (**labels)[])
|
||||
const struct pcf_value_label **labels)
|
||||
{
|
||||
if (emu->args.breakdown == 0)
|
||||
return 0;
|
||||
@ -231,12 +231,20 @@ model_nanos6_breakdown_finish(struct emu *emu,
|
||||
const struct pcf_value_label *v = NULL;
|
||||
|
||||
/* Emit subsystem values */
|
||||
for (v = *labels[CH_SUBSYSTEM]; v->label; v++)
|
||||
pcf_add_value(pcftype, v->value, v->label);
|
||||
for (v = labels[CH_SUBSYSTEM]; v->label; v++) {
|
||||
if (pcf_add_value(pcftype, v->value, v->label) != 0) {
|
||||
err("pcf_add_value failed");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Emit idle values */
|
||||
for (v = *labels[CH_IDLE]; v->label; v++)
|
||||
pcf_add_value(pcftype, v->value, v->label);
|
||||
for (v = labels[CH_IDLE]; v->label; v++) {
|
||||
if (pcf_add_value(pcftype, v->value, v->label) != 0) {
|
||||
err("pcf_add_value failed");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Emit task_type values */
|
||||
struct system *sys = &emu->system;
|
||||
|
@ -98,6 +98,6 @@ int model_nanos6_finish(struct emu *emu);
|
||||
int model_nanos6_breakdown_create(struct emu *emu);
|
||||
int model_nanos6_breakdown_connect(struct emu *emu);
|
||||
int model_nanos6_breakdown_finish(struct emu *emu,
|
||||
const struct pcf_value_label (**labels)[]);
|
||||
const struct pcf_value_label **labels);
|
||||
|
||||
#endif /* NANOS6_PRIV_H */
|
||||
|
@ -131,10 +131,10 @@ static const struct pcf_value_label nanos6_worker_idle[] = {
|
||||
{ -1, NULL },
|
||||
};
|
||||
|
||||
static const struct pcf_value_label (*pcf_labels[CH_MAX])[] = {
|
||||
[CH_SUBSYSTEM] = &nanos6_ss_values,
|
||||
[CH_THREAD] = &nanos6_thread_type,
|
||||
[CH_IDLE] = &nanos6_worker_idle,
|
||||
static const struct pcf_value_label *pcf_labels[CH_MAX] = {
|
||||
[CH_SUBSYSTEM] = nanos6_ss_values,
|
||||
[CH_THREAD] = nanos6_thread_type,
|
||||
[CH_IDLE] = nanos6_worker_idle,
|
||||
};
|
||||
|
||||
static const long prv_flags[CH_MAX] = {
|
||||
|
Loading…
Reference in New Issue
Block a user