Index: head/sys/boot/Makefile.amd64 =================================================================== --- head/sys/boot/Makefile.amd64 (revision 241063) +++ head/sys/boot/Makefile.amd64 (working copy) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR+= efi +#SUBDIR+= efi SUBDIR+= zfs -SUBDIR+= userboot +#SUBDIR+= userboot Index: head/sys/boot/common/bootstrap.h =================================================================== --- head/sys/boot/common/bootstrap.h (revision 241063) +++ head/sys/boot/common/bootstrap.h (working copy) @@ -322,6 +322,7 @@ struct arch_switch void (*arch_zfs_probe)(void); }; extern struct arch_switch archsw; +extern uint64_t timestats(void); /* This must be provided by the MD code, but should it be in the archsw? */ void delay(int delay); Index: head/sys/boot/common/boot.c =================================================================== --- head/sys/boot/common/boot.c (revision 241063) +++ head/sys/boot/common/boot.c (working copy) @@ -102,6 +102,7 @@ command_boot(int argc, char *argv[]) if (archsw.arch_autoload() != 0) return(CMD_ERROR); + printf("\nLoader consumed time: %llu\n", timestats()); /* Call the exec handler from the loader matching the kernel */ file_formats[fp->f_loader]->l_exec(fp); return(CMD_ERROR); Index: head/sys/boot/i386/loader/main.c =================================================================== --- head/sys/boot/i386/loader/main.c (revision 241063) +++ head/sys/boot/i386/loader/main.c (working copy) @@ -80,11 +80,22 @@ extern char end[]; static void *heap_top; static void *heap_bottom; +uint64_t +timestats(void) +{ + static uint64_t t = 0; + + t = rdtsc() - t; + return (t); +} + int main(void) { int i; + /* Initialize TSC */ + timestats(); /* Pick up arguments */ kargs = (void *)__args; initial_howto = kargs->howto;