From ec97e6f11b106bcb1b3aadaa9a173afd61e3eb03 Mon Sep 17 00:00:00 2001 From: Daniel Tang Date: Wed, 22 Feb 2023 01:32:01 -0500 Subject: [PATCH] Don't access srbm when disabled --- ticks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ticks.c b/ticks.c index 612570b..90b8cab 100644 --- a/ticks.c +++ b/ticks.c @@ -42,9 +42,9 @@ static void *collector(void *arg) { unsigned int stat; getgrbm(&stat); unsigned int uvd; - getsrbm(&uvd); + if (bits.uvd) getsrbm(&uvd); unsigned int vce; - getsrbm2(&vce); + if (bits.vce0) getsrbm2(&vce); memset(&history[cur], 0, sizeof(struct bits_t));