diff options
Diffstat (limited to 'patches/boot_time_opt/0113-fix-initcall-timestamps.patch')
-rw-r--r-- | patches/boot_time_opt/0113-fix-initcall-timestamps.patch | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/patches/boot_time_opt/0113-fix-initcall-timestamps.patch b/patches/boot_time_opt/0113-fix-initcall-timestamps.patch deleted file mode 100644 index 724129a..0000000 --- a/patches/boot_time_opt/0113-fix-initcall-timestamps.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From 2d08a233a1dd6eef3979f6d09b03cfcb66db7b0e Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Thu, 2 Jun 2016 23:36:32 -0500 | ||
4 | Subject: [PATCH 113/126] fix initcall timestamps | ||
5 | |||
6 | Print more finegrained initcall timings | ||
7 | |||
8 | use the tsc instead of the jiffies clock for initcall_debug | ||
9 | --- | ||
10 | init/main.c | 12 ++++++------ | ||
11 | 1 file changed, 6 insertions(+), 6 deletions(-) | ||
12 | |||
13 | diff --git a/init/main.c b/init/main.c | ||
14 | index 7da935ad2d12..d1ba883d3382 100644 | ||
15 | --- a/init/main.c | ||
16 | +++ b/init/main.c | ||
17 | @@ -795,16 +795,16 @@ __setup("initcall_blacklist=", initcall_blacklist); | ||
18 | |||
19 | static int __init_or_module do_one_initcall_debug(initcall_t fn) | ||
20 | { | ||
21 | - ktime_t calltime, delta, rettime; | ||
22 | + unsigned long long calltime, delta, rettime; | ||
23 | unsigned long long duration; | ||
24 | int ret; | ||
25 | |||
26 | - printk(KERN_DEBUG "calling %pF @ %i\n", fn, raw_smp_processor_id()); | ||
27 | - calltime = ktime_get(); | ||
28 | + printk(KERN_DEBUG "calling %pF @ %i\n", fn, task_pid_nr(current)); | ||
29 | + calltime = local_clock(); | ||
30 | ret = fn(); | ||
31 | - rettime = ktime_get(); | ||
32 | - delta = ktime_sub(rettime, calltime); | ||
33 | - duration = (unsigned long long) ktime_to_ns(delta) >> 10; | ||
34 | + rettime = local_clock(); | ||
35 | + delta = rettime - calltime; | ||
36 | + duration = delta >> 10; | ||
37 | printk(KERN_DEBUG "initcall %pF returned %d after %lld usecs\n", | ||
38 | fn, ret, duration); | ||
39 | |||
40 | -- | ||
41 | 2.15.0 | ||
42 | |||