Reviewers: loislo, Jakob, Yang,

Description:
Support higher CPU profiler sampling rate on posix systems

New flag is added that allows to specify CPU profiler sampling rate in
microseconds as command line argument. It was tested to work fine with 100us
interval(currently it is 1ms). Default values are kept the same as in the
current implementation. The new implementation is enabled only on POSIX
platforms which use signals to collect samples. Other platforms that pause
thread being sampled are to follow.

SIGPROF signals are now sent on the profiler event processor thread to make sure
that the processing thread does fall far behind the sampling.

The patch is based on the previous one that was rolled out in r13851. The main
difference is that the circular queue is not modified for now.

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 probably replace 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 be 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

Please review this at https://codereview.chromium.org/21101002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/cpu-profiler.h
  M src/cpu-profiler.cc
  M src/flag-definitions.h
  M src/profile-generator.h
  M src/sampler.h
  M src/sampler.cc
  M test/cctest/test-cpu-profiler.cc


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to