CPUProfiler: Push deopt reason further to ProfileNode.
authorloislo <loislo@chromium.org>
Thu, 12 Feb 2015 13:24:59 +0000 (05:24 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 12 Feb 2015 13:25:17 +0000 (13:25 +0000)
commitce8701b247d3c6604f24f17a90c02d17b4417f54
tree3c6759e4a81719179e7c9efda3533135b6258438
parentb79b985988fd3f9e09dcab506da56a9c269e9149
CPUProfiler: Push deopt reason further to ProfileNode.

1) create beefy RelocInfo table when cpu profiler is active, so if a function
was optimized when profiler was active RelocInfo would get separate DeoptInfo
for the each deopt case.

2) push DeoptInfo from CodeEntry to ProfileNode.
When deopt happens we put the info collected on #1 into CodeEntry and record stack sample.
On the sampling thread we grab the deopt data and append it to the corresponding ProfileNode deopts list.

Sample profile dump.
[Top down]:
    0  (root) 0 #1
    1     29 #2
    5      test 29 #3
    3        opt_function 29 #4
                 deopted at 52 with reason 'not a heap number'
                 deopted at 71 with reason 'division by zero'

BUG=452067
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26615}
22 files changed:
src/arm/assembler-arm.cc
src/arm/lithium-codegen-arm.cc
src/arm64/assembler-arm64.cc
src/arm64/lithium-codegen-arm64.cc
src/cpu-profiler-inl.h
src/deoptimizer.h
src/ia32/assembler-ia32.cc
src/ia32/lithium-codegen-ia32.cc
src/mips/assembler-mips.cc
src/mips/lithium-codegen-mips.cc
src/mips64/assembler-mips64.cc
src/mips64/lithium-codegen-mips64.cc
src/ppc/assembler-ppc.cc
src/ppc/lithium-codegen-ppc.cc
src/profile-generator-inl.h
src/profile-generator.cc
src/profile-generator.h
src/x64/assembler-x64.cc
src/x64/lithium-codegen-x64.cc
src/x87/assembler-x87.cc
src/x87/lithium-codegen-x87.cc
test/cctest/test-cpu-profiler.cc