Browse Source

[intel] Exclude time spent in hypervisor from profiling

When profiling, exclude any time spent inside the hypervisor
responding to our MMIO accesses.  This substantially reduces the
variance accumulated on many other profilers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 10 years ago
parent
commit
abf875a2e5
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/drivers/net/intel.c

+ 3
- 0
src/drivers/net/intel.c View File

496
 		profile_start ( &intel_vm_refill_profiler );
496
 		profile_start ( &intel_vm_refill_profiler );
497
 		writel ( rx_tail, intel->regs + intel->rx.reg + INTEL_xDT );
497
 		writel ( rx_tail, intel->regs + intel->rx.reg + INTEL_xDT );
498
 		profile_stop ( &intel_vm_refill_profiler );
498
 		profile_stop ( &intel_vm_refill_profiler );
499
+		profile_exclude ( &intel_vm_refill_profiler );
499
 	}
500
 	}
500
 }
501
 }
501
 
502
 
634
 	profile_start ( &intel_vm_tx_profiler );
635
 	profile_start ( &intel_vm_tx_profiler );
635
 	writel ( tx_tail, intel->regs + intel->tx.reg + INTEL_xDT );
636
 	writel ( tx_tail, intel->regs + intel->tx.reg + INTEL_xDT );
636
 	profile_stop ( &intel_vm_tx_profiler );
637
 	profile_stop ( &intel_vm_tx_profiler );
638
+	profile_exclude ( &intel_vm_tx_profiler );
637
 
639
 
638
 	DBGC2 ( intel, "INTEL %p TX %d is [%llx,%llx)\n", intel, tx_idx,
640
 	DBGC2 ( intel, "INTEL %p TX %d is [%llx,%llx)\n", intel, tx_idx,
639
 		( ( unsigned long long ) address ),
641
 		( ( unsigned long long ) address ),
728
 	profile_start ( &intel_vm_poll_profiler );
730
 	profile_start ( &intel_vm_poll_profiler );
729
 	icr = readl ( intel->regs + INTEL_ICR );
731
 	icr = readl ( intel->regs + INTEL_ICR );
730
 	profile_stop ( &intel_vm_poll_profiler );
732
 	profile_stop ( &intel_vm_poll_profiler );
733
+	profile_exclude ( &intel_vm_poll_profiler );
731
 	if ( ! icr )
734
 	if ( ! icr )
732
 		return;
735
 		return;
733
 
736
 

Loading…
Cancel
Save