CPU profiler: make code events handling scalable.
authormikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Sat, 22 May 2010 05:27:19 +0000 (05:27 +0000)
committermikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Sat, 22 May 2010 05:27:19 +0000 (05:27 +0000)
commitdecd0fed78e80d5656a5562ce33ea72ae2f0d621
tree93f8649e098b94efdd0ad9e5f597b2f5b539a160
parent2c4828318550abace456c440996be71c6095b00f
CPU profiler: make code events handling scalable.

I changed the implementation of a queue between the VM and processor
thread to be unbounded and lock-free, using Herb Sutter's example from
DDJ article: http://www.ddj.com/high-performance-computing/210604448
This had brought back profiling overhead to a minimum for the page
from Chromium's issue 16184.

BUG=714

Review URL: http://codereview.chromium.org/2091019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
21 files changed:
src/circular-queue-inl.h
src/circular-queue.h
src/cpu-profiler-inl.h
src/cpu-profiler.cc
src/cpu-profiler.h
src/platform-linux.cc
src/platform-macos.cc
src/platform-win32.cc
src/platform.h
src/unbound-queue-inl.h [new file with mode: 0644]
src/unbound-queue.h [new file with mode: 0644]
src/v8.cc
test/cctest/SConscript
test/cctest/test-circular-queue.cc
test/cctest/test-unbound-queue.cc [new file with mode: 0644]
tools/gyp/v8.gyp
tools/v8.xcodeproj/project.pbxproj
tools/visual_studio/v8_base.vcproj
tools/visual_studio/v8_base_arm.vcproj
tools/visual_studio/v8_base_x64.vcproj
tools/visual_studio/v8_cctest.vcproj