Commit d865f67b authored by Damien George's avatar Damien George

py/{gc,qstr}: Don't include mem dump code with MEM_INFO disabled.

parent eaf2e054
......@@ -785,6 +785,8 @@ void *gc_realloc(void *ptr_in, size_t n_bytes, bool allow_move) {
}
#endif // Alternative gc_realloc impl
#if EXTENSIVE_HEAP_PROFILING || MICROPY_PY_MICROPYTHON_MEM_INFO
void gc_dump_info(void) {
gc_info_t info;
gc_info(&info);
......@@ -904,6 +906,8 @@ void gc_dump_alloc_table(void) {
GC_EXIT();
}
#endif // EXTENSIVE_HEAP_PROFILING || MICROPY_PY_MICROPYTHON_MEM_INFO
#if DEBUG_PRINT
void gc_test(void) {
mp_uint_t len = 500;
......
......@@ -261,6 +261,7 @@ const byte *qstr_data(qstr q, size_t *len) {
return Q_GET_DATA(qd);
}
#if MICROPY_PY_MICROPYTHON_MEM_INFO
void qstr_pool_info(size_t *n_pool, size_t *n_qstr, size_t *n_str_data_bytes, size_t *n_total_bytes) {
QSTR_ENTER();
*n_pool = 0;
......@@ -283,7 +284,6 @@ void qstr_pool_info(size_t *n_pool, size_t *n_qstr, size_t *n_str_data_bytes, si
QSTR_EXIT();
}
#if MICROPY_PY_MICROPYTHON_MEM_INFO
void qstr_dump_data(void) {
QSTR_ENTER();
for (qstr_pool_t *pool = MP_STATE_VM(last_pool); pool != NULL && pool != &CONST_POOL; pool = pool->prev) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment