Paul Menzel has uploaded this change for review.

View Change

arch/x86/tables: Measure table creation times

Change-Id: I99382c5e10c4158a53aa30bd224f3d6bbfc3ecdf
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
---
M src/arch/x86/tables.c
1 file changed, 22 insertions(+), 4 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/38316/1
diff --git a/src/arch/x86/tables.c b/src/arch/x86/tables.c
index 8ecf86d..002728e 100644
--- a/src/arch/x86/tables.c
+++ b/src/arch/x86/tables.c
@@ -23,6 +23,7 @@
#include <string.h>
#include <cbmem.h>
#include <smbios.h>
+#include <timer.h>

static unsigned long write_pirq_table(unsigned long rom_table_end)
{
@@ -198,20 +199,37 @@
{
size_t sz;
unsigned long rom_table_end = 0xf0000;
+ struct stopwatch sw;

/* This table must be between 0x0f0000 and 0x100000 */
- if (CONFIG(GENERATE_PIRQ_TABLE))
+ if (CONFIG(GENERATE_PIRQ_TABLE)) {
+ stopwatch_init_msecs(&sw);
rom_table_end = write_pirq_table(rom_table_end);
+ printk(BIOS_SPEW, "write_pirq_table() took %lu ms\n",
+ stopwatch_duration_msecs(&sw));
+ }

/* The smp table must be in 0-1K, 639K-640K, or 960K-1M */
- if (CONFIG(GENERATE_MP_TABLE))
+ if (CONFIG(GENERATE_MP_TABLE)) {
+ stopwatch_init_msecs(&sw);
rom_table_end = write_mptable(rom_table_end);
+ printk(BIOS_SPEW, "write_mptable() took %lu ms\n",
+ stopwatch_duration_msecs(&sw));
+ }

- if (CONFIG(HAVE_ACPI_TABLES))
+ if (CONFIG(HAVE_ACPI_TABLES)) {
+ stopwatch_init_msecs(&sw);
rom_table_end = write_acpi_table(rom_table_end);
+ printk(BIOS_SPEW, "write_acpi_table() took %lu ms\n",
+ stopwatch_duration_msecs(&sw));
+ }

- if (CONFIG(GENERATE_SMBIOS_TABLES))
+ if (CONFIG(GENERATE_SMBIOS_TABLES)) {
+ stopwatch_init_msecs(&sw);
rom_table_end = write_smbios_table(rom_table_end);
+ printk(BIOS_SPEW, "write_smbios_table() took %lu ms\n",
+ stopwatch_duration_msecs(&sw));
+ }

sz = write_coreboot_forwarding_table(forwarding_table, coreboot_table);


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

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