[9] RFR(L): 8034812: remove IDX_INIT macro hack in Node class
Vladimir Kozlov
vladimir.kozlov at oracle.com
Fri May 16 17:59:00 UTC 2014
6219945 1% speedup was mostly due to replacing virtual methods with Node's new fields checks (_class_id, _flags).
We still need to avoid excessive Compile::current() usage because it has big call stack to get value. I agreed to
current clean up after Christian showed no compilation performance difference on sparc.
Vladimir
On 5/16/14 9:07 AM, John Rose wrote:
> On May 16, 2014, at 8:58 AM, John Rose <john.r.rose at oracle.com <mailto:john.r.rose at oracle.com>> wrote:
>
>> On May 15, 2014, at 2:27 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com <mailto:vladimir.kozlov at oracle.com>> wrote:
>>
>>> Changes are fine but I am concern about compilation speed.
>>> Please, test compilation performance (-XX:+TimeCompiler) on x86 and sparc. You need to build optimized VM for that to
>>> exclude assert but keep statistic code. I would suggest to run one of nashorn octane benchmarks with -Xcomp
>>> -XX:-TieredCompilation to get compilation with big graphs.
>>
>> A little software archeology brings up some of the history behind the "new(N,C)" hack:
>>
>> D 1.156 05/06/29 16:29:14 vkozlov 258 257
>> 6219945: C2 virtual methods cleanup. Reduce calls Compile::current().
>> https://bugs.openjdk.java.net/browse/JDK-6219945
>>
>> So it's been 9 years; do we still want to reduce calls to Compile::current()? As a wild guess, it could cause a 1%
>> regression in compile speed.
>>
>> — John
>
> P.S. The IDX_INIT trick comes from this delta:
> D 1.212 05/12/01 13:25:41 jrose 374 372
> 6175499 Stick contextual annotations onto newly-created nodes.
> (Also, remove a frequent call to Compile::current().)
> https://bugs.openjdk.java.net/browse/JDK-6175499
>
> The "frequent call" was in the Node::Node constructors:
>
> <<<
> Node::Node( Node *n0 )
> : _out(NO_OUT_ARRAY),
> _cnt(1),
> _max(1),
> _outcnt(0),
> _outmax(0),
> _idx( Compile::current()->next_unique() ),
> _class_id(Class_Node),
> _flags(0) {
> ***
> Node::Node(Node *n0)
> : _idx(IDX_INIT(1))
> {
> >>>
>
More information about the hotspot-compiler-dev
mailing list