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

Issue 19775017: Fix call stack sampling for the case when native callback invokes JS function (Closed)

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

Description

Fix call stack sampling for the case when native callback invokes JS function The SafeStackFrameIterator used by CPU profiler checked if Isolate::c_entry_fp is null and if it is not it would think that the control flow currently is in some native code. This assumption is wrong because the native code could have called a JS function but JSEntryStub would not reset c_entry_fp to NULL in that case. This CL adds a check in SafeStackFrameIterator::IsValidTop for the case when there is a JAVA_SCRIPT frame on top of EXIT frame. Also this CL changes ExternalCallbackScope behavior to provide access to the whole stack of the scope objects instead of only top one. This allowed to provide exact callback names for those EXIT frames where external callbacks are called. Without this change it was possible only for the top most native call. BUG=None R=loislo@chromium.org, yangguo@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=15832

Patch Set 1 #

Patch Set 2 : Removed empty line #

Patch Set 3 : Fixed tests on Simulator #

Total comments: 2

Patch Set 4 : Comments addressed #

Total comments: 2

Patch Set 5 : Comment addressed #

Patch Set 6 : Rebase #

Patch Set 7 : Fixed test failure in debug mode #

Unified diffs Side-by-side diffs Delta from patch set Stats (+321 lines, -26 lines) Patch
M src/frames.h View 1 3 chunks +3 lines, -1 line 0 comments Download
M src/frames.cc View 1 2 3 4 4 chunks +37 lines, -5 lines 0 comments Download
M src/frames-inl.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/isolate.h View 3 chunks +7 lines, -5 lines 0 comments Download
M src/isolate.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/profile-generator.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/sampler.cc View 1 2 3 4 5 6 2 chunks +8 lines, -3 lines 0 comments Download
M src/vm-state.h View 1 2 1 chunk +10 lines, -1 line 0 comments Download
M src/vm-state-inl.h View 1 2 2 chunks +19 lines, -4 lines 0 comments Download
M test/cctest/test-api.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M test/cctest/test-cpu-profiler.cc View 1 chunk +228 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
yurys
7 years, 5 months ago (2013-07-19 19:30:39 UTC) #1
loislo
lgtm https://codereview.chromium.org/19775017/diff/5001/src/frames.cc File src/frames.cc (right): https://codereview.chromium.org/19775017/diff/5001/src/frames.cc#newcode262 src/frames.cc:262: if (!done()) Advance(); if (frame_ == NULL) return; ...
7 years, 5 months ago (2013-07-22 14:18:54 UTC) #2
yurys
https://codereview.chromium.org/19775017/diff/5001/src/frames.cc File src/frames.cc (right): https://codereview.chromium.org/19775017/diff/5001/src/frames.cc#newcode262 src/frames.cc:262: if (!done()) Advance(); On 2013/07/22 14:18:54, loislo wrote: > ...
7 years, 5 months ago (2013-07-22 14:24:08 UTC) #3
yurys
Yang, can you do OWNER review please?
7 years, 5 months ago (2013-07-22 14:24:24 UTC) #4
Yang
LGTM. One comment. https://codereview.chromium.org/19775017/diff/7002/src/frames.cc File src/frames.cc (right): https://codereview.chromium.org/19775017/diff/7002/src/frames.cc#newcode369 src/frames.cc:369: external_callback_scope_ = external_callback_scope_->previous(); If I understood ...
7 years, 5 months ago (2013-07-23 12:15:12 UTC) #5
yurys
https://codereview.chromium.org/19775017/diff/7002/src/frames.cc File src/frames.cc (right): https://codereview.chromium.org/19775017/diff/7002/src/frames.cc#newcode369 src/frames.cc:369: external_callback_scope_ = external_callback_scope_->previous(); On 2013/07/23 12:15:12, Yang wrote: > ...
7 years, 5 months ago (2013-07-23 12:28:22 UTC) #6
Yang
On 2013/07/23 12:28:22, Yury Semikhatsky wrote: > https://codereview.chromium.org/19775017/diff/7002/src/frames.cc > File src/frames.cc (right): > > https://codereview.chromium.org/19775017/diff/7002/src/frames.cc#newcode369 ...
7 years, 5 months ago (2013-07-23 12:34:46 UTC) #7
yurys
7 years, 5 months ago (2013-07-23 15:01:49 UTC) #8
Message was sent while issue was closed.
Committed patchset #7 manually as r15832 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698