Perform CPU sampling by CPU sampling thread only iff processing thread is not running.
authorjkummerow@chromium.org <jkummerow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 16 Nov 2012 10:38:10 +0000 (10:38 +0000)
committerjkummerow@chromium.org <jkummerow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 16 Nov 2012 10:38:10 +0000 (10:38 +0000)
commit7f824867f66068de7fe2cea2f67bfcef904cb84e
treef1966a3c53a895f14280547e133dc8ce3664e225
parentb6c9bdaa9ec5e842e01f2c1e3b2f74ac664b21cd
Perform CPU sampling by CPU sampling thread only iff processing thread is not running.

- perform CPU profiler sampling in the sampler thread as we used to;
- skip sampling in the sampling thread if processing thread is running;
- only install SIGPROF handler when CPU profiling is enabled.

BUG=v8:2364

Review URL: https://codereview.chromium.org/11231002
Patch from Sergey Rogulenko <rogulenko@google.com> and Andrey Kosyakov <caseq@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
14 files changed:
src/cpu-profiler-inl.h
src/cpu-profiler.cc
src/cpu-profiler.h
src/flag-definitions.h
src/platform-cygwin.cc
src/platform-freebsd.cc
src/platform-linux.cc
src/platform-macos.cc
src/platform-nullos.cc
src/platform-openbsd.cc
src/platform-solaris.cc
src/platform-win32.cc
src/platform.h
test/cctest/test-cpu-profiler.cc