You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Xiao-Feng Li <xi...@gmail.com> on 2008/01/18 07:47:22 UTC
Re: [jira] Commented: (HARMONY-5399) [drlvm][jit] Enabling arraycopy optimization for primitive types when write barriers are enabled
On Jan 18, 2008 2:30 PM, George Timoshenko (JIRA) <ji...@apache.org> wrote:
>
> [ https://issues.apache.org/jira/browse/HARMONY-5399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12560243#action_12560243 ]
>
> George Timoshenko commented on HARMONY-5399:
> --------------------------------------------
>
> I have one consern.
>
> By the modification of "arraycopyOptimizable" you turn of the both
>
> genArrayCopy and
> genArrayCopyRepMove
>
> optimizations of the arrays of Object types.
>
> BUT the first one, genArrayCopy, does not use REP instruction. It generates a copying loop so it can work with WB.
For array write, it's ok to have only one WB for the whole object. In
my current generational GC design, I use WB actually for object
remembering rather than slot remembering. So one WB for the whole
arraycopy is enough.
(Well, write barrier support in DRLVM needs cleanup thenafter.)
Thanks,
xiaofeng
>
> > [drlvm][jit] Enabling arraycopy optimization for primitive types when write barriers are enabled
> > ------------------------------------------------------------------------------------------------
> >
> > Key: HARMONY-5399
> > URL: https://issues.apache.org/jira/browse/HARMONY-5399
> > Project: Harmony
> > Issue Type: Improvement
> > Environment: All
> > Reporter: Aleksey Shipilev
> > Attachments: WB-2.patch, WB-3.patch, WB-4.patch
> >
> >
> > JIT arraycopy optimization is disabled automatically when WB are enabled. Attached patch re-enables arraycopy optimization for arrays of primitive types, which shouldn't interfere with WB activity.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
--
http://xiao-feng.blogspot.com
Re: [jira] Commented: (HARMONY-5399) [drlvm][jit] Enabling arraycopy optimization for primitive types when write barriers are enabled
Posted by Xiao-Feng Li <xi...@gmail.com>.
On Jan 18, 2008 3:46 PM, Aleksey Shipilev <al...@gmail.com> wrote:
> Hi, Xiao Feng, Gregory,
>
> I believe that current implementation of WB support for arraycopy is
> good in case of unknown GC design. It would hit WB for every element
> in the array, and then maintain compatibility across different GC
> implementations, right?
Actually it's impossible to have a single design compatible for
different GCs while keeping good performance. It is easy to have more
flexibilities by adding an interface to query GC about what kind of
write barriers are needed. But let's leave this cleanup work to some
day in future.
Thanks,
xiaofeng
> I'm also thinking of specialized write barrier helper for arrays,
> which would exploit your design but keep VM/JIT unaware of the
> details.
>
> Gregory, I have modified the patch to cover your concern, does it fits well?
>
> Thanks,
> Aleksey.
>
>
> On Jan 18, 2008 9:47 AM, Xiao-Feng Li <xi...@gmail.com> wrote:
> > On Jan 18, 2008 2:30 PM, George Timoshenko (JIRA) <ji...@apache.org> wrote:
> > >
> > > [ https://issues.apache.org/jira/browse/HARMONY-5399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12560243#action_12560243 ]
> > >
> > > George Timoshenko commented on HARMONY-5399:
> > > --------------------------------------------
> > >
> > > I have one consern.
> > >
> > > By the modification of "arraycopyOptimizable" you turn of the both
> > >
> > > genArrayCopy and
> > > genArrayCopyRepMove
> > >
> > > optimizations of the arrays of Object types.
> > >
> > > BUT the first one, genArrayCopy, does not use REP instruction. It generates a copying loop so it can work with WB.
> >
> >
> > For array write, it's ok to have only one WB for the whole object. In
> > my current generational GC design, I use WB actually for object
> > remembering rather than slot remembering. So one WB for the whole
> > arraycopy is enough.
> >
> > (Well, write barrier support in DRLVM needs cleanup thenafter.)
> >
> > Thanks,
> > xiaofeng
> >
> >
> > >
> > > > [drlvm][jit] Enabling arraycopy optimization for primitive types when write barriers are enabled
> > > > ------------------------------------------------------------------------------------------------
> > > >
> > > > Key: HARMONY-5399
> > > > URL: https://issues.apache.org/jira/browse/HARMONY-5399
> > > > Project: Harmony
> > > > Issue Type: Improvement
> > > > Environment: All
> > > > Reporter: Aleksey Shipilev
> > > > Attachments: WB-2.patch, WB-3.patch, WB-4.patch
> > > >
> > > >
> > > > JIT arraycopy optimization is disabled automatically when WB are enabled. Attached patch re-enables arraycopy optimization for arrays of primitive types, which shouldn't interfere with WB activity.
> > >
> > > --
> > > This message is automatically generated by JIRA.
> > > -
> > > You can reply to this email to add a comment to the issue online.
> > >
> > >
> >
> >
> >
> > --
> > http://xiao-feng.blogspot.com
> >
>
--
http://xiao-feng.blogspot.com
Re: [jira] Commented: (HARMONY-5399) [drlvm][jit] Enabling arraycopy optimization for primitive types when write barriers are enabled
Posted by Aleksey Shipilev <al...@gmail.com>.
On Jan 18, 2008 3:20 PM, Gregory Shimansky <gs...@apache.org> wrote:
> > Gregory, I have modified the patch to cover your concern, does it fits well?
>
> Heh. I didn't answer to you in JIRA :) It was George Timoshenko who did.
> It seems like he's satisfied with your update although I wouldn't answer
> for him.
Oh, sorry, Gregory :) Tough morning :)
Thanks,
Aleksey.
Re: [jira] Commented: (HARMONY-5399) [drlvm][jit] Enabling arraycopy
optimization for primitive types when write barriers are enabled
Posted by Gregory Shimansky <gs...@apache.org>.
Aleksey Shipilev said the following on 18.01.2008 10:46:
> Hi, Xiao Feng, Gregory,
>
> I believe that current implementation of WB support for arraycopy is
> good in case of unknown GC design. It would hit WB for every element
> in the array, and then maintain compatibility across different GC
> implementations, right?
>
> I'm also thinking of specialized write barrier helper for arrays,
> which would exploit your design but keep VM/JIT unaware of the
> details.
>
> Gregory, I have modified the patch to cover your concern, does it fits well?
Heh. I didn't answer to you in JIRA :) It was George Timoshenko who did.
It seems like he's satisfied with your update although I wouldn't answer
for him.
--
Gregory
Re: [jira] Commented: (HARMONY-5399) [drlvm][jit] Enabling arraycopy optimization for primitive types when write barriers are enabled
Posted by Aleksey Shipilev <al...@gmail.com>.
Hi, Xiao Feng, Gregory,
I believe that current implementation of WB support for arraycopy is
good in case of unknown GC design. It would hit WB for every element
in the array, and then maintain compatibility across different GC
implementations, right?
I'm also thinking of specialized write barrier helper for arrays,
which would exploit your design but keep VM/JIT unaware of the
details.
Gregory, I have modified the patch to cover your concern, does it fits well?
Thanks,
Aleksey.
On Jan 18, 2008 9:47 AM, Xiao-Feng Li <xi...@gmail.com> wrote:
> On Jan 18, 2008 2:30 PM, George Timoshenko (JIRA) <ji...@apache.org> wrote:
> >
> > [ https://issues.apache.org/jira/browse/HARMONY-5399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12560243#action_12560243 ]
> >
> > George Timoshenko commented on HARMONY-5399:
> > --------------------------------------------
> >
> > I have one consern.
> >
> > By the modification of "arraycopyOptimizable" you turn of the both
> >
> > genArrayCopy and
> > genArrayCopyRepMove
> >
> > optimizations of the arrays of Object types.
> >
> > BUT the first one, genArrayCopy, does not use REP instruction. It generates a copying loop so it can work with WB.
>
>
> For array write, it's ok to have only one WB for the whole object. In
> my current generational GC design, I use WB actually for object
> remembering rather than slot remembering. So one WB for the whole
> arraycopy is enough.
>
> (Well, write barrier support in DRLVM needs cleanup thenafter.)
>
> Thanks,
> xiaofeng
>
>
> >
> > > [drlvm][jit] Enabling arraycopy optimization for primitive types when write barriers are enabled
> > > ------------------------------------------------------------------------------------------------
> > >
> > > Key: HARMONY-5399
> > > URL: https://issues.apache.org/jira/browse/HARMONY-5399
> > > Project: Harmony
> > > Issue Type: Improvement
> > > Environment: All
> > > Reporter: Aleksey Shipilev
> > > Attachments: WB-2.patch, WB-3.patch, WB-4.patch
> > >
> > >
> > > JIT arraycopy optimization is disabled automatically when WB are enabled. Attached patch re-enables arraycopy optimization for arrays of primitive types, which shouldn't interfere with WB activity.
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
> >
>
>
>
> --
> http://xiao-feng.blogspot.com
>
Re: [jira] Commented: (HARMONY-5399) [drlvm][jit] Enabling arraycopy optimization for primitive types when write barriers are enabled
Posted by Xiao-Feng Li <xi...@gmail.com>.
On 18 Jan 2008 12:52:28 +0300, Egor Pasko <eg...@gmail.com> wrote:
> On the 0x3CF day of Apache Harmony Xiao-Feng Li wrote:
> > On Jan 18, 2008 2:30 PM, George Timoshenko (JIRA) <ji...@apache.org> wrote:
> > >
> > > [ https://issues.apache.org/jira/browse/HARMONY-5399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12560243#action_12560243 ]
> > >
> > > George Timoshenko commented on HARMONY-5399:
> > > --------------------------------------------
> > >
> > > I have one consern.
> > >
> > > By the modification of "arraycopyOptimizable" you turn of the both
> > >
> > > genArrayCopy and
> > > genArrayCopyRepMove
> > >
> > > optimizations of the arrays of Object types.
> > >
> > > BUT the first one, genArrayCopy, does not use REP instruction. It generates a copying loop so it can work with WB.
> >
> >
> > For array write, it's ok to have only one WB for the whole object. In
> > my current generational GC design, I use WB actually for object
> > remembering rather than slot remembering. So one WB for the whole
> > arraycopy is enough.
> >
> > (Well, write barrier support in DRLVM needs cleanup thenafter.)
>
> So, you are not planning to get WB for each object in the array in the
> nearest future? then we can stick to one WB per array for now before
> the cleanup happens, right?
Actually, I only want to ease the work by JIT team at the moment. The
real situation is, we need both slot remembering and object
remembering. They could be needed separately by different GCs, or they
could be used simultaneously by the same GC. This needs cleanup once
the current development wave is passed.
Thanks,
xiaofeng
> I would +1 then.
>
> P.S. hm, I thought you have several GC designs and experiment between
> them.. and some had WB per slot strategy..
>
> > Thanks,
> > xiaofeng
> >
> > >
> > > > [drlvm][jit] Enabling arraycopy optimization for primitive types when write barriers are enabled
> > > > ------------------------------------------------------------------------------------------------
> > > >
> > > > Key: HARMONY-5399
> > > > URL: https://issues.apache.org/jira/browse/HARMONY-5399
> > > > Project: Harmony
> > > > Issue Type: Improvement
> > > > Environment: All
> > > > Reporter: Aleksey Shipilev
> > > > Attachments: WB-2.patch, WB-3.patch, WB-4.patch
> > > >
> > > >
> > > > JIT arraycopy optimization is disabled automatically when WB are enabled. Attached patch re-enables arraycopy optimization for arrays of primitive types, which shouldn't interfere with WB activity.
> > >
> > > --
> > > This message is automatically generated by JIRA.
> > > -
> > > You can reply to this email to add a comment to the issue online.
> > >
> > >
> >
> >
> >
> > --
> > http://xiao-feng.blogspot.com
> >
>
> --
> Egor Pasko
>
>
--
http://xiao-feng.blogspot.com
Re: [jira] Commented: (HARMONY-5399) [drlvm][jit] Enabling arraycopy optimization for primitive types when write barriers are enabled
Posted by Egor Pasko <eg...@gmail.com>.
On the 0x3CF day of Apache Harmony Xiao-Feng Li wrote:
> On Jan 18, 2008 2:30 PM, George Timoshenko (JIRA) <ji...@apache.org> wrote:
> >
> > [ https://issues.apache.org/jira/browse/HARMONY-5399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12560243#action_12560243 ]
> >
> > George Timoshenko commented on HARMONY-5399:
> > --------------------------------------------
> >
> > I have one consern.
> >
> > By the modification of "arraycopyOptimizable" you turn of the both
> >
> > genArrayCopy and
> > genArrayCopyRepMove
> >
> > optimizations of the arrays of Object types.
> >
> > BUT the first one, genArrayCopy, does not use REP instruction. It generates a copying loop so it can work with WB.
>
>
> For array write, it's ok to have only one WB for the whole object. In
> my current generational GC design, I use WB actually for object
> remembering rather than slot remembering. So one WB for the whole
> arraycopy is enough.
>
> (Well, write barrier support in DRLVM needs cleanup thenafter.)
So, you are not planning to get WB for each object in the array in the
nearest future? then we can stick to one WB per array for now before
the cleanup happens, right?
I would +1 then.
P.S. hm, I thought you have several GC designs and experiment between
them.. and some had WB per slot strategy..
> Thanks,
> xiaofeng
>
> >
> > > [drlvm][jit] Enabling arraycopy optimization for primitive types when write barriers are enabled
> > > ------------------------------------------------------------------------------------------------
> > >
> > > Key: HARMONY-5399
> > > URL: https://issues.apache.org/jira/browse/HARMONY-5399
> > > Project: Harmony
> > > Issue Type: Improvement
> > > Environment: All
> > > Reporter: Aleksey Shipilev
> > > Attachments: WB-2.patch, WB-3.patch, WB-4.patch
> > >
> > >
> > > JIT arraycopy optimization is disabled automatically when WB are enabled. Attached patch re-enables arraycopy optimization for arrays of primitive types, which shouldn't interfere with WB activity.
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
> >
>
>
>
> --
> http://xiao-feng.blogspot.com
>
--
Egor Pasko