Add unknown subsystem state for nOS-V breakdown

It will appear when the emulator knows that a thread is running in the
CPU, but no subsystem has been entered yet. This is common a
instrumentation level lower than 3 in nOS-V.
This commit is contained in:
Rodrigo Arias 2024-06-10 17:32:40 +02:00
parent bb5e406af3
commit 31d6eb076c
3 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2023 Barcelona Supercomputing Center (BSC)
/* Copyright (c) 2023-2024 Barcelona Supercomputing Center (BSC)
* SPDX-License-Identifier: GPL-3.0-or-later */
#include "breakdown.h"
@ -181,8 +181,8 @@ connect_cpu(struct bay *bay, struct nosv_cpu *mcpu)
return -1;
}
/* TODO what do we emit on null? */
mux_set_default(&bcpu->mux0, value_int64(666));
/* Emit unknown subsystem on NULL */
mux_set_default(&bcpu->mux0, value_int64(ST_UNKNOWN_SS));
/* Connect mux 1 using idle as select */
if (mux_init(&bcpu->mux1, bay, idle, tri, select_idle, 2) != 0) {

View File

@ -24,6 +24,7 @@ enum nosv_chan {
};
enum nosv_ss_values {
ST_UNKNOWN_SS = 2,
ST_SCHED_HUNGRY = 6,
ST_SCHED_SERVING,
ST_SCHED_SUBMITTING,

View File

@ -141,6 +141,7 @@ static const char *pcf_prefix[CH_MAX] = {
};
static const struct pcf_value_label nosv_ss_values[] = {
{ ST_UNKNOWN_SS, "Unknown subsystem" },
{ ST_SCHED_HUNGRY, "Scheduler: Hungry" },
{ ST_SCHED_SERVING, "Scheduler: Serving" },
{ ST_SCHED_SUBMITTING, "Scheduler: Submitting" },