Integrated: 8255742: PrintInlining as compiler directive doesn't print virtual calls
Volker Simonis
simonis at openjdk.java.net
Thu Dec 3 18:05:00 UTC 2020
On Thu, 3 Dec 2020 13:49:02 GMT, Volker Simonis <simonis at openjdk.org> wrote:
> If we set PrintInlining for a specific method only with the help of a compiler directive (e.g. `-XX:CompileCommand="option,Inlining::foo,PrintInlining"`) it won't print virtual calls which can't be inlined. These calls are printed if we use the global `-XX:+PrintInlining` option.
>
> The fix is trivial:
> --- a/src/hotspot/share/opto/doCall.cpp
> +++ b/src/hotspot/share/opto/doCall.cpp
> @@ -357,7 +357,7 @@ CallGenerator* Compile::call_generator(ciMethod* callee, int vtable_index, bool
> // Use a more generic tactic, like a simple call.
> if (call_does_dispatch) {
> const char* msg = "virtual call";
> - if (PrintInlining) print_inlining(callee, jvms->depth() - 1, jvms->bci(), msg);
> + if (C->print_inlining()) print_inlining(callee, jvms->depth() - 1, jvms->bci(), msg);
> C->log_inline_failure(msg);
> return CallGenerator::for_virtual_call(callee, vtable_index);
> } else {
This pull request has now been integrated.
Changeset: d3f3c322
Author: Volker Simonis <simonis at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/d3f3c322
Stats: 101 lines in 2 files changed: 100 ins; 0 del; 1 mod
8255742: PrintInlining as compiler directive doesn't print virtual calls
Reviewed-by: thartmann, kvn
-------------
PR: https://git.openjdk.java.net/jdk/pull/1596
More information about the hotspot-compiler-dev
mailing list