m1n1.agx: Add show_stats to disable stats printing

Signed-off-by: Asahi Lina <lina@asahilina.net>
This commit is contained in:
Asahi Lina 2022-08-17 14:24:09 +09:00
parent 0b37f5599c
commit 8a3aad19e9
2 changed files with 5 additions and 2 deletions

View file

@ -28,6 +28,7 @@ class AGX:
self.p = u.proxy
self.iface = u.iface
self.show_stats = False
self.asc_dev = u.adt["/arm-io/gfx-asc"]
self.sgx_dev = u.adt["/arm-io/sgx"]
@ -165,7 +166,8 @@ class AGX:
for chan in self.ch.log:
chan.poll()
self.ch.ktrace.poll()
self.ch.stats.poll()
if self.show_stats:
self.ch.stats.poll()
self.ch.event.poll()
def kick_firmware(self):

View file

@ -98,4 +98,5 @@ class GPUStatsChannel(GPURXChannel):
MSG_CLASS = StatsMsg
def handle_message(self, msg):
self.log(f"stat {msg}")
if self.agx.show_stats:
self.log(f"stat {msg}")