summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Menzel <paulepanter@users.sourceforge.net>2015-10-20 10:21:08 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-10-27 17:14:11 +0100
commit662380f157dafdb10015bdcc60bc4e42775c5b7e (patch)
treee5e63dc78c43b6661e58b051c41a2e5f7733dde7
parent990ae7069867085cf42e93cc4d0df26a84c7866f (diff)
downloadcoreboot-662380f157dafdb10015bdcc60bc4e42775c5b7e.tar.gz
coreboot-662380f157dafdb10015bdcc60bc4e42775c5b7e.tar.bz2
coreboot-662380f157dafdb10015bdcc60bc4e42775c5b7e.zip
device: Stop and output time in `scan_bus()`
Output how long it took to scan a bus. Note, that the function `scan_bus()` is called recursively. Change-Id: I6335e10db783f092ea18d3a1c79f93135bee5826 Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-on: http://review.coreboot.org/12103 Tested-by: build bot (Jenkins) Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r--src/device/device.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/device/device.c b/src/device/device.c
index cf418eb4d19a..55a5dfd9acb8 100644
--- a/src/device/device.c
+++ b/src/device/device.c
@@ -909,6 +909,9 @@ int reset_bus(struct bus *bus)
static void scan_bus(struct device *busdev)
{
int do_scan_bus;
+ struct stopwatch sw;
+
+ stopwatch_init(&sw);
if (!busdev->enabled)
return;
@@ -931,6 +934,9 @@ static void scan_bus(struct device *busdev)
}
}
}
+
+ printk(BIOS_DEBUG, "%s: scanning of bus %s took %ld usecs\n",
+ __func__, dev_path(busdev), stopwatch_duration_usecs(&sw));
}
void scan_bridges(struct bus *bus)