From 8f07953007be27f8d94d4c8281851c6354c50945 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Mon, 20 Nov 2023 13:56:07 -0800 Subject: [PATCH] toplev: Fix counters initialization --- tl_cpu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tl_cpu.py b/tl_cpu.py index c186e350..54c5c1f0 100644 --- a/tl_cpu.py +++ b/tl_cpu.py @@ -206,7 +206,7 @@ def __init__(self, known_cpus=(), nocheck=False, env=Env()): newcounters = { "cpu": 4 } else: newcounters = { "cpu": 8 } - if self.counters is None: + if not self.counters: self.counters = newcounters if not nocheck and not self.env.forcecounters: for j in ("cpu", "cpu_core", "cpu_atom"):