Add rudimentary queue profiler

ETH IRQ and mip_poll() can both write to the queue, so if a memcpy() is interrupted we might see some weird records.
This commit is contained in:
Sergio R. Caprile committed 2022-09-07 17:14:03 -03:00
1 parent f4def36ccb
commit 313fddf722
5 files changed
+144

No files matched your search

+3
View File
@@ -139,6 +139,9 @@ static bool mip_driver_stm32_up(void *userdata) {
void ETH_IRQHandler(void);
void ETH_IRQHandler(void) {
#ifdef MIP_QPROFILE
qp_mark(QP_IRQTRIGGERED, 0);
#endif
volatile uint32_t sr = ETH->DMASR;
if (sr & BIT(6)) { // Frame received, loop
for (uint32_t i = 0; i < ETH_DESC_CNT; i++) {