Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1580)

Unified Diff: tools/telemetry/telemetry/internal/platform/power_monitor/sysfs_power_monitor.py

Issue 1550803002: Fix log spam when time_in_state file is not available under cpu2/cpu3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Grammar Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/internal/platform/power_monitor/sysfs_power_monitor.py
diff --git a/tools/telemetry/telemetry/internal/platform/power_monitor/sysfs_power_monitor.py b/tools/telemetry/telemetry/internal/platform/power_monitor/sysfs_power_monitor.py
index 8c39a59d3d49453d0b0a9e313bcc201483f2b9e6..2a9bd6048acfeb96412a6d99312e3af2dea5d1ad 100644
--- a/tools/telemetry/telemetry/internal/platform/power_monitor/sysfs_power_monitor.py
+++ b/tools/telemetry/telemetry/internal/platform/power_monitor/sysfs_power_monitor.py
@@ -118,6 +118,11 @@ class SysfsPowerMonitor(power_monitor.PowerMonitor):
for cpu in self._cpus:
cpu_freq_path = os.path.join(
CPU_PATH, cpu, 'cpufreq/stats/time_in_state')
+ if not self._platform.PathExists(cpu_freq_path):
+ logging.warning(
+ 'Cannot read cpu frequency times for %s due to %s not existing'
+ % (cpu, cpu_freq_path))
+ continue
try:
stats[cpu] = self._platform.GetFileContents(cpu_freq_path)
except Exception as e:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698