RFR(S) : 8011971 : WB API doesn't accept j.l.reflect.Constructor

Christian Thalinger christian.thalinger at oracle.com
Sun Apr 14 22:50:43 PDT 2013


On Apr 12, 2013, at 1:14 PM, Igor Ignatyev <igor.ignatyev at oracle.com> wrote:

> > Could you explain why you need j.l.reflect.Constructor in WB compiler
> > tests? As java coding exercise it may be good (I am lost in it). But how
> > it helps to JIT compiler testing?
> we have plan to create replacement of current CTW. main goal is to make available using CTW in product build. but it must be equals to current implementation in terms of functionality. since CTW compile constructor, we also must to compile constructor. so we need api for that.

Interesting.  I just pushed a Java CTW implementation to Graal:

http://cr.openjdk.java.net/~twisti/GRAAL-218/

It (almost) does the same as the implementation in C++.  Somewhere I'm dropping a couple compiles on the floor but I haven't investigated why (probably class initialization or constant pool pre-loading).

-- Chris

> 
> > Do you know about 'comments' in a code? :)
> yes. i know, but i think that all is clear and self-documented :)
> but if you insist, i can add javadoc to all public and protected methods/fields.
> 
> > Why do you need to set dontinline in costructor?
> > Would be better explicitly call new method from CompilerWhiteBoxTest
> > class when needed:
> >
> > setDontInlineMethod() {
> >    WHITE_BOX.testSetDontInlineMethod(method, true);
> > }
> i need to set dontinline in constructor to prevent inlining of 'method' into others methods (fix for 8008211).
> 
> Best regards,
> Igor Ignatyev
> 
> On 04/12/2013 11:39 PM, Vladimir Kozlov wrote:
>> Igor,
>> 
>> Could you explain why you need j.l.reflect.Constructor in WB compiler
>> tests? As java coding exercise it may be good (I am lost in it). But how
>> it helps to JIT compiler testing?
>> 
>> Do you know about 'comments' in a code? :)
>> 
>> Using argument 'true' say nothing what it does since the corresponding
>> code is in different class file:
>> 
>> +        super(testCase, true);
>> 
>> Why do you need to set dontinline in costructor?
>> Would be better explicitly call new method from CompilerWhiteBoxTest
>> class when needed:
>> 
>> setDontInlineMethod() {
>>   WHITE_BOX.testSetDontInlineMethod(method, true);
>> }
>> 
>> Regards,
>> Vladimir
>> 
>> On 4/12/13 8:29 AM, Igor Ignatyev wrote:
>>> Hi all,
>>> 
>>> Please review patch.
>>> 
>>> 1. changed signature of all methods where j.l.reflect.Method is used
>>> 2. added tests which use j.l.reflect.Constructor
>>> 
>>> webrev: http://cr.openjdk.java.net/~iignatyev/8011971/webrev.00/
>>> jbs: https://jbs.oracle.com/bugs/browse/JDK-8011971



More information about the hotspot-compiler-dev mailing list