From 9bf99ad6a0130bfb99195a58f0651adb874cf7e3 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Mon, 29 Nov 2021 11:02:54 +0100 Subject: [PATCH] Add virtual flag to CPUs --- emu.c | 2 ++ emu.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/emu.c b/emu.c index 6c26796..8bed5b0 100644 --- a/emu.c +++ b/emu.c @@ -1068,6 +1068,7 @@ init_cpus(struct ovni_emu *emu) err("error cpu %ld.%ld name too long\n", i, j); exit(EXIT_FAILURE); } + cpu->virtual = 0; } 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); exit(EXIT_FAILURE); } + loom->vcpu.virtual = 1; } } diff --git a/emu.h b/emu.h index 16aaaa3..17c0c96 100644 --- a/emu.h +++ b/emu.h @@ -368,6 +368,9 @@ struct ovni_cpu { /* Cpu name as shown in paraver row */ char name[MAX_CPU_NAME]; + + /* Is this a virtual CPU? */ + int virtual; }; /* ----------------------- trace ------------------------ */