ANDROID: cpuhp/pause: add trace points for pause and resume

Add a tracepoint for pause and resume which measures the
duration of time to perform the entire operation, the
cpus acted upon with this event, and the current state
of the active cpu mask.  This should be sufficient
for testing pause performance.

Bug: 175959069
Change-Id: I9fc269c7d09ac78ec31612d3c552044b72b0e6e3
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
This commit is contained in:
Stephen Dickey
2020-12-22 16:22:43 -08:00
committed by Todd Kjos
parent db9f954eed
commit 614afa949c
2 changed files with 32 additions and 0 deletions

View File

@@ -1135,6 +1135,9 @@ int pause_cpus(struct cpumask *cpus)
{
int err = 0;
int cpu;
u64 start_time = 0;
start_time = sched_clock();
cpu_maps_update_begin();
@@ -1232,6 +1235,8 @@ err_cpus_write_unlock:
err_cpu_maps_update:
cpu_maps_update_done();
trace_cpuhp_pause(cpus, start_time, 1);
return err;
}
EXPORT_SYMBOL_GPL(pause_cpus);
@@ -1240,6 +1245,9 @@ int resume_cpus(struct cpumask *cpus)
{
unsigned int cpu;
int err = 0;
u64 start_time = 0;
start_time = sched_clock();
cpu_maps_update_begin();
@@ -1298,6 +1306,8 @@ err_cpus_write_unlock:
err_cpu_maps_update:
cpu_maps_update_done();
trace_cpuhp_pause(cpus, start_time, 0);
return err;
}
EXPORT_SYMBOL_GPL(resume_cpus);