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

Issue 6794019: Simplify isolates access during stack iteration (WAS: Move SafeStackFrameIterator::active_count_...) (Closed)

Created:
9 years, 8 months ago by mnaganov (inactive)
Modified:
9 years, 7 months ago
Reviewers:
Vitaly Repeshko
CC:
v8-dev
Visibility:
Public.

Description

Simplify isolates access during stack iteration (WAS: Move SafeStackFrameIterator::active_count_...) While trying to fix Mac and Windows versions for this change: http://codereview.chromium.org/6771047/, I figured out, that we already store an isolate in StackFrameIterator, so we can use it in frame objects, instead of requiring it from caller. I've changed iterators usage to the following scheme: whenever a caller maintains an isolate pointer, it just passes it to stack iterator, and no more worries about passing it to frame content accessors. If a caller uses current isolate, it can omit passing it to iterator, in this case, an iterator will use the current isolate, too. There was a special case with LiveEdit, which creates detached copies of frame objects. R=vitalyr@chromium.org BUG=none TEST=none Committed: http://code.google.com/p/v8/source/detail?r=7499

Patch Set 1 #

Patch Set 2 : A couple of changes after self-review #

Patch Set 3 : Lint #

Patch Set 4 : A couple more changes #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -101 lines) Patch
M src/accessors.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/compiler.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/cpu-profiler.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M src/debug.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/debug.cc View 5 chunks +5 lines, -5 lines 0 comments Download
M src/execution.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/frames.h View 1 2 14 chunks +40 lines, -19 lines 0 comments Download
M src/frames.cc View 1 21 chunks +59 lines, -29 lines 2 comments Download
M src/frames-inl.h View 1 2 3 4 chunks +29 lines, -5 lines 2 comments Download
M src/isolate.h View 2 chunks +3 lines, -1 line 0 comments Download
M src/liveedit.cc View 2 chunks +6 lines, -5 lines 0 comments Download
M src/log.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/mark-compact.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/runtime.cc View 1 15 chunks +16 lines, -16 lines 0 comments Download
M src/runtime-profiler.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/top.cc View 5 chunks +8 lines, -8 lines 0 comments Download
M src/v8threads.h View 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/test-accessors.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
mnaganov (inactive)
9 years, 8 months ago (2011-04-04 19:31:52 UTC) #1
Vitaly Repeshko
LGTM with the comments addressed. -- Vitaly http://codereview.chromium.org/6794019/diff/2002/src/frames-inl.h File src/frames-inl.h (right): http://codereview.chromium.org/6794019/diff/2002/src/frames-inl.h#newcode97 src/frames-inl.h:97: inline Isolate* ...
9 years, 8 months ago (2011-04-04 20:37:08 UTC) #2
mnaganov (inactive)
9 years, 8 months ago (2011-04-05 08:28:23 UTC) #3
http://codereview.chromium.org/6794019/diff/2002/src/frames-inl.h
File src/frames-inl.h (right):

http://codereview.chromium.org/6794019/diff/2002/src/frames-inl.h#newcode97
src/frames-inl.h:97: inline Isolate* StackFrame::isolate() const {
On 2011/04/04 20:37:08, Vitaly Repeshko wrote:
> I'm not convinced we need this tricky stuff. Usually we only create one frame
> object per type and reuse them while a stack iterator is active, and we don't
> care that much about the memory usage in the live edit case. Please use an
> explicit isolate field.

I agree. I was in a premature optimization mood. Split into two fields.

http://codereview.chromium.org/6794019/diff/2002/src/frames.cc
File src/frames.cc (right):

http://codereview.chromium.org/6794019/diff/2002/src/frames.cc#newcode425
src/frames.cc:425: if (SafeStackFrameIterator::is_active(isolate))
On 2011/04/04 20:37:08, Vitaly Repeshko wrote:
> nit: Format one a single line if fits, use {} otherwise.

Done.

Powered by Google App Engine
This is Rietveld 408576698