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

Issue 115814: Implement a dynamically growing memory log buffer with an upper limit. (Closed)

Created:
11 years, 7 months ago by Mikhail Naganov
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Implement a dynamically growing memory log buffer with an upper limit. The goal of this change is to allow longer profiling sessions and preserve memory when profiler isn't started. The buffer starts with 64K and grows until it reaches the upper limit, which is currently set to 50MB --- according to my evaluations, this is enough for at least 20 minutes of GMail profiling. As we're planning to introduce compression for the profiler log, this time boundary will be significantly increased soon. To make possible unit testing of the new component, I've factored out Logger's utility classes into a separate source file: log-utils.h/cc. Log and LogMessageBuilder are moved there from log.cc without any semantical changes. Committed: http://code.google.com/p/v8/source/detail?r=2067

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+608 lines, -308 lines) Patch
M src/SConscript View 1 chunk +8 lines, -8 lines 0 comments Download
M src/log.cc View 2 chunks +1 line, -298 lines 0 comments Download
A src/log-utils.h View 1 chunk +188 lines, -0 lines 2 comments Download
A src/log-utils.cc View 1 chunk +265 lines, -0 lines 4 comments Download
M test/cctest/SConscript View 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/test-log.cc View 1 chunk +1 line, -0 lines 0 comments Download
A test/cctest/test-log-utils.cc View 1 chunk +108 lines, -0 lines 2 comments Download
M tools/gyp/v8.gyp View 3 chunks +4 lines, -2 lines 0 comments Download
M tools/v8.xcodeproj/project.pbxproj View 5 chunks +8 lines, -0 lines 0 comments Download
M tools/visual_studio/v8_base.vcproj View 1 chunk +8 lines, -0 lines 0 comments Download
M tools/visual_studio/v8_base_arm.vcproj View 1 chunk +8 lines, -0 lines 0 comments Download
M tools/visual_studio/v8_cctest.vcproj View 1 chunk +4 lines, -0 lines 0 comments Download
M tools/visual_studio/v8_cctest_arm.vcproj View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mikhail Naganov
11 years, 7 months ago (2009-05-27 10:38:32 UTC) #1
Søren Thygesen Gjesse
LGTM http://codereview.chromium.org/115814/diff/1/3 File src/log-utils.cc (right): http://codereview.chromium.org/115814/diff/1/3#newcode43 Line 43: blocks_[0] = NewArray<char>(block_size_); Maybe add a private ...
11 years, 7 months ago (2009-05-27 12:00:40 UTC) #2
Mikhail Naganov
11 years, 7 months ago (2009-05-28 07:05:35 UTC) #3
http://codereview.chromium.org/115814/diff/1/3
File src/log-utils.cc (right):

http://codereview.chromium.org/115814/diff/1/3#newcode43
Line 43: blocks_[0] = NewArray<char>(block_size_);
On 2009/05/27 12:00:40, Søren Gjesse wrote:
> Maybe add a private method AllocateBlock.

Done.

http://codereview.chromium.org/115814/diff/1/3#newcode93
Line 93: blocks_[++block_index_] = NewArray<char>(block_size_);
On 2009/05/27 12:00:40, Søren Gjesse wrote:
> Ditto.

Done.

http://codereview.chromium.org/115814/diff/1/4
File src/log-utils.h (right):

http://codereview.chromium.org/115814/diff/1/4#newcode49
Line 49: // filled is returned, it is <= that 'buf_size'.
On 2009/05/27 12:00:40, Søren Gjesse wrote:
> Remove that

Done.

http://codereview.chromium.org/115814/diff/1/7
File test/cctest/test-log-utils.cc (right):

http://codereview.chromium.org/115814/diff/1/7#newcode16
Line 16: // Writes ref_buffer.length chars into dynabuf.
On 2009/05/27 12:00:40, Søren Gjesse wrote:
> Please add to comment that this also actually fills the ref_buffer before
> writing it to the dynabuf.

Done.

Powered by Google App Engine
This is Rietveld 408576698