Skip to content

Commit 429e3f0

Browse files
pfalcondpgeorge
authored andcommitted
unix: Make -v dump memory info at exit.
Also, move bytecode dumps to -v -v, because they're too verbose for just -v.
1 parent 8768f8a commit 429e3f0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

py/emitglue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void mp_emit_glue_assign_bytecode(mp_raw_code_t *rc, byte *code, mp_uint_t len,
6767
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);
6868
#endif
6969
#if MICROPY_DEBUG_PRINTERS
70-
if (mp_verbose_flag > 0) {
70+
if (mp_verbose_flag >= 2) {
7171
mp_bytecode_print(rc, n_pos_args + n_kwonly_args, code, len);
7272
}
7373
#endif

unix/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,10 @@ int main(int argc, char **argv) {
506506
ret = do_repl();
507507
}
508508

509+
if (mp_verbose_flag) {
510+
mem_info(0, NULL);
511+
}
512+
509513
mp_deinit();
510514

511515
#if MICROPY_ENABLE_GC && !defined(NDEBUG)

0 commit comments

Comments
 (0)