RFR: JDK-8287061: Support for rematerializing scalar replaced objects participating in allocation merges [v10]

Vladimir Ivanov vlivanov at openjdk.org
Thu Apr 27 23:50:56 UTC 2023


On Thu, 27 Apr 2023 23:35:02 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Hi @iwanowww . I finished implementing a version of this like the illustration below (I didn't add a Candidate class). 
>> 
>> 
>> ScopeValue
>>     ObjectValue
>>         ObjectAllocationValue
>>             AutoBoxObjectValue
>>         ObjectMergeValue
>> 
>>  
>> Here are some observations:
>> 
>> - I don't think ObjectMergeValue should be under ObjectValue. The two classes only have two fields in common (_id and _visited). I think it should be a subclass of ScopeValue.
>> - ObjectCandidateValue would need to go under ObjectAllocationValue because it essentially _is_ an ObjectAllocationValue in most aspects.
>> - I didn't add a ObjectCandidateValue class because that class would need to go under ObjectAllocationValue and we would still need to do an "is_object_candidate" before all "is_object_allocation" and we would end up in much the situation that we want to avoid - needing to do is_object_merge before is_object.
>> - It seems the best place to flag an object as candidate is really in ObjectAllocationValue.
>> 
>> What do you think? As I said, I already have the code, if you want I can push it and you take a look.
>
> Can `ObjectCandidateValue` be a wrapper around a `ObjectAllocationValue`?
> 
> It does make sense to separate `ObjectMergeValue` and `ObjectValue`.

I need to to study the code in more details. Seems like I'm missing something important here.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/12897#discussion_r1179798907



More information about the security-dev mailing list