|
[turbofan] Collect invocation counts and compute relative call frequencies.
Add a notion of "invocation count" to the baseline compilers, which
increment a special slot in the TypeFeedbackVector for each invocation
of a given function (the optimized code doesn't currently collect this
information).
Use this invocation count to relativize the call counts on the call
sites within the function, so that the inlining heuristic has a view
of relative importance of a call site rather than some absolute numbers
with unclear meaning for the current function. Also apply the call site
frequency as a factor to all frequencies in the inlinee by passing this
to the graph builders so that the importance of a call site in an
inlinee is relative to the topmost optimized function.
Note that all functions that neither have literals nor need type
feedback slots will share a single invocation count cell in the
canonical empty type feedback vector, so their invocation count is
meaningless, but that doesn't matter since we only use the invocation
count to relativize call counts within the function, which we only have
if we have at least one type feedback vector (the CallIC slot).
See the design document for additional details on this change:
https://docs.google.com/document/d/1VoYBhpDhJC4VlqMXCKvae-8IGuheBGxy32EOgC2LnT8
BUG= v8:5267, v8:5372
R=mvstanton@chromium.org,rmcilroy@chromium.org,mstarzinger@chromium.org
Committed: https://crrev.com/c7d7ca361dd1ba399becd54ce0d9c6e53f76c870
Cr-Commit-Position: refs/heads/master@{#39410}
Total comments: 7
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1907 lines, -1701 lines) |
Patch |
 |
M |
src/builtins/arm/builtins-arm.cc
|
View
|
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/builtins/arm64/builtins-arm64.cc
|
View
|
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/builtins/ia32/builtins-ia32.cc
|
View
|
|
1 chunk |
+7 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/builtins/mips/builtins-mips.cc
|
View
|
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/builtins/mips64/builtins-mips64.cc
|
View
|
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/builtins/x64/builtins-x64.cc
|
View
|
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/compiler/ast-graph-builder.h
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/compiler/ast-graph-builder.cc
|
View
|
1
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
src/compiler/bytecode-graph-builder.h
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
src/compiler/bytecode-graph-builder.cc
|
View
|
1
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
src/compiler/js-inlining.cc
|
View
|
|
2 chunks |
+8 lines, -2 lines |
0 comments
|
Download
|
 |
M |
src/compiler/pipeline.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
src/full-codegen/arm/full-codegen-arm.cc
|
View
|
1
|
1 chunk |
+14 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/full-codegen/arm64/full-codegen-arm64.cc
|
View
|
1
|
1 chunk |
+14 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/full-codegen/ia32/full-codegen-ia32.cc
|
View
|
1
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/full-codegen/mips/full-codegen-mips.cc
|
View
|
1
|
1 chunk |
+14 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/full-codegen/mips64/full-codegen-mips64.cc
|
View
|
1
|
1 chunk |
+14 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/full-codegen/x64/full-codegen-x64.cc
|
View
|
1
|
1 chunk |
+12 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/heap/heap.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
src/heap/heap.cc
|
View
|
|
1 chunk |
+18 lines, -1 line |
0 comments
|
Download
|
 |
M |
src/profiler/heap-snapshot-generator.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
src/type-feedback-vector.h
|
View
|
1
|
4 chunks |
+10 lines, -3 lines |
0 comments
|
Download
|
 |
M |
src/type-feedback-vector.cc
|
View
|
1
|
2 chunks |
+9 lines, -1 line |
0 comments
|
Download
|
 |
M |
src/type-feedback-vector-inl.h
|
View
|
|
1 chunk |
+6 lines, -8 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/ArrayLiterals.golden
|
View
|
|
2 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden
|
View
|
|
6 chunks |
+24 lines, -24 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/BasicBlockToBoolean.golden
|
View
|
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/BasicLoops.golden
|
View
|
|
16 chunks |
+53 lines, -53 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden
|
View
|
|
2 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/CallGlobal.golden
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/CallNew.golden
|
View
|
|
4 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden
|
View
|
|
5 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden
|
View
|
|
5 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/CompoundExpressions.golden
|
View
|
|
5 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/Conditional.golden
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/ContextVariables.golden
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/CountOperators.golden
|
View
|
|
11 chunks |
+20 lines, -20 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/CreateArguments.golden
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/CreateRestParameter.golden
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/DeclareGlobals.golden
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/DoExpression.golden
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/ForIn.golden
|
View
|
|
4 chunks |
+12 lines, -12 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/ForOf.golden
|
View
|
|
12 chunks |
+56 lines, -56 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/FunctionLiterals.golden
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/Generators.golden
|
View
|
|
5 chunks |
+13 lines, -13 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/GlobalCompoundExpressions.golden
|
View
|
|
2 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/GlobalCountOperators.golden
|
View
|
|
4 chunks |
+12 lines, -12 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/GlobalDelete.golden
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/IfConditions.golden
|
View
|
|
5 chunks |
+13 lines, -13 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/JumpsRequiringConstantWideOperands.golden
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/LoadGlobal.golden
|
View
|
|
4 chunks |
+133 lines, -133 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/LogicalExpressions.golden
|
View
|
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden
|
View
|
|
5 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/PrimitiveExpressions.golden
|
View
|
|
11 chunks |
+11 lines, -11 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/PropertyCall.golden
|
View
|
|
4 chunks |
+138 lines, -138 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/PropertyLoads.golden
|
View
|
|
7 chunks |
+266 lines, -266 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/PropertyStores.golden
|
View
|
|
11 chunks |
+528 lines, -528 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/RegExpLiterals.golden
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/RemoveRedundantLdar.golden
|
View
|
|
3 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/StoreGlobal.golden
|
View
|
|
6 chunks |
+264 lines, -264 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/Switch.golden
|
View
|
|
8 chunks |
+17 lines, -17 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/TopLevelObjectLiterals.golden
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/Typeof.golden
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden
|
View
|
|
7 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/bytecode_expectations/WideRegisters.golden
|
View
|
|
4 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
 |
M |
test/cctest/interpreter/test-interpreter.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/cctest/test-compiler.cc
|
View
|
|
1 chunk |
+23 lines, -0 lines |
0 comments
|
Download
|
 |
M |
test/cctest/test-feedback-vector.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 17 (7 generated)
|