[coreboot-gerrit] Patch set updated for coreboot: device/pci_device: Measure time for PCI device probing

Paul Menzel (paulepanter@users.sourceforge.net) gerrit at coreboot.org
Sun Oct 25 10:44:54 CET 2015


Paul Menzel (paulepanter at users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12189

-gerrit

commit d0cb5cbe9551adbfb91d447cd34dccd67ef93bc6
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date:   Sun Oct 25 10:31:13 2015 +0100

    device/pci_device: Measure time for PCI device probing
    
    Use a stop watch to measure the time, how long executing the function
    `pci_probe_dev()` in `pci_scan_bus()` took and output the time.
    
    Change-Id: I2bb0669bb5c69ab864a724bf6246d7a93ac8a2ef
    Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
 src/device/pci_device.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index cf2f74f..647852f 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -32,6 +32,7 @@
 #include <stdint.h>
 #include <string.h>
 #include <delay.h>
+#include <timer.h>
 #include <device/cardbus.h>
 #include <device/device.h>
 #include <device/pci.h>
@@ -1112,12 +1113,17 @@ void pci_scan_bus(struct bus *bus, unsigned min_devfn,
 	 */
 	for (devfn = min_devfn; devfn <= max_devfn; devfn++) {
 		struct device *dev;
+		struct stopwatch sw;
 
 		/* First thing setup the device structure. */
 		dev = pci_scan_get_dev(&old_devices, devfn);
 
 		/* See if a device is present and setup the device structure. */
+
+		stopwatch_init(&sw);
 		dev = pci_probe_dev(dev, bus, devfn);
+		printk(BIOS_DEBUG, "%s: pci_probe_dev call for %s took %ld usecs\n",
+			__func__, dev_path(dev), stopwatch_duration_usecs(&sw));
 
 		/*
 		 * If this is not a multi function device, or the device is



More information about the coreboot-gerrit mailing list