RFR(M): 8200303: C2 should leverage profiling for lookupswitch/tableswitch
Roland Westrelin
rwestrel at redhat.com
Fri Apr 6 13:56:02 UTC 2018
Hi Vladimir,
> Roland, did you perform any performance testing?
I ran specjvm2008 to verify that there's no regression with profiling on
and off over the unmodified code. The only noticeable thing is that the
score for Serial improved by ~9% when profiling is enabled. I also have
some micro-benchmarks I wrote to check that the various strategies do
bring an improvement over the current implementation (binary search) in
some scenarios.
>>> I don't understand how the MachIfNode class in the SA is supposed to be
>>> used. I tried dumping a graph that has a MachIfNode from clhsdb and the
>>> MachIfNode shows up as unknown:
>>>
>>> 7 UnknownNode<0x00007fe79787c428> === 9 8 [[ 6 28 ]]
>>> 28 IfFalse === 7 [[ 27 ]]
>>>
>>> So I'm not sure it's worth the trouble of adding a MachJumpNode.
>> I agree. If so, we should fix this altogether (i.e. for existing nodes as well) but I'm not sure if
>> anyone is using graph dumping via the SA.
>
> I think we should fix it - it is good starter task for community.
> Please, file a bug.
What part? The missing MachJumpNode? Or the output from the SA with the
UnknownNode that should be displayed as a MachIfNode instead?
Is the second part that easy? for an If, the class of the MachNode is a
platform specific class that is a subclass of MachIfNode. How would the
SA know it's a subclass of MachIfNode? I suppose the SA finds the class
of an object by looking at the vtable pointer and comparing it with a
list that is exported by vmStructs. That only works for an exact class
check. How do you implement a subclass check?
Roland.
More information about the hotspot-compiler-dev
mailing list