Implement boot time analysis framework.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-03-19 20:25:09 +01:00
parent e5a2dd7b55
commit e744219bb6
14 changed files with 232 additions and 8 deletions

View file

@ -458,4 +458,24 @@ grub_error_load (const struct grub_error_saved *save)
grub_errno = save->grub_errno;
}
#if BOOT_TIME_STATS
struct grub_boot_time
{
struct grub_boot_time *next;
grub_uint64_t tp;
const char *file;
int line;
char *msg;
};
extern struct grub_boot_time *EXPORT_VAR(grub_boot_time_head);
void EXPORT_FUNC(grub_real_boot_time) (const char *file,
const int line,
const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));
#define grub_boot_time(fmt, args...) grub_real_boot_time(GRUB_FILE, __LINE__, fmt, ## args)
#else
#define grub_boot_time(fmt, args...)
#endif
#endif /* ! GRUB_MISC_HEADER */