RFR: 8252505: C1/C2 compiler support for blackholes [v11]

Aleksey Shipilev shade at redhat.com
Wed Dec 2 14:09:48 UTC 2020


On 12/2/20 1:14 PM, Vladimir Ivanov wrote:
> Considering blackholes don't obey standard calling conventions, it's hard to say where the
> arguments are located in generated code.   It would be nice to enrich `-XX:+PrintOptoAssembly`
> with information about consumed values. `MachNode::format` has access to such information through
> `PhaseRegAlloc* ra` argument.
Yes.

I cannot see how to get the operands registers from the MachCall (which is MachCallBlackhole is now 
a subclass of). It seems to be implied by calling convention. The best I can do so far is to poll 
the types from tf()->domain() of MachCallBlackhole, but that is not very satisfactory.

I.e.:

     case Form::JAVA_BLACKHOLE:
       fprintf(fp, "for (uint i = 0; i < tf()->domain()->cnt() - TypeFunc::Parms; i++) 
tf()->domain()->field_at(i + TypeFunc::Parms)->dump_on(st);");
       break;

I suspect that PhaseRegAlloc* ra does not help here, because it wants Node operands, the same problem...

In fact, I don't think other MachCall* nodes get that data too, for example:

1c1     B16: #  out( B17 ) <- in( B15 )  Freq: 0.369513
1c1     addq    RCX, #-16       # long
1c5     shrq    RCX, #3
1c9     movq    RDI, R11        # spill
1cc     movq    RSI, R9 # spill
1cf     movq    RDX, RCX        # spill
1d2     call_leaf_nofp,runtime  jlong_disjoint_arraycopy
         No JVM State Info

So where do we go from here? Somehow recording the operands of MachCallBlackhole?

-- 
Thanks,
-Aleksey



More information about the hotspot-dev mailing list