Fix CPU profiling for Crankshaft.
authormikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 22 Feb 2011 16:31:24 +0000 (16:31 +0000)
committermikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 22 Feb 2011 16:31:24 +0000 (16:31 +0000)
commit56788625b62244445ab5e99dcef6b8ccb64520fc
tree99e83fb36e8ed0a3053f8ea6db59dbf22144f8ba
parent08377c8449d97ab80a299660f2b6ad77f49af2e4
Fix CPU profiling for Crankshaft.

The main issue was due to multiple recompilations of functions.  Now
code objects are grouped by function using SFI object address.
JSFunction objects are no longer tracked, instead we track SFI object
moves. To pick a correct code version, we now sample return addresses
instead of JSFunction addresses.

tools/{linux|mac|windows}-tickprocessor scripts differentiate
between code optimization states for the same function
(using * and ~ prefixes introduced earlier).

DevTools CPU profiler treats all variants of function code as
a single function.

ll_prof treats each optimized variant as a separate entry, because
it can disassemble each one of them.

tickprocessor.py not updated -- it is deprecated and will be removed.

BUG=v8/1087,b/3178160
TEST=all existing tests pass, including Chromium layout tests

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
24 files changed:
src/compiler.cc
src/compiler.h
src/cpu-profiler-inl.h
src/cpu-profiler.cc
src/cpu-profiler.h
src/handles.cc
src/heap.cc
src/hydrogen.cc
src/log-utils.cc
src/log.cc
src/log.h
src/mark-compact.cc
src/platform.h
src/profile-generator-inl.h
src/profile-generator.cc
src/profile-generator.h
test/cctest/test-cpu-profiler.cc
test/cctest/test-log-stack-tracer.cc
test/cctest/test-log.cc
test/cctest/test-profile-generator.cc
test/mjsunit/tools/tickprocessor-test-func-info.log
tools/ll_prof.py
tools/profile.js
tools/tickprocessor.js