diff options
author | Michal Simek <michal.simek@amd.com> | 2022-08-12 10:54:51 +0200 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2022-08-20 18:07:32 -0600 |
commit | 55bc22760c362bba478d449ea7ba59667c4eefe4 (patch) | |
tree | ad4e16441e7a2ffd4e6bfbdc7c18446f27966f45 /common | |
parent | 76a9d96feb6837a411db98a0abde7081f091a21b (diff) | |
download | u-boot-55bc22760c362bba478d449ea7ba59667c4eefe4.zip u-boot-55bc22760c362bba478d449ea7ba59667c4eefe4.tar.gz u-boot-55bc22760c362bba478d449ea7ba59667c4eefe4.tar.bz2 |
bootstage: Show func name for bootstage_mark/error
bootstage_mark() and bootstate_error() are not recording any name and in
report it is showing as id=<value>. That's not useful and it is better to
show function name which calls it.
That's why use macros with passing __func__ as recorded name for bootstage.
Origin report looks like this:
ZynqMP> bootstage report
Timer summary in microseconds (10 records):
Mark Elapsed Stage
0 0 reset
2,482,383 2,482,383 board_init_f
4,278,821 1,796,438 board_init_r
4,825,331 546,510 id=64
4,858,409 33,078 id=65
4,862,382 3,973 main_loop
4,921,713 59,331 usb_start
9,345,345 4,423,632 id=175
When this patch is applied.
ZynqMP> bootstage report
Timer summary in microseconds (31 records):
Mark Elapsed Stage
0 0 reset
2,465,624 2,465,624 board_init_f
4,278,628 1,813,004 board_init_r
4,825,139 546,511 eth_common_init
4,858,228 33,089 eth_initialize
4,862,201 3,973 main_loop
4,921,530 59,329 usb_start
8,885,334 3,963,804 cli_loop
Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/bootstage.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/common/bootstage.c b/common/bootstage.c index 0fd33be..326c40f 100644 --- a/common/bootstage.c +++ b/common/bootstage.c @@ -147,15 +147,9 @@ ulong bootstage_add_record(enum bootstage_id id, const char *name, return mark; } - -ulong bootstage_mark(enum bootstage_id id) -{ - return bootstage_add_record(id, NULL, 0, timer_get_boot_us()); -} - -ulong bootstage_error(enum bootstage_id id) +ulong bootstage_error_name(enum bootstage_id id, const char *name) { - return bootstage_add_record(id, NULL, BOOTSTAGEF_ERROR, + return bootstage_add_record(id, name, BOOTSTAGEF_ERROR, timer_get_boot_us()); } |