• yurys@chromium.org's avatar
    Fix call stack sampling for the case when native callback invokes JS function · 97f8f91b
    yurys@chromium.org authored
    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
    
    Review URL: https://codereview.chromium.org/19775017
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    97f8f91b
test-api.cc 665 KB