Review request for JDK-8139270: Drastically reduce memory footprint of ChainedCallSite

Attila Szegedi attila.szegedi at oracle.com
Fri Oct 9 16:47:33 UTC 2015


Thanks, folks.

However, Sundar asked if I could maybe remove the dependency on Unsafe. This got me further thinking about this and I realized that thread safety is actually not a requirement here, as race conditions are nonfatal (they can lead to some repeated linking), and the strategies we could adopt for resolving them would have their own problems (e.g. same method linked twice in the chain if linked councurrently on two threads). I explained my reasoning in more detail in <https://bugs.openjdk.java.net/browse/JDK-8139270?focusedCommentId=13852334&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13852334 <https://bugs.openjdk.java.net/browse/JDK-8139270?focusedCommentId=13852334&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13852334>>

I uploaded a new webrev to: <http://cr.openjdk.java.net/~attila/8139270/webrev.jdk9-01 <http://cr.openjdk.java.net/~attila/8139270/webrev.jdk9-01>>, please review this one as well.

It removes the “volatile” keyword from “invocations” and no longer uses any CAS, just overwrites the field value. test262parallel runs just fine; it is one of those tests that do concurrent relinking in the test harness code.

Thanks,
  Attila.



> On Oct 9, 2015, at 4:20 PM, Marcus Lagergren <marcus at lagergren.net> wrote:
> 
> +1
> 
>> On 09 Oct 2015, at 13:50, Attila Szegedi <attila.szegedi at oracle.com> wrote:
>> 
>> Please review JDK-8139270 "Drastically reduce memory footprint of ChainedCallSite" at <http://cr.openjdk.java.net/~attila/8139270/webrev.jdk9> for <https://bugs.openjdk.java.net/browse/JDK-8139270>
>> 
>> Thanks,
>> Attila.
> 



More information about the nashorn-dev mailing list