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

Issue 2495003004: [Mac] Report statistics more regularly in Mac memory pressure monitor (Closed)

Created:
4 years, 1 month ago by lgrey
Modified:
4 years ago
CC:
chromium-reviews, oshima+watch_chromium.org, lcwu+watch_chromium.org, gavinp+memory_chromium.org, halliwell+watch_chromium.org, mac-reviews_chromium.org, alokp+watch_chromium.org, davemoore+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Mac] Report statistics more regularly in Mac memory pressure monitor Currently, we only report UMA statistics on receiving a pressure change event from the system. This means that we could be missing many ticks of "normal" pressure from sessions that never encounter pressure, skewing our stats. Other platforms don't have this issue since they poll. This change piggybacks statistic reporting on GetCurrentPressureLevel() which is called regularly by RendererFrameManager::GetMaxNumberOfSavedFrames() This also allows us to enable reporting for Sierra. To make this work, GetCurrentPressureLevel is now declared non-const. There don't appear to be any const MemoryPressureMonitors in the codebase at the moment, so this should be safe. BUG=655304 Committed: https://crrev.com/f518237b7651d1eeb115bffcc51f11ee0e9078cc Cr-Commit-Position: refs/heads/master@{#434660}

Patch Set 1 #

Patch Set 2 : Fix parameter name in header #

Total comments: 4

Patch Set 3 : Use std::modf #

Patch Set 4 : Report in 5 second ticks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -32 lines) Patch
M base/memory/memory_pressure_monitor.h View 1 chunk +1 line, -1 line 0 comments Download
M base/memory/memory_pressure_monitor_chromeos.h View 1 chunk +1 line, -1 line 0 comments Download
M base/memory/memory_pressure_monitor_chromeos.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/memory/memory_pressure_monitor_mac.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M base/memory/memory_pressure_monitor_mac.cc View 1 2 3 3 chunks +42 lines, -22 lines 0 comments Download
M base/memory/memory_pressure_monitor_win.h View 1 chunk +1 line, -1 line 0 comments Download
M base/memory/memory_pressure_monitor_win.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/resource_reporter/resource_reporter_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chromecast/browser/cast_memory_pressure_monitor.h View 1 chunk +1 line, -1 line 0 comments Download
M chromecast/browser/cast_memory_pressure_monitor.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 29 (13 generated)
lgrey
PTAL :)
4 years, 1 month ago (2016-11-14 18:21:36 UTC) #10
Mark Mentovai
https://codereview.chromium.org/2495003004/diff/20001/base/memory/memory_pressure_monitor_mac.cc File base/memory/memory_pressure_monitor_mac.cc (right): https://codereview.chromium.org/2495003004/diff/20001/base/memory/memory_pressure_monitor_mac.cc#newcode47 base/memory/memory_pressure_monitor_mac.cc:47: last_statistic_report_(CFAbsoluteTimeGetCurrent()), Is this an OK initial value? It’s not ...
4 years, 1 month ago (2016-11-14 19:12:16 UTC) #11
lgrey
https://codereview.chromium.org/2495003004/diff/20001/base/memory/memory_pressure_monitor_mac.cc File base/memory/memory_pressure_monitor_mac.cc (right): https://codereview.chromium.org/2495003004/diff/20001/base/memory/memory_pressure_monitor_mac.cc#newcode47 base/memory/memory_pressure_monitor_mac.cc:47: last_statistic_report_(CFAbsoluteTimeGetCurrent()), On 2016/11/14 19:12:15, Mark Mentovai wrote: > Is ...
4 years, 1 month ago (2016-11-14 19:23:52 UTC) #12
lgrey
Ping :)
4 years, 1 month ago (2016-11-18 15:32:22 UTC) #13
Mark Mentovai
No need to wait that long to ping! LGTM.
4 years, 1 month ago (2016-11-18 15:36:35 UTC) #14
lgrey
I'm very embarrassed to say I didn't actually make the ticks 5 seconds, so: updated. ...
4 years, 1 month ago (2016-11-18 17:14:54 UTC) #15
Mark Mentovai
LGTM
4 years, 1 month ago (2016-11-18 17:26:11 UTC) #16
lgrey
Thanks, Mark! Jayson, PTAL and let me know if this works for you.
4 years, 1 month ago (2016-11-18 17:42:58 UTC) #17
shrike
lgtm
4 years, 1 month ago (2016-11-18 21:56:43 UTC) #18
lgrey
On 2016/11/18 21:56:43, shrike wrote: > lgtm Thanks! + afakhry@ for ChromeOS resource reporter and ...
4 years, 1 month ago (2016-11-18 22:03:28 UTC) #19
lgrey
4 years, 1 month ago (2016-11-18 22:03:46 UTC) #21
afakhry
resource_reporter_unittest.cc lgtm
4 years, 1 month ago (2016-11-18 22:32:04 UTC) #22
halliwell
On 2016/11/18 22:32:04, afakhry wrote: > resource_reporter_unittest.cc lgtm chromecast/ lgtm
4 years, 1 month ago (2016-11-18 23:32:42 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2495003004/60001
4 years ago (2016-11-28 15:04:44 UTC) #25
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years ago (2016-11-28 15:52:27 UTC) #27
commit-bot: I haz the power
4 years ago (2016-11-28 15:53:55 UTC) #29
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/f518237b7651d1eeb115bffcc51f11ee0e9078cc
Cr-Commit-Position: refs/heads/master@{#434660}

Powered by Google App Engine
This is Rietveld 408576698