• yurys@chromium.org's avatar
    Skip samples where top function's stack frame is not setup properly · 69c2f54d
    yurys@chromium.org authored
    Stack iterator takes return address based on the frame pointer (ebp) and detects JS frames based on value at fp + StandardFrameConstants::kMarkerOffset. So in order the iterator to work correctly this values should be already setup for the current function. Stack frame is constructed at the very beginning of JS function code and destroyed before return. If sample is taken before before the frame construction is completed or after it was destroyed the stack iterator will wrongly think that FP points at the current functions frame base and will skip callers frame. To avoid this we mark code ranges where  stack frame doesn't exist and completely ignore such samples.
    
    This fixes cctest/test-cpu-profiler/CollectCpuProfile flakiness.
    
    BUG=v8:2628
    R=jkummerow@chromium.org
    
    Review URL: https://codereview.chromium.org/14253015
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    69c2f54d
log.h 19.4 KB