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

Unified Diff: tools/telemetry/telemetry/core/platform/platform_backend.py

Issue 607733002: [telemetry] Detect and correct overflow in Intel energy MSRs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Docstring. Created 6 years, 3 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
Index: tools/telemetry/telemetry/core/platform/platform_backend.py
diff --git a/tools/telemetry/telemetry/core/platform/platform_backend.py b/tools/telemetry/telemetry/core/platform/platform_backend.py
index 2b9ce567cff586adb84ab33b0579b916d231f1d8..a6fb125d0adf3637b7f12eddda5fe86fa23d50e0 100644
--- a/tools/telemetry/telemetry/core/platform/platform_backend.py
+++ b/tools/telemetry/telemetry/core/platform/platform_backend.py
@@ -226,10 +226,16 @@ class PlatformBackend(object):
def StopMonitoringPower(self):
raise NotImplementedError()
- def ReadMsr(self, msr_number):
+ def ReadMsr(self, msr_number, start=0, length=64):
"""Read a CPU model-specific register (MSR).
Which MSRs are available depends on the CPU model.
On systems with multiple CPUs, this function may run on any CPU.
+
+ Args:
+ msr_number: The number of the register to read.
+ start: The least significant bit to read, zero-indexed.
+ (Said another way, the number of bits to right-shift the MSR value.)
+ length: The number of bits to read. MSRs are 64 bits, even on 32-bit CPUs.
"""
raise NotImplementedError()

Powered by Google App Engine
This is Rietveld 408576698