JDK-6974011 : Sort non-static field during class parsing
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9,10
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2010-08-02
  • Updated: 2019-01-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
It seems, when I pushed next changes I added dead/unused code:
ciInstanceKlass::_non_static_fields and non_static_fields() are not used.

6667620: (Escape Analysis) fix deoptimization for scalar replaced objects

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/52fed2ec0afb

It seems, I was trying to replace existing sorting code in ciInstanceKlass
(_nonstatic_fields and compute_nonstatic_fields()) with unified one which
uses instanceKlass::do_nonstatic_fields() during compilation and deoptimization.

I also promised to implement fields sorting during class parsing but never did it :(.

Vladimir Kozlov wrote:
> Tom Rodriguez wrote:
>>
>> Vladimir Kozlov wrote:
>>> Thank you, Tom
>>>
>>> Tom Rodriguez wrote:
>>>> 6667620: Putting the sorting inside the iterator doesn't seem good to me.  Why can't it just be part of the ci changes?  I guess they could be 
>>>
>>> What do you mean by part of the ci changes? I can't access ci from deoptimizer.
>>
>> So deoptimization also requires the fields to be sorted?  I was assuming it was for the non_static_fields in ciInstanceKlass and could just be done there.
>
> ciInstanceKlass already has fields sorting (added by John some time ago).
> And because of that I need also to do sorting during deoptimization to get
> fields values from debug info (which are sorted based on ciInstanceKlass).
>
> I want to do the non-static fields sorting during a class parsing and
> remove sorting from ciInstanceKlass and InstanceKlass.
> I will file bug for it.
>
> But for now can I push the current change?
>
> Thanks,
> Vladimir

Comments
This is not C2 specific but runtime code which helps with deoptimization.
08-03-2018

Thank you, Vladimir.
16-02-2017

I think it is good starter task. Targeting 10 for now.
15-02-2017