summaryrefslogtreecommitdiff
path: root/kernel/sched
diff options
context:
space:
mode:
authorOlav Haugan <ohaugan@codeaurora.org>2016-06-12 13:57:05 -0700
committerOlav Haugan <ohaugan@codeaurora.org>2016-09-24 10:59:42 -0700
commit0a17b36a20d65df27ccf2de068ea517b19f6a53f (patch)
tree183d90e0b0203d8d35f89e825a2f73f45e5c0d2a /kernel/sched
parente33c24bfecde67d7d665bfcf90c7d4c2f231be79 (diff)
sched/core: Add trace point for cpu isolation
Add tracepoint to capture the cpu isolation event including KPI for time it took to isolate. Change-Id: If2d30000f068afc50db953940f4636ef6a089b24 Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/core.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index cddb0073c5fb..7b7f1961fd10 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5645,6 +5645,10 @@ int sched_isolate_cpu(int cpu)
struct rq *rq = cpu_rq(cpu);
cpumask_t avail_cpus;
int ret_code = 0;
+ u64 start_time;
+
+ if (trace_sched_isolate_enabled())
+ start_time = sched_clock();
lock_device_hotplug();
@@ -5681,6 +5685,8 @@ int sched_isolate_cpu(int cpu)
out:
unlock_device_hotplug();
+ trace_sched_isolate(cpu, cpumask_bits(cpu_isolated_mask)[0],
+ start_time, 1);
return ret_code;
}
@@ -5694,6 +5700,10 @@ int sched_unisolate_cpu_unlocked(int cpu)
{
int ret_code = 0;
struct rq *rq = cpu_rq(cpu);
+ u64 start_time;
+
+ if (trace_sched_isolate_enabled())
+ start_time = sched_clock();
lock_device_hotplug_assert();
@@ -5730,6 +5740,8 @@ int sched_unisolate_cpu_unlocked(int cpu)
}
out:
+ trace_sched_isolate(cpu, cpumask_bits(cpu_isolated_mask)[0],
+ start_time, 0);
return ret_code;
}