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

Issue 115859: Handle filling up of memory buffer to make log processing in DevTools Profiler easier. (Closed)

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

Description

Handle filling up of memory buffer to make log processing in DevTools Profiler easier. When profiler's memory buffer is filled up, profiling is stopped and it is ensured that the last record in the buffer is "profiler,\"pause\"" thus making the end of profiling session explicit. Otherwise DevTools Profiler would need to guess whether the current profiling session has been stopped. Tested with Chromium. Committed: http://code.google.com/p/v8/source/detail?r=2072

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -17 lines) Patch
M src/log.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/log.cc View 4 chunks +14 lines, -0 lines 0 comments Download
M src/log-utils.h View 8 chunks +31 lines, -5 lines 2 comments Download
M src/log-utils.cc View 7 chunks +39 lines, -6 lines 6 comments Download
M test/cctest/test-log-utils.cc View 5 chunks +30 lines, -6 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mikhail Naganov
11 years, 7 months ago (2009-05-28 11:47:58 UTC) #1
Søren Thygesen Gjesse
LGTM http://codereview.chromium.org/115859/diff/1/2 File src/log-utils.cc (right): http://codereview.chromium.org/115859/diff/1/2#newcode92 Line 92: if (is_sealed_) return 0; Please use {} ...
11 years, 7 months ago (2009-05-28 13:23:35 UTC) #2
Mikhail Naganov
11 years, 7 months ago (2009-05-28 13:52:51 UTC) #3
Thanks!

http://codereview.chromium.org/115859/diff/1/2
File src/log-utils.cc (right):

http://codereview.chromium.org/115859/diff/1/2#newcode92
Line 92: if (is_sealed_) return 0;
On 2009/05/28 13:23:35, Søren Gjesse wrote:
> Please use {} for one line if's.

Done.

http://codereview.chromium.org/115859/diff/1/2#newcode283
Line 283: if (pos_ != Log::Write(Log::message_buffer_, pos_)) {
On 2009/05/28 13:23:35, Søren Gjesse wrote:
> I would suggest the following:
> 
> int written = Log::Write(Log::message_buffer_, pos_);
> if (written != pos_ && write_failure_handler != NULL) {
>   write_failure_handler();
> }

Done. Thanks for noticing.

http://codereview.chromium.org/115859/diff/1/2#newcode291
Line 291: if (len != Log::Write(str, len)) {
On 2009/05/28 13:23:35, Søren Gjesse wrote:
> Ditto.

Done.

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

http://codereview.chromium.org/115859/diff/1/3#newcode207
Line 207: static WriteFailureHandler write_failure_handler;
On 2009/05/28 13:23:35, Søren Gjesse wrote:
> Please make the write_failure_handler member private and add a static setter.

Done.

Powered by Google App Engine
This is Rietveld 408576698