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

Unified Diff: tools/run_perf.py

Issue 1996923002: [tools] Make cpu-governor flip more robust in perf runner (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months 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/run_perf.py
diff --git a/tools/run_perf.py b/tools/run_perf.py
index 1dd03bd5379aaff6dfeacf72092e5b7a4dba0f30..2db71d4e24b69a2e230d694cbc6dfa2c05b5d01f 100755
--- a/tools/run_perf.py
+++ b/tools/run_perf.py
@@ -856,8 +856,10 @@ class CustomMachineConfiguration:
try:
with open("/sys/devices/system/cpu/present", "r") as f:
indexes = f.readline()
- first, last = map(int, indexes.split("-"))
- return range(first, last + 1)
+ r = map(int, indexes.split("-"))
+ if len(r) == 1:
+ return range(r[0], r[0] + 1)
+ return range(r[0], r[1] + 1)
except Exception as e:
print "Failed to retrieve number of CPUs."
raise 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