Messages in this thread Patch in this message | | | From | jim.cromie@gmail ... | Subject | [PATCH 01/16] init: trivial tweaks to initcall_levels | Date | Sun, 25 Mar 2012 17:25:39 -0600 |
| |
From: Jim Cromie <jim.cromie@gmail.com>
add a pr_info to print current level and level_name of initcall, and number of registered initcalls at that level. This adds 7 lines to dmesg output, like: initlevel:6=device, 172 registered initcalls
Drop "parameters" from initcall_level_names[], it can be added back in the printk where it clarifies things.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com> --- init/main.c | 25 +++++++++++++++---------- 1 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/init/main.c b/init/main.c index 4397158..09f3105 100644 --- a/init/main.c +++ b/init/main.c @@ -723,14 +723,14 @@ static initcall_t *initcall_levels[] __initdata = { }; static char *initcall_level_names[] __initdata = { - "early parameters", - "core parameters", - "postcore parameters", - "arch parameters", - "subsys parameters", - "fs parameters", - "device parameters", - "late parameters", + "early", + "core", + "postcore", + "arch", + "subsys", + "fs", + "device", + "late", }; static int __init ignore_unknown_bootoption(char *param, char *val) @@ -748,7 +748,7 @@ static void __init do_initcall_level(int level) static_command_line, __start___param, __stop___param - __start___param, level, level, - ignore_unknown_bootoption); + &ignore_unknown_bootoption); for (fn = initcall_levels[level]; fn < initcall_levels[level+1]; fn++) do_one_initcall(*fn); @@ -758,8 +758,13 @@ static void __init do_initcalls(void) { int level; - for (level = 0; level < ARRAY_SIZE(initcall_levels) - 1; level++) + for (level = 0; level < ARRAY_SIZE(initcall_levels) - 1; level++) { + pr_info("initlevel:%d=%s, %d registered initcalls\n", + level, initcall_level_names[level], + (int) (initcall_levels[level+1] + - initcall_levels[level])); do_initcall_level(level); + } } /* -- 1.7.7.6
| |