Lines Matching refs:wakelock_stats

79 static wakelock_stats_t wakelock_stats;  variable
212 if (wakelock_stats.is_acquired) { in wakelock_cleanup()
242 wakelock_stats.is_acquired = false; in reset_wakelock_stats()
243 wakelock_stats.acquired_count = 0; in reset_wakelock_stats()
244 wakelock_stats.released_count = 0; in reset_wakelock_stats()
245 wakelock_stats.acquired_errors = 0; in reset_wakelock_stats()
246 wakelock_stats.released_errors = 0; in reset_wakelock_stats()
247 wakelock_stats.min_acquired_interval_ms = 0; in reset_wakelock_stats()
248 wakelock_stats.max_acquired_interval_ms = 0; in reset_wakelock_stats()
249 wakelock_stats.last_acquired_interval_ms = 0; in reset_wakelock_stats()
250 wakelock_stats.total_acquired_interval_ms = 0; in reset_wakelock_stats()
251 wakelock_stats.last_acquired_timestamp_ms = 0; in reset_wakelock_stats()
252 wakelock_stats.last_released_timestamp_ms = 0; in reset_wakelock_stats()
253 wakelock_stats.last_reset_timestamp_ms = now_ms(); in reset_wakelock_stats()
270 wakelock_stats.acquired_errors++; in update_wakelock_acquired_stats()
271 wakelock_stats.last_acquired_error = acquired_status; in update_wakelock_acquired_stats()
274 if (wakelock_stats.is_acquired) { in update_wakelock_acquired_stats()
278 wakelock_stats.is_acquired = true; in update_wakelock_acquired_stats()
279 wakelock_stats.acquired_count++; in update_wakelock_acquired_stats()
280 wakelock_stats.last_acquired_timestamp_ms = just_now_ms; in update_wakelock_acquired_stats()
300 wakelock_stats.released_errors++; in update_wakelock_released_stats()
301 wakelock_stats.last_released_error = released_status; in update_wakelock_released_stats()
304 if (!wakelock_stats.is_acquired) { in update_wakelock_released_stats()
308 wakelock_stats.is_acquired = false; in update_wakelock_released_stats()
309 wakelock_stats.released_count++; in update_wakelock_released_stats()
310 wakelock_stats.last_released_timestamp_ms = just_now_ms; in update_wakelock_released_stats()
313 uint64_t delta_ms = just_now_ms - wakelock_stats.last_acquired_timestamp_ms; in update_wakelock_released_stats()
314 if (delta_ms < wakelock_stats.min_acquired_interval_ms || in update_wakelock_released_stats()
315 wakelock_stats.released_count == 1) { in update_wakelock_released_stats()
316 wakelock_stats.min_acquired_interval_ms = delta_ms; in update_wakelock_released_stats()
318 if (delta_ms > wakelock_stats.max_acquired_interval_ms) { in update_wakelock_released_stats()
319 wakelock_stats.max_acquired_interval_ms = delta_ms; in update_wakelock_released_stats()
321 wakelock_stats.last_acquired_interval_ms = delta_ms; in update_wakelock_released_stats()
322 wakelock_stats.total_acquired_interval_ms += delta_ms; in update_wakelock_released_stats()
335 uint64_t last_interval_ms = wakelock_stats.last_acquired_interval_ms; in wakelock_debug_dump()
336 uint64_t min_interval_ms = wakelock_stats.min_acquired_interval_ms; in wakelock_debug_dump()
337 uint64_t max_interval_ms = wakelock_stats.max_acquired_interval_ms; in wakelock_debug_dump()
340 if (wakelock_stats.is_acquired) { in wakelock_debug_dump()
341 delta_ms = just_now_ms - wakelock_stats.last_acquired_timestamp_ms; in wakelock_debug_dump()
347 wakelock_stats.total_acquired_interval_ms + delta_ms; in wakelock_debug_dump()
349 if (wakelock_stats.acquired_count > 0) in wakelock_debug_dump()
350 avg_interval_ms = total_interval_ms / wakelock_stats.acquired_count; in wakelock_debug_dump()
354 wakelock_stats.is_acquired ? "true" : "false"); in wakelock_debug_dump()
356 wakelock_stats.acquired_count, wakelock_stats.released_count); in wakelock_debug_dump()
358 wakelock_stats.acquired_errors, wakelock_stats.released_errors); in wakelock_debug_dump()
360 wakelock_stats.last_acquired_error, in wakelock_debug_dump()
361 wakelock_stats.last_released_error); in wakelock_debug_dump()
372 wakelock_stats.last_reset_timestamp_ms)); in wakelock_debug_dump()