diff options
author | Jonas Aaberg <jonas.aberg@stericsson.com> | 2010-09-06 12:56:31 +0200 |
---|---|---|
committer | Michael BRANDT <michael.brandt@stericsson.com> | 2010-09-16 15:22:47 +0200 |
commit | e8c699eb1f7a50b4f10024c41b8c86f907233f8d (patch) | |
tree | f62d922897024c83990e54398c05a1531d1bf786 /include/boottime.h | |
parent | f1f51a277554486f3f46e9a4c16e9a2c78e730de (diff) |
boottime: Enable boot time measurements.
This patch enables boot time measurements for u-boot. It also
includes minor updates as well.
Change-Id: I993c9ad4fa5dab62df2c0a88454a7546d9565d21
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/4610
Reviewed-by: Robert ROSENGREN <robert.rosengren@stericsson.com>
Reviewed-by: Michael BRANDT <michael.brandt@stericsson.com>
Diffstat (limited to 'include/boottime.h')
-rw-r--r-- | include/boottime.h | 44 |
1 files changed, 37 insertions, 7 deletions
diff --git a/include/boottime.h b/include/boottime.h index 95f039170..b48696bde 100644 --- a/include/boottime.h +++ b/include/boottime.h @@ -28,17 +28,47 @@ struct boottime_entry { u8 name[BOOTTIME_MAX_NAME_LEN]; }; -#ifdef CONFIG_BOOTTIME +/** + * boottime_tag() + * Add a sample point with a name now. Shall be called before function "name" + * is executed. + * @name: Sample point name. + */ void boottime_tag(char *name); -void boottime_remove_last(void); + +/** + * boottime_get_entry() + * + * Loads a boottime measure point information. + * @i: boottime measurement point entry. + * + * Returns a boottime entry. NULL, if not existing. + */ struct boottime_entry *boottime_get_entry(unsigned int i); + +/** + * boottime_idle_get() + * + * Returns the amount of time in us that has been spent idling. + */ unsigned long boottime_idle_get(void); + +/** + * boottime_idle_done() + * + * Returns the total time since start in us. + */ unsigned long boottime_idle_done(void); + +/** + * boottime_idle_add() + * + * This function shall be added to all delay() functions. + * The delay time input to delay() shall be provided to this + * function as well. It is used to calculate average load + * during boot. + * @time: time in us. + */ void boottime_idle_add(unsigned long time); -#else -#define boottime_tag(x) -#define boottime_remove_last() -#define boottime_idle_add(x) -#endif #endif |