Remove useless DEBUG_TASKS (not supported on FreeRTOS) (#1448)

This commit is contained in:
Raphael Coeffic
2022-01-21 12:59:45 +10:00
committed by GitHub
parent 7da7261e7b
commit 0ee144dd25
4 changed files with 0 additions and 106 deletions
-55
View File
@@ -1057,56 +1057,6 @@ void printInterrupts()
}
#endif //#if defined(DEBUG_INTERRUPTS)
#if defined(DEBUG_TASKS)
void printTaskSwitchLog()
{
serialPrint("Tasks legend [<task_id>, <task name>]:");
for(int n = 0; n <= CFG_MAX_USER_TASKS+1; n++) {
if (0 == n) {
serialPrint("%d: Idle", n);
}
if (cliTaskId == n) {
serialPrint("%d: CLI", n);
}
else if (menusTaskId == n) {
serialPrint("%d: menus", n);
}
else if (mixerTaskId == n) {
serialPrint("%d: mixer", n);
}
else if (audioTaskId == n) {
serialPrint("%d: audio", n);
}
}
serialCrlf();
serialPrint("Tasks switch log at %u [<time>, <task_id>]:", get_tmr10ms());
uint32_t lastSwitchTime = 0;
uint32_t * tsl = new uint32_t[DEBUG_TASKS_LOG_SIZE];
if (!tsl) {
serialPrint("Not enough memory");
return;
}
memcpy(tsl, taskSwitchLog, sizeof(taskSwitchLog));
uint32_t * p = tsl + taskSwitchLogPos;
uint32_t * end = tsl + DEBUG_TASKS_LOG_SIZE;
for(int n = 0; n < DEBUG_TASKS_LOG_SIZE; n++) {
uint32_t taskId = *p >> 24;
uint32_t switchTime = *p & 0xFFFFFF;
if (lastSwitchTime != switchTime) {
serialPrintf("\r\n%06x: ", switchTime);
lastSwitchTime = switchTime;
}
serialPrintf("%u ", taskId);
if ( ++p >= end ) {
p = tsl;
}
}
delete[] tsl;
serialCrlf();
}
#endif // #if defined(DEBUG_TASKS)
#if defined(DEBUG_TIMERS)
void printDebugTime(uint32_t time)
{
@@ -1277,11 +1227,6 @@ int cliDisplay(const char ** argv)
printInterrupts();
}
#endif
#if defined(DEBUG_TASKS)
else if (!strcmp(argv[1], "tsl")) {
printTaskSwitchLog();
}
#endif
#if defined(DEBUG_TIMERS)
else if (!strcmp(argv[1], "dt")) {
printDebugTimers();