heap: Add trace configuration to allow hash map placement in external RAM bss section when possible

- Remove the size limit for the hash_map array from the CONFIG_HEAP_TRACE_HASH_MAP_SIZE
- Add test case for heap tracing using hashmap
- Update heap_debug.rst to document the newly added configurations in the heap component

Closes https://github.com/espressif/esp-idf/issues/11172
This commit is contained in:
Guillaume Souchere
2023-04-12 12:17:00 +02:00
parent 05cbd19f25
commit 6ce1ccd964
5 changed files with 55 additions and 6 deletions

View File

@@ -84,7 +84,11 @@ static size_t r_get_idx;
TAILQ_HEAD(heap_trace_hash_list_struct_t, heap_trace_record_t);
typedef struct heap_trace_hash_list_struct_t heap_trace_hash_list_t;
static heap_trace_hash_list_t hash_map[(size_t)CONFIG_HEAP_TRACE_HASH_MAP_SIZE]; // Buffer used for hashmap entries
static
#if CONFIG_HEAP_TRACE_HASH_MAP_IN_EXT_RAM
EXT_RAM_BSS_ATTR
#endif
heap_trace_hash_list_t hash_map[(size_t)CONFIG_HEAP_TRACE_HASH_MAP_SIZE]; // Buffer used for hashmap entries
static size_t total_hashmap_hits;
static size_t total_hashmap_miss;