Correctly report callstack when current function is FunctionCall builtin
authoryurys@chromium.org <yurys@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 2 Jul 2013 07:51:09 +0000 (07:51 +0000)
committeryurys@chromium.org <yurys@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 2 Jul 2013 07:51:09 +0000 (07:51 +0000)
commit4c5508b42f273bdb64f6b9e7a108cee9b481d567
tree22dee17f76fa2fdfbf8bb428100f09323a3b737d
parent75bb6b9ed80d9cd5909f7faf6fbbe1b5668d9d44
Correctly report callstack when current function is FunctionCall builtin

When current function is FunctionCall builtin we have no reliable way to determine its caller function (in many cases the top of the sampled stack contains address of the caller but sometimes it does not). Instead of dropping the sample or its two top frames we simply mark the caller frame as '(unresolved function)'. It seems like a better approach that dropping whole sample as knowing the top function and the rest of the stack the user should be able to figure out what the caller was.

This change adds builtin id to CodeEntry objects. It will be used later to add similar top frame analysis for FunctionApply and probably other builtins.

BUG=None
TBR=loislo@chromium.org

Review URL: https://codereview.chromium.org/18422003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/cpu-profiler-inl.h
src/cpu-profiler.cc
src/cpu-profiler.h
src/profile-generator-inl.h
src/profile-generator.cc
src/profile-generator.h
test/cctest/test-cpu-profiler.cc