From 1558048c31b90ff5b3baf611d4dd70c1a003adfb Mon Sep 17 00:00:00 2001 From: Santiago Aboy Solanes Date: Tue, 12 Oct 2021 13:11:29 +0100 Subject: 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 --- compiler/optimizing/inliner.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler/optimizing/inliner.cc') 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; } -- cgit v1.2.3-59-g8ed1b