From: Park Bumgyu Date: Wed, 11 Apr 2018 03:57:59 +0000 (+0900) Subject: cpuidle: profiler: reset idle-ip statistics X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0cfec2a92dadf742c4bcb14d2d43f637012ccfec;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git cpuidle: profiler: reset idle-ip statistics Change-Id: I2bb9aae929aeae059eb23e2cff03462fe4eb33db Signed-off-by: Park Bumgyu --- diff --git a/drivers/cpuidle/profiler.c b/drivers/cpuidle/profiler.c index 3f1707b2e5f4..580d2ed42fc0 100644 --- a/drivers/cpuidle/profiler.c +++ b/drivers/cpuidle/profiler.c @@ -175,6 +175,10 @@ static s64 profile_time; /* start time of profile */ static ktime_t profile_start_time; +/* idle ip */ +static int idle_ip_stats[4][32]; +extern char *idle_ip_names[4][32]; + static void clear_stats(struct cpuidle_stats *stats) { if (!stats) @@ -199,6 +203,8 @@ static void reset_profile(void) for (i = 0; i < group_idle_state_count; i++) clear_stats(&group_idle_state[i]->stats); + + memset(idle_ip_stats, 0, sizeof(idle_ip_stats)); } static void do_nothing(void *unused) @@ -247,9 +253,6 @@ static void cpuidle_profile_stop(void) /************************************************************************ * IDLE IP * ************************************************************************/ -static int idle_ip_stats[4][32]; -extern char *idle_ip_names[4][32]; - void cpuidle_profile_idle_ip(int index, unsigned int idle_ip) { int i;