mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-16 17:42:02 +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")
|
TEST = int(uos.getenv("TREZOR_TEST") or "0")
|
||||||
SAVE_SCREEN = int(uos.getenv("TREZOR_SAVE_SCREEN") or "0")
|
SAVE_SCREEN = int(uos.getenv("TREZOR_SAVE_SCREEN") or "0")
|
||||||
|
LOG_MEMORY = int(uos.getenv("TREZOR_LOG_MEMORY") or "0")
|
||||||
else:
|
else:
|
||||||
TEST = 0
|
TEST = 0
|
||||||
SAVE_SCREEN = 0
|
SAVE_SCREEN = 0
|
||||||
|
LOG_MEMORY = 0
|
||||||
|
|
||||||
|
|
||||||
def unimport_begin():
|
def unimport_begin():
|
||||||
|
@ -18,6 +18,13 @@ def onclose(w):
|
|||||||
if not layouts and default_layout:
|
if not layouts and default_layout:
|
||||||
startdefault(default_layout)
|
startdefault(default_layout)
|
||||||
|
|
||||||
|
if __debug__:
|
||||||
|
import micropython
|
||||||
|
from trezor import utils
|
||||||
|
|
||||||
|
if utils.LOG_MEMORY:
|
||||||
|
micropython.mem_info()
|
||||||
|
|
||||||
|
|
||||||
def closedefault():
|
def closedefault():
|
||||||
global default
|
global default
|
||||||
|
Loading…
Reference in New Issue
Block a user