Paul Menzel has uploaded this change for review.

View Change

arch/x86/smbios: Measure execution time of `get_smbios_strings()`

Change-Id: I97cfcd0849665b039920083bccfad8349d5de2c1
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
---
M src/arch/x86/smbios.c
1 file changed, 7 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/14/38314/1
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c
index 8cd4518..7de9acb 100644
--- a/src/arch/x86/smbios.c
+++ b/src/arch/x86/smbios.c
@@ -28,6 +28,7 @@
#include <device/pci_ids.h>
#include <device/pci_def.h>
#include <device/pci.h>
+#include <timer.h>
#if CONFIG(CHROMEOS)
#include <vendorcode/google/chromeos/gnvs.h>
#endif
@@ -942,6 +943,7 @@
struct smbios_type11 *t = (struct smbios_type11 *)*current;
int len;
struct device *dev;
+ struct stopwatch sw;

memset(t, 0, sizeof(*t));
t->type = SMBIOS_OEM_STRINGS;
@@ -949,8 +951,12 @@
t->length = len = sizeof(*t) - 2;

for (dev = all_devices; dev; dev = dev->next) {
- if (dev->ops && dev->ops->get_smbios_strings)
+ if (dev->ops && dev->ops->get_smbios_strings) {
+ stopwatch_init_msecs(&sw);
dev->ops->get_smbios_strings(dev, t);
+ printk(BIOS_SPEW, "%s get_smbios_strings took %lu ms\n",
+ dev_path(dev), stopwatch_duration_msecs(&sw));
+ }
}

if (t->count == 0) {

To view, visit change 38314. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I97cfcd0849665b039920083bccfad8349d5de2c1
Gerrit-Change-Number: 38314
Gerrit-PatchSet: 1
Gerrit-Owner: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-MessageType: newchange