summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-10-26 23:20:22 +0200
committerDamien George <damien.p.george@gmail.com>2014-10-26 22:36:56 +0000
commit429e3f077e8034d934cf5decdb77bdd64a130808 (patch)
treead91ac00e534b436c37a3f2f994367e62b799d94
parent8768f8ad4bb8fbd5dcf07335fc0a0689f21031c4 (diff)
downloadmicropython-429e3f077e8034d934cf5decdb77bdd64a130808.tar.gz
micropython-429e3f077e8034d934cf5decdb77bdd64a130808.zip
unix: Make -v dump memory info at exit.
Also, move bytecode dumps to -v -v, because they're too verbose for just -v.
-rw-r--r--py/emitglue.c2
-rw-r--r--unix/main.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/py/emitglue.c b/py/emitglue.c
index 41a6720e70..5d51ba2a68 100644
--- a/py/emitglue.c
+++ b/py/emitglue.c
@@ -67,7 +67,7 @@ void mp_emit_glue_assign_bytecode(mp_raw_code_t *rc, byte *code, mp_uint_t len,
DEBUG_printf("assign byte code: code=%p len=" UINT_FMT " n_pos_args=" UINT_FMT " n_kwonly_args=" UINT_FMT " flags=%x\n", code, len, n_pos_args, n_kwonly_args, (uint)scope_flags);
#endif
#if MICROPY_DEBUG_PRINTERS
- if (mp_verbose_flag > 0) {
+ if (mp_verbose_flag >= 2) {
mp_bytecode_print(rc, n_pos_args + n_kwonly_args, code, len);
}
#endif
diff --git a/unix/main.c b/unix/main.c
index 7bfa96b273..780f159efe 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -506,6 +506,10 @@ int main(int argc, char **argv) {
ret = do_repl();
}
+ if (mp_verbose_flag) {
+ mem_info(0, NULL);
+ }
+
mp_deinit();
#if MICROPY_ENABLE_GC && !defined(NDEBUG)