Print the DMA usage in top via instrumentation interface

This commit is contained in:
David Sidrane
2016-05-31 10:53:24 -10:00
committed by Lorenz Meier
parent b54ec99d22
commit 08f0cc1b24
+14 -1
View File
@@ -215,12 +215,25 @@ void print_load(uint64_t t, int fd, struct print_load_s *print_state)
(double)(task_load * 100.f),
(double)(sched_load * 100.f),
(double)(idle * 100.f));
#if defined(BOARD_DMA_ALLOC_POOL_SIZE)
uint16_t dma_total;
uint16_t dma_used;
uint16_t dma_peek_used;
if (board_get_dma_usage(&dma_total, &dma_used, &dma_peek_used) >= 0) {
dprintf(fd, "%sDMA Memory: %d total, %d used %d peek\n",
clear_line,
dma_total,
dma_used,
dma_peek_used);
}
#endif
dprintf(fd, "%sUptime: %.3fs total, %.3fs idle\n%s\n",
clear_line,
(double)curr_time_us / 1000000.d,
(double)idle_time_us / 1000000.d,
clear_line);
/* header for task list */
dprintf(fd, "%s%4s %*-s %8s %6s %11s %10s %-6s\n",
clear_line,