mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
buflib: Refactor various debugging features
Gate buflib_get_data() checking, debug printing, and buflib integrity checks behind individual defines in buflib.h, and turn them all off by default. If needed, they can be turned on manually when compiling. The buflib debug menu is only available if debug printing is enabled, so after this commit it will no longer be included in normal builds -- it isn't very useful to end users. Change-Id: Iab25b7852bc7c5592ce04c9c45762046a87d5bc3
This commit is contained in:
parent
e492b51d83
commit
719d48afc4
7 changed files with 75 additions and 43 deletions
|
@ -496,6 +496,7 @@ static bool dbg_buffering_thread(void)
|
|||
#undef STR_DATAREM
|
||||
}
|
||||
|
||||
#ifdef BUFLIB_DEBUG_PRINT
|
||||
static const char* bf_getname(int selected_item, void *data,
|
||||
char *buffer, size_t buffer_len)
|
||||
{
|
||||
|
@ -536,6 +537,7 @@ static bool dbg_buflib_allocs(void)
|
|||
info.timeout = HZ;
|
||||
return simplelist_show_list(&info);
|
||||
}
|
||||
#endif /* BUFLIB_DEBUG_PRINT */
|
||||
|
||||
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
||||
static const char* dbg_partitions_getname(int selected_item, void *data,
|
||||
|
@ -2619,7 +2621,9 @@ static const struct {
|
|||
#ifdef PM_DEBUG
|
||||
{ "pm histogram", peak_meter_histogram},
|
||||
#endif /* PM_DEBUG */
|
||||
#ifdef BUFLIB_DEBUG_PRINT
|
||||
{ "View buflib allocs", dbg_buflib_allocs },
|
||||
#endif
|
||||
#ifndef SIMULATOR
|
||||
#if CONFIG_TUNER
|
||||
{ "FM Radio", dbg_fm_radio },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue