diff options
| author | Dan Halbert <halbert@halwitz.org> | 2017-07-23 15:32:05 -0400 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2017-07-23 15:32:05 -0400 |
| commit | f91493c97e20eef1d39a9cdc6c42a25cfd511734 (patch) | |
| tree | 7e7062c9c12220d798cfa154e0729b7cf3e6447b /py/mpstate.h | |
| parent | af1ede930ba643d68850c541ef4075d5f7fd4f02 (diff) | |
Measure and report maximum stack usage. (#175)
Add max stack usage tracking, visible via debug module ustack.
Add separate cpp flag for enabling modules: MICROPY_DEBUG_MODULES
Diffstat (limited to 'py/mpstate.h')
| -rw-r--r-- | py/mpstate.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/py/mpstate.h b/py/mpstate.h index 30785775b..0b195a096 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -221,6 +221,10 @@ typedef struct _mp_state_thread_t { // Stack top at the start of program char *stack_top; + #if MICROPY_MAX_STACK_USAGE + char* stack_bottom; + #endif + #if MICROPY_STACK_CHECK size_t stack_limit; #endif |
