#include <ipxe/iobuf.h>
#include <ipxe/malloc.h>
#include <ipxe/pci.h>
+#include <ipxe/profile.h>
#include "intel.h"
/** @file
*
*/
+/** VM transmit profiler */
+static struct profiler intel_vm_tx_profiler __profiler =
+ { .name = "intel.vm_tx" };
+
+/** VM receive refill profiler */
+static struct profiler intel_vm_refill_profiler __profiler =
+ { .name = "intel.vm_refill" };
+
+/** VM poll profiler */
+static struct profiler intel_vm_poll_profiler __profiler =
+ { .name = "intel.vm_poll" };
+
/******************************************************************************
*
* EEPROM interface
intel->rx_iobuf[rx_idx] = iobuf;
/* Push descriptor to card */
+ profile_start ( &intel_vm_refill_profiler );
writel ( rx_tail, intel->regs + intel->rx.reg + INTEL_xDT );
+ profile_stop ( &intel_vm_refill_profiler );
DBGC2 ( intel, "INTEL %p RX %d is [%llx,%llx)\n", intel, rx_idx,
( ( unsigned long long ) address ),
wmb();
/* Notify card that there are packets ready to transmit */
+ profile_start ( &intel_vm_tx_profiler );
writel ( tx_tail, intel->regs + intel->tx.reg + INTEL_xDT );
+ profile_stop ( &intel_vm_tx_profiler );
DBGC2 ( intel, "INTEL %p TX %d is [%llx,%llx)\n", intel, tx_idx,
( ( unsigned long long ) address ),
uint32_t icr;
/* Check for and acknowledge interrupts */
+ profile_start ( &intel_vm_poll_profiler );
icr = readl ( intel->regs + INTEL_ICR );
+ profile_stop ( &intel_vm_poll_profiler );
if ( ! icr )
return;