From 54c30442cafa97213bc53d71a5ae425286268997 Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Tue, 24 Oct 2023 15:56:37 +0100 Subject: [PATCH] Reduce printing --- .../src/compressor_includes/pair_minimize.h | 15 ++++++++------- .../compressors/src/simple/simple_compressor.c | 3 ++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/c_common/models/compressors/src/compressor_includes/pair_minimize.h b/c_common/models/compressors/src/compressor_includes/pair_minimize.h index 63f6231e47..625d220838 100644 --- a/c_common/models/compressors/src/compressor_includes/pair_minimize.h +++ b/c_common/models/compressors/src/compressor_includes/pair_minimize.h @@ -353,9 +353,9 @@ bool minimise_run(int target_length, bool *failed_by_malloc, } } - log_info("before sort %u", routes_count); + log_debug("before sort %u", routes_count); for (uint i = 0; i < routes_count; i++) { - log_info("%u", routes[i]); + log_debug("%u", routes[i]); } sort_routes(); @@ -364,12 +364,12 @@ bool minimise_run(int target_length, bool *failed_by_malloc, return false; } - log_info("after sort %u", routes_count); + log_debug("after sort %u", routes_count); for (uint i = 0; i < routes_count; i++) { - log_info("%u", routes[i]); + log_debug("%u", routes[i]); } - log_info("do sort_table by route %u", table_size); + log_debug("do sort_table by route %u", table_size); tc[T2_LOAD] = 0xFFFFFFFF; tc[T2_CONTROL] = 0x83; sort_table(); @@ -388,14 +388,14 @@ bool minimise_run(int target_length, bool *failed_by_malloc, while (left <= max_index) { int right = left; uint32_t left_route = routing_table_get_entry(left)->route; - log_info("A %u %u %u %u", left, max_index, right, left_route); + log_debug("A %u %u %u %u", left, max_index, right, left_route); while ((right < table_size - 1) && routing_table_get_entry(right+1)->route == left_route) { right++; } remaining_index = right + 1; - log_info("compress %u %u", left, right); + log_debug("compress %u %u", left, right); tc[T2_LOAD] = 0xFFFFFFFF; tc[T2_CONTROL] = 0x83; compress_by_route(left, right); @@ -417,6 +417,7 @@ bool minimise_run(int target_length, bool *failed_by_malloc, left = right + 1; } + log_debug("done %u %u", table_size, write_index); //for (uint i = 0; i < write_index; i++) { // entry_t *entry1 = routing_table_get_entry(i); diff --git a/c_common/models/compressors/src/simple/simple_compressor.c b/c_common/models/compressors/src/simple/simple_compressor.c index a1950e0ee7..0d2b1f1c0d 100644 --- a/c_common/models/compressors/src/simple/simple_compressor.c +++ b/c_common/models/compressors/src/simple/simple_compressor.c @@ -85,6 +85,7 @@ void compress_start(UNUSED uint unused0, UNUSED uint unused1) { // Free the block of SDRAM used to load the routing table. log_debug("free sdram blocks which held router tables"); + FREE((void *) header); // set the failed flag and exit malloc_extras_terminate(EXIT_FAIL); @@ -100,7 +101,7 @@ bool standalone(void) { //! \brief the main entrance. void c_main(void) { log_debug("%u bytes of free DTCM", sark_heap_max(sark.heap, 0)); - malloc_extras_turn_on_print(); + malloc_extras_turn_off_print(); // kick-start the process spin1_schedule_callback(compress_start, 0, 0, 3);