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

Issue 10961042: Implement committed physical memory stats for Linux. (Closed)

Created:
8 years, 3 months ago by alph
Modified:
8 years, 2 months ago
CC:
v8-dev
Visibility:
Public.

Description

Implement committed physical memory stats for Linux. The patch introduces CommittedPhysicalMemory function to the Heap class that reports committed *physical* memory acquired from the OS. It is important because some OSes may postpone actual commitment on e.g. first access to the previously committed region. So reporting just plain committed size led to various weird artifacts like DevTools showing V8 allocated memory higher than the whole process private size. BUG=v8:2191 Committed: https://code.google.com/p/v8/source/detail?r=12625

Patch Set 1 #

Patch Set 2 : Fix formatting. #

Total comments: 13

Patch Set 3 : Addressing comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -0 lines) Patch
M include/v8.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M src/api.cc View 1 2 3 chunks +3 lines, -0 lines 0 comments Download
M src/heap.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/heap.cc View 1 chunk +14 lines, -0 lines 0 comments Download
M src/platform.h View 1 chunk +8 lines, -0 lines 0 comments Download
M src/platform-cygwin.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M src/platform-freebsd.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M src/platform-linux.cc View 1 chunk +18 lines, -0 lines 0 comments Download
M src/platform-macos.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M src/platform-nullos.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M src/platform-openbsd.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M src/platform-solaris.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M src/platform-win32.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M src/spaces.h View 1 5 chunks +15 lines, -0 lines 0 comments Download
M src/spaces.cc View 1 2 4 chunks +44 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
alph-g
8 years, 3 months ago (2012-09-21 14:11:31 UTC) #1
Vyacheslav Egorov (Google)
https://chromiumcodereview.appspot.com/10961042/diff/2001/src/heap.cc File src/heap.cc (right): https://chromiumcodereview.appspot.com/10961042/diff/2001/src/heap.cc#newcode215 src/heap.cc:215: size_t Heap::CommittedPhysicalMemory() { This function might still return a ...
8 years, 3 months ago (2012-09-21 14:29:06 UTC) #2
alph-g
On 2012/09/21 14:29:06, Vyacheslav Egorov (Google) wrote: > https://chromiumcodereview.appspot.com/10961042/diff/2001/src/heap.cc > File src/heap.cc (right): > > ...
8 years, 3 months ago (2012-09-21 14:40:55 UTC) #3
Yang
https://chromiumcodereview.appspot.com/10961042/diff/2001/src/heap.h File src/heap.h (right): https://chromiumcodereview.appspot.com/10961042/diff/2001/src/heap.h#newcode490 src/heap.h:490: size_t CommittedPhysicalMemory(); Any reason why this is a size_t ...
8 years, 3 months ago (2012-09-24 14:05:35 UTC) #4
alph-g
https://chromiumcodereview.appspot.com/10961042/diff/2001/src/heap.h File src/heap.h (right): https://chromiumcodereview.appspot.com/10961042/diff/2001/src/heap.h#newcode490 src/heap.h:490: size_t CommittedPhysicalMemory(); On 2012/09/24 14:05:35, Yang wrote: > Any ...
8 years, 3 months ago (2012-09-24 14:09:59 UTC) #5
Michael Starzinger
One additional round of comments. https://codereview.chromium.org/10961042/diff/2001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/10961042/diff/2001/include/v8.h#newcode2769 include/v8.h:2769: size_t committed_physical_size() { return ...
8 years, 2 months ago (2012-09-27 09:46:15 UTC) #6
alph
PTAL https://codereview.chromium.org/10961042/diff/2001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/10961042/diff/2001/include/v8.h#newcode2769 include/v8.h:2769: size_t committed_physical_size() { return committed_physical_size_; } On 2012/09/27 ...
8 years, 2 months ago (2012-09-27 12:51:13 UTC) #7
Michael Starzinger
8 years, 2 months ago (2012-09-27 13:13:28 UTC) #8
LGTM. I'll land that for you.

https://codereview.chromium.org/10961042/diff/2001/src/spaces.cc
File src/spaces.cc (right):

https://codereview.chromium.org/10961042/diff/2001/src/spaces.cc#newcode2731
src/spaces.cc:2731: while (current != NULL) {
On 2012/09/27 12:51:13, alph wrote:
> On 2012/09/27 09:46:16, Michael Starzinger wrote:
> > Can we use LargeObjectIterator for this iteration?
> 
> I'm not sure. It returns not a page, but a HeapObject from each page.

You are right, my bad.

Powered by Google App Engine
This is Rietveld 408576698