forked from clearlinux-pkgs/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0113-fix-initcall-timestamps.patch
42 lines (35 loc) · 1.27 KB
/
0113-fix-initcall-timestamps.patch
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
From 2d08a233a1dd6eef3979f6d09b03cfcb66db7b0e Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <[email protected]>
Date: Thu, 2 Jun 2016 23:36:32 -0500
Subject: [PATCH 113/126] fix initcall timestamps
Print more finegrained initcall timings
use the tsc instead of the jiffies clock for initcall_debug
---
init/main.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/init/main.c b/init/main.c
index 7da935ad2d12..d1ba883d3382 100644
--- a/init/main.c
+++ b/init/main.c
@@ -795,16 +795,16 @@ __setup("initcall_blacklist=", initcall_blacklist);
static int __init_or_module do_one_initcall_debug(initcall_t fn)
{
- ktime_t calltime, delta, rettime;
+ unsigned long long calltime, delta, rettime;
unsigned long long duration;
int ret;
- printk(KERN_DEBUG "calling %pF @ %i\n", fn, raw_smp_processor_id());
- calltime = ktime_get();
+ printk(KERN_DEBUG "calling %pF @ %i\n", fn, task_pid_nr(current));
+ calltime = local_clock();
ret = fn();
- rettime = ktime_get();
- delta = ktime_sub(rettime, calltime);
- duration = (unsigned long long) ktime_to_ns(delta) >> 10;
+ rettime = local_clock();
+ delta = rettime - calltime;
+ duration = delta >> 10;
printk(KERN_DEBUG "initcall %pF returned %d after %lld usecs\n",
fn, ret, duration);
--
2.15.0