mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
core: log memory info if TREZOR_LOG_MEMORY env is set
This commit is contained in:
parent
9460ac425a
commit
9586358e44
@ -19,9 +19,11 @@ if __debug__:
|
||||
|
||||
TEST = int(uos.getenv("TREZOR_TEST") or "0")
|
||||
SAVE_SCREEN = int(uos.getenv("TREZOR_SAVE_SCREEN") or "0")
|
||||
LOG_MEMORY = int(uos.getenv("TREZOR_LOG_MEMORY") or "0")
|
||||
else:
|
||||
TEST = 0
|
||||
SAVE_SCREEN = 0
|
||||
LOG_MEMORY = 0
|
||||
|
||||
|
||||
def unimport_begin():
|
||||
|
@ -18,6 +18,13 @@ def onclose(w):
|
||||
if not layouts and default_layout:
|
||||
startdefault(default_layout)
|
||||
|
||||
if __debug__:
|
||||
import micropython
|
||||
from trezor import utils
|
||||
|
||||
if utils.LOG_MEMORY:
|
||||
micropython.mem_info()
|
||||
|
||||
|
||||
def closedefault():
|
||||
global default
|
||||
|
Loading…
Reference in New Issue
Block a user