1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
From 3a1512b4ed3922f88936b95731aaff706e7286a9 Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Wed, 11 Feb 2015 16:05:23 -0600
Subject: [PATCH 114/124] bootstats: add printk's to measure boot time in more
detail
Few distro-tweaks to add printk's to visualize boot time better
Author: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
---
arch/x86/kernel/alternative.c | 4 ++++
drivers/base/firmware_class.c | 2 ++
init/main.c | 2 +-
kernel/kmod.c | 2 ++
4 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 5cb272a7a5a3..d28fb7aae4ce 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -626,7 +626,9 @@ void __init alternative_instructions(void)
* patching.
*/
+ printk("clr: Applying alternatives\n");
apply_alternatives(__alt_instructions, __alt_instructions_end);
+ printk("clr: Applying alternatives done\n");
#ifdef CONFIG_SMP
/* Patch to UP if other cpus not imminent. */
@@ -637,6 +639,8 @@ void __init alternative_instructions(void)
_text, _etext);
}
+ printk("clr: Applying alternatives smp done\n");
+
if (!uniproc_patched || num_possible_cpus() == 1)
free_init_pages("SMP alternatives",
(unsigned long)__smp_locks,
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index a95e1e572697..b29467031be6 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -1224,6 +1224,8 @@ request_firmware(const struct firmware **firmware_p, const char *name,
{
int ret;
+ printk("clr: request_firmware: %s\n", name);
+
/* Need to pin this module until return */
__module_get(THIS_MODULE);
ret = _request_firmware(firmware_p, name, device, NULL, 0,
diff --git a/init/main.c b/init/main.c
index 2858be732f6d..f1d8c3fdbf05 100644
--- a/init/main.c
+++ b/init/main.c
@@ -751,7 +751,7 @@ static int __init_or_module do_one_initcall_debug(initcall_t fn)
unsigned long long duration;
int ret;
- printk(KERN_DEBUG "calling %pF @ %i\n", fn, task_pid_nr(current));
+ printk(KERN_DEBUG "calling %pF @ %i\n", fn, raw_smp_processor_id());
calltime = ktime_get();
ret = fn();
rettime = ktime_get();
diff --git a/kernel/kmod.c b/kernel/kmod.c
index 0277d1216f80..dc5a6edd3895 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -76,6 +76,8 @@ static int call_modprobe(char *module_name, int wait)
NULL
};
+ printk("clr: call_modprobe: %s %i \n", module_name, wait);
+
char **argv = kmalloc(sizeof(char *[5]), GFP_KERNEL);
if (!argv)
goto out;
--
2.11.1
|