• yurys@chromium.org's avatar
    Send SIGPROF signals on the profiler event processor thread · dc9b8176
    yurys@chromium.org authored
    The patch is based on the previous one that was rolled out: https://code.google.com/p/v8/source/detail?r=12985
    
    On Linux sampling for CPU profiler is initiated on the profiler event processor thread, other platforms to follow.
    
    CPU profiler continues to use SamplingCircularQueue, we will replave it with a single sample buffer when Mac and Win ports support profiling on the event processing thread.
    
    When --prof option is specified profiling is initiated either on the profiler event processor thread if CPU profiler is on or on the  SignalSender thread as it used to if no CPU profiles are being collected.
    
    ProfilerEventsProcessor::ProcessEventsAndDoSample now waits in a tight loop, processing collected samples until sampling interval expires. To save CPU resources I'm planning to change that to use nanosleep as only one sample is expected in the queue at any point.
    
    BUG=v8:2364
    
    Review URL: https://codereview.chromium.org/12321046
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    dc9b8176
platform-cygwin.cc 22.1 KB