summaryrefslogtreecommitdiff
path: root/compiler/optimizing/inliner.cc
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2021-10-12 13:11:29 +0100
committer Santiago Aboy Solanes <solanes@google.com> 2021-10-12 13:55:05 +0000
commit1558048c31b90ff5b3baf611d4dd70c1a003adfb (patch)
tree0d4eb1b5ac1464edc1e679f065bd5b9e432a8567 /compiler/optimizing/inliner.cc
parent5cbb0a9658e4c3a906139df2d1cf5b929d989faf (diff)
Add stats for last step inlining of invokes
Add kInlinedLastInvoke(VirtualOrInterface) which counts the amount of invokes we inlined on the parent-most method. This is useful to know since it is the invoke that matters the most. The other inlinings are about recursive inlinings but those will not get into the graph if the last invoke fails to be inlined. Change-Id: I4d293864033c950477f50149fd0318c501dcfb6f
Diffstat (limited to 'compiler/optimizing/inliner.cc')
-rw-r--r--compiler/optimizing/inliner.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 6331a70dd5..3abbbae573 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -469,6 +469,9 @@ bool HInliner::TryInline(HInvoke* invoke_instruction) {
/* do_rtp= */ true);
if (result) {
MaybeRecordStat(stats_, MethodCompilationStat::kInlinedInvokeVirtualOrInterface);
+ if (outermost_graph_ == graph_) {
+ MaybeRecordStat(stats_, MethodCompilationStat::kInlinedLastInvokeVirtualOrInterface);
+ }
} else {
HInvoke* invoke_to_analyze = nullptr;
if (TryDevirtualize(invoke_instruction, actual_method, &invoke_to_analyze)) {
@@ -1483,6 +1486,9 @@ bool HInliner::TryBuildAndInline(HInvoke* invoke_instruction,
LOG_SUCCESS() << method->PrettyMethod();
MaybeRecordStat(stats_, MethodCompilationStat::kInlinedInvoke);
+ if (outermost_graph_ == graph_) {
+ MaybeRecordStat(stats_, MethodCompilationStat::kInlinedLastInvoke);
+ }
return true;
}