• yurys@chromium.org's avatar
    Add sanity test for CPU profiler · c7ce87f8
    yurys@chromium.org authored
    The new test checks full CPU profiling cycle: using public
    V8 API it starts profiling, executes a script, stops profiling
    and analyzes collected profile to check that its top-down
    tree has expected strutcture. The script that is being profiled
    is guaranteed to run > 200ms to make sure enough samples
    are collected.
    
    To avoid possible flakiness due to non-deterministic time required
    to start new thread on varios OSs when Sampler and ProfilerEventsProcessor
    threads are being started the main thread is blocked until the threads
    are running.
    
    Also I removed the heuristic in profile-generator.cc where we try
    to figure out if the value on top of the sampled stack is return address
    of some frameless stub invocation. The code periodically gives false positive
    with the new test ending up in an extra node in the collected cpu profile.
    After discussion with jkummerow@ we concluded that the logic is too fragile
    and that we can address frameless stub invocations in a more reliable way
    later should they have a noticeable effect on cpu profiling.
    
    BUG=None
    
    Review URL: https://codereview.chromium.org/13627002
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14205 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    c7ce87f8
platform-cygwin.cc 22 KB