New issue
Advanced search Search tips

Issue 768518 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

Add command line tool to dump power/energy consumption on Intel via MSR registers

Project Member Reported by mcasas@chromium.org, Sep 25 2017

Issue description

Intel architecture has fancy power/energy counters under the 
RAPL (Running Average Power Limits) category since the Sandy
Bridge architecture. 

It'd be cool to be able to dump these results from the command
line for development e.g. via a new power_manager/tools entry.

The concrete MSRs regs reference can be found in "Sec. 14.9.2 
RAPL Domains and Platform Specificity" of the "Intel 64 and 
IA-32 Architectures Software Developer’s Manual Volume 3B: 
System Programming Guide, Part 2" [1].                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                               
 [1] https://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-vol-3b-part-2-manual.html 
 

Comment 1 by mcasas@chromium.org, Sep 27 2017

Status: Started (was: Unconfirmed)
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/91a110cc8ae6c5d280e4fb39169e1178e7d359d8

commit 91a110cc8ae6c5d280e4fb39169e1178e7d359d8
Author: Miguel Casas-Sanchez <mcasas@chromium.org>
Date: Thu Oct 05 17:36:14 2017

power: add a command line utility for dumping RAPL power consumption values

This CL adds a command line utility dump_intel_rapl_consumption that
reads, translates and dumps average power consumption for a few
power domains for intel processors. It is based on the RAPL (Running
Average Power Limits).

The output looks:

dump_intel_rapl_consumption --interval_ms=1000  --repeat
       pkg        pp0        gfx       dram  (Note: 'pkg' includes 'pp0' and 'gfx'. Values in Watts)
  4.381981   0.343206   3.338998   0.508157
  4.416957   0.359501   3.340286   0.535071
...

which nicely complements the value of power_supply_info, i.e.
 power_supply_info = pkg + dram + stuff

where |stuff|'s larger contributing factor is usually the screen
(which in turn depends on the brightness).

BUG= chromium:768518 
TEST=run dump_intel_rapl_consumption from an intel Kaby Lake device

Example running a video full screen
https://docs.google.com/spreadsheets/d/1XNXEE-EmAs3bJD20YcpHqjtiBeiopshDpf_m8aCipkg/edit#gid=0

Change-Id: If048ddfb2e3de43ad936bb0b94e9048582b69657
Signed-off-by: Miguel Casas-Sanchez <mcasas@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/687394
Commit-Ready: Miguel Casas <mcasas@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[add] https://crrev.com/91a110cc8ae6c5d280e4fb39169e1178e7d359d8/power_manager/tools/dump_intel_rapl_consumption.cc
[modify] https://crrev.com/91a110cc8ae6c5d280e4fb39169e1178e7d359d8/power_manager/power_manager.gyp
[modify] https://crrev.com/91a110cc8ae6c5d280e4fb39169e1178e7d359d8/common-mk/common.gypi

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/ff1dfe0a81ba97843048f2033601d28da4a4308a

commit ff1dfe0a81ba97843048f2033601d28da4a4308a
Author: Miguel Casas-Sanchez <mcasas@chromium.org>
Date: Tue Oct 10 14:21:17 2017

power_manager: Add dump_intel_rapl_consumption, only for |use amd64|

BUG= chromium:768518 
TEST=run dump_intel_rapl_consumption from an intel Kaby Lake device

CQ-DEPEND=CL:687394

Change-Id: I7b8a7b3ecfda44028f823d70869de6d1d2891d1c
Reviewed-on: https://chromium-review.googlesource.com/690519
Commit-Ready: Miguel Casas <mcasas@chromium.org>
Tested-by: Miguel Casas <mcasas@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>

[modify] https://crrev.com/ff1dfe0a81ba97843048f2033601d28da4a4308a/chromeos-base/power_manager/power_manager-9999.ebuild

Comment 4 by mcasas@chromium.org, Oct 10 2017

Status: Fixed (was: Started)

Comment 5 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 6 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)

Sign in to add a comment