Add virtual flag to CPUs

This commit is contained in:
Rodrigo Arias 2021-11-29 11:02:54 +01:00
parent 5eadcb404e
commit 9bf99ad6a0
2 changed files with 5 additions and 0 deletions

2
emu.c
View File

@ -1068,6 +1068,7 @@ init_cpus(struct ovni_emu *emu)
err("error cpu %ld.%ld name too long\n", i, j); err("error cpu %ld.%ld name too long\n", i, j);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
cpu->virtual = 0;
} }
emu->global_cpu[loom->vcpu.gindex] = &loom->vcpu; emu->global_cpu[loom->vcpu.gindex] = &loom->vcpu;
@ -1077,6 +1078,7 @@ init_cpus(struct ovni_emu *emu)
err("error cpu %ld.* name too long\n", i); err("error cpu %ld.* name too long\n", i);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
loom->vcpu.virtual = 1;
} }
} }

3
emu.h
View File

@ -368,6 +368,9 @@ struct ovni_cpu {
/* Cpu name as shown in paraver row */ /* Cpu name as shown in paraver row */
char name[MAX_CPU_NAME]; char name[MAX_CPU_NAME];
/* Is this a virtual CPU? */
int virtual;
}; };
/* ----------------------- trace ------------------------ */ /* ----------------------- trace ------------------------ */