Closed Bug 1807030 Opened 3 years ago Closed 3 years ago

Linux power profiles show extremely low values

Categories

(Core :: Gecko Profiler, defect, P1)

defect

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox108 --- unaffected
firefox109 --- unaffected
firefox110 --- fixed

People

(Reporter: florian, Assigned: rzvncj)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

mozregression points to bug 1794941 being the cause.

Example profile without the bug: https://share.firefox.dev/3vdBJvA
Example profile with the bug: https://share.firefox.dev/3VnW0ZH

https://searchfox.org/mozilla-central/rev/e6b709df9b93858364f02ab89f40d78762693db8/tools/profiler/core/PowerCounters-linux.cpp

// > users must then scale back: count * 1/(1e9*2^32) to get Joules
#define PERF_EVENT_SCALE_NANOJOULES 2.3283064365386962890625e-1

Note the 1e9 factor there.

After bug 1794941, we read the scale from the "/sys/bus/event_source/devices/power/events/energy-{type}.scale" file, which typically contains:
2.3283064365386962890625e-10
This is 1/(2^32).

Flags: needinfo?(drobertson)

Set release status flags based on info from the regressing bug 1794941

While at it, decrease the size of the GetRaplPerfEventConfig()
buffer to the minimum required length (as discussed in a
previous review).

Also, the logging of the read and final values is now more
generous (to aid with future debugging).

Assignee: nobody → rzvncj
Status: NEW → ASSIGNED

(In reply to Florian Quèze [:florian] from comment #0)

Note the 1e9 factor there.

Good catch!

Flags: needinfo?(drobertson)
Pushed by drobertson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1672a1e0a261 Correct final perf event scale magnitude. r=dlrobertson
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: