RFR: 8255742: PrintInlining as compiler directive doesn't print virtual calls [v2]

Volker Simonis simonis at openjdk.java.net
Thu Dec 3 16:07:13 UTC 2020


> 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 {

Volker Simonis has updated the pull request incrementally with one additional commit since the last revision:

  Fixed copyright year

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1596/files
  - new: https://git.openjdk.java.net/jdk/pull/1596/files/c26db9a1..c888953b

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1596&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1596&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1596.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1596/head:pull/1596

PR: https://git.openjdk.java.net/jdk/pull/1596


More information about the hotspot-compiler-dev mailing list