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

Issue 17589022: Do not iterate stack handlers in SafeStackFrameIterator (Closed)

Created:
7 years, 6 months ago by yurys
Modified:
7 years, 5 months ago
Reviewers:
Sven Panne, loislo
CC:
v8-dev, alph
Visibility:
Public.

Description

Do not iterate stack handlers in SafeStackFrameIterator CPU profiler doesn't use stack handlers so there is no need to iterate through them while traversing stack. This change SafeStackFrameIterator always iterate only frames and removes checks corresponding to the handlers iteration. The problem described in the bug occurred because of a false assumption in SafeStackFrameIterator that if Isolate::c_entry_fp is not NULL then the top frame on the stack is always a C++ frame. It is false because we may have entered JS code again, in which case JS_ENTRY code stub generated by JSEntryStub::GenerateBody() will save current c_entry_fp value but not reset it to NULL and after that it will create ENTRY stack frame and JS_ENTRY handler on the stack and put the latter into Isolate::handler(top). This means that if we start iterating from c_entry_fp frame and try to compare the frame's sp with Isolate::handler()->address() it will turn out that frame->sp() > handler->address() and the condition in SafeStackFrameIterator::CanIterateHandles is not held. BUG=252097 R=loislo@chromium.org, svenpanne@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=15348

Patch Set 1 #

Total comments: 2

Patch Set 2 : Strengthened checks in the test as suggested #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -13 lines) Patch
M src/frames.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/frames.cc View 3 chunks +1 line, -12 lines 0 comments Download
M test/cctest/test-cpu-profiler.cc View 1 1 chunk +51 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
yurys
7 years, 6 months ago (2013-06-25 12:53:07 UTC) #1
loislo
lgtm https://codereview.chromium.org/17589022/diff/1/test/cctest/test-cpu-profiler.cc File test/cctest/test-cpu-profiler.cc (right): https://codereview.chromium.org/17589022/diff/1/test/cctest/test-cpu-profiler.cc#newcode962 test/cctest/test-cpu-profiler.cc:962: CheckChildrenNames(root, names); Do you have a guarantee that ...
7 years, 6 months ago (2013-06-25 13:42:43 UTC) #2
yurys
https://codereview.chromium.org/17589022/diff/1/test/cctest/test-cpu-profiler.cc File test/cctest/test-cpu-profiler.cc (right): https://codereview.chromium.org/17589022/diff/1/test/cctest/test-cpu-profiler.cc#newcode962 test/cctest/test-cpu-profiler.cc:962: CheckChildrenNames(root, names); On 2013/06/25 13:42:43, loislo wrote: > Do ...
7 years, 6 months ago (2013-06-26 05:18:11 UTC) #3
Sven Panne
lgtm
7 years, 5 months ago (2013-06-27 09:19:29 UTC) #4
yurys
7 years, 5 months ago (2013-06-27 09:28:47 UTC) #5
Message was sent while issue was closed.
Committed patchset #2 manually as r15348 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698