You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Simon Chow <si...@gmail.com> on 2007/12/17 09:35:43 UTC

[drlvm][jitrino]A question of pipeline and method filter

First, I am just a beginner for OPT.
I find a file named opt.emconf in default vm. Is it the default
configuration of compilation pipeline in OPT?

My question is that, Is Harmony VM able to change the pipeline or method
filters at runtime?
i.e. Could I specify a pipeline(named P) to a method (named M) dynamically?

-- 
>From : Simon.Chow@Software School of Fudan University

Re: [drlvm][jitrino]A question of pipeline and method filter

Posted by cannibal wang <ca...@gmail.com>.
yes, it's indeed a NPC problem,
but we wanna do something to imporove the performance:)
as you know, we run some benchmarks on Harnony, and SUN JVM,
Compared to Sun JVM even in client mode, the performance of Harmony Drlvm is
in the shade......
So, can you give us some suggestions about something interesting we can do
on Harmony?
And we wanna know more about the tasks you have done on ICC.....
Thanks

2008/1/16, Xiao-Feng Li <xi...@gmail.com>:
>
> On Jan 15, 2008 10:37 AM, Simon Chow <si...@gmail.com> wrote:
> >
> > On 10 Jan 2008 17:59:47 +0300, Egor Pasko <eg...@gmail.com> wrote:
> > >
> > > On the 0x3C7 day of Apache Harmony Simon Chow wrote:
> > > > On 18 Dec 2007 14:04:17 +0300, Egor Pasko <eg...@gmail.com>
> wrote:
> > > > >
> > > > > On the 0x3AF day of Apache Harmony Simon Chow wrote:
> > > > > > Is there any analysis tools automatically choosing optimization
> path
> > > for
> > > > > my
> > > > > > source code.
> > > > > > If no,
> > > > > > Do you think such a tool can help developers a lot for archiving
> > > better
> > > > > > performance on Harmony.
> > > > > > I am trying to do some research for OPT, expecting for your
> advice.
> > > > > Thanks!
> > > > >
> > > > > Simon,
> > > > >
> > > > > I just want to add some of my long thoughts.. :)
> > > > >
> > > > > JITs aim at solving the problem of optimizing code with more or
> less
> > > > > universal approaches. We have this great tool as compilation
> pipeline
> > > > > management for developers' ability to experiment. JIT is already
> > > > > overly complicated with many pipeline phases influencing each
> other
> > > > > sometimes in very unexpected ways :)
> > > > >
> > > > > I do not believe in just-in-time meta-optimization because even
> the
> > > > > optimization tool (without meta) is already very complicated.
> However,
> > > > > if a user is ready to pay a lot if time to get a real bang in
> > > > > performance (of a single method or the whole app), they should
> > > > > consider searching in the big space of JIT configurations
> > > > > automatically, where some not very intelligent artificial
> intelligence
> > > > > might be promising here.
> > > >
> > > >
> > > > Sorry for a late reply.
> > > > Thank you for sharing so much thoughts! :)
> > > >
> > > > I have rethinked this question recently.
> > > > I strongly agree that it hard to write a program with such
> intelligence.
> > > > And I am curious about intelligent artificial intelligence you said
> :)
> > > What
> > > > is the method of searching configuration space?
> > >
> > > that's a big subject of machine learning. There are a bunch of methods
> > > with lots of modifications: Support Vector Machine (SVM), genetic
> > > algorithms, neural networks, boosting, etc. There is a wikipedia link
> > > collecting them:
> > >
> > > http://en.wikipedia.org/wiki/Machine_learning
> > >
> > > wanna dive into this nightmare? :)
> > >
> > > > Despiting the untested passes, Is there any possibility changing the
> > > > pipeline configuration (or create a new pipeline) for a particular
> set
> > > of
> > > > method which may archive better performance with some optimization
> pass
> > > by
> > > > analyzing profiling information?
> > >
> > > Do you want to implement a function that takes profile as parameter
> > > and tells which optpass to use?
> >
> >
> > Yes :)
> >
> > Currently such tricks in Execution Manager are not supported, you can
> > > only set optimization passes based on method names (or parts of method
> > > names, for example, we construct different path for "...::<clinit>"
> > > methods that run only once")
> > >
> > > And I doubt one can write a sane function that tells which pass to use
> > > based on profile (and maybe bytecode supplemented).
> >
> >
> > Why is it? In my view, Hotspot uses profile to find 'hot section' and
> direct
> > its recompilation at runtime. I think this is similar to 'change pass
> based
> > on profile', isn't it?
>
>
> It's easy to find hotspots and to recompile them with certain
> predefined optimizations, while it's hard to find the best
> optimization combinations. It's an NP-hard problem.
>
> Thanks,
> xiaofeng
>
> > Thanks!
> >
> >
> >
> > So, I probably
> > > misunderstood you.
> > >
> > > > Thanks
> > > >
> > > > I suggest to apply artificial intelligence here because anyway we
> > > > > won't be able to understand what configurations are best using our
> own
> > > > > brains and hence we won't be able to write code for that.
> > > > >
> > > > > But be prepared to see that:
> > > > >
> > > > > a) not many of possible JIT pipelines make sense in terms of both
> > > > > compile-time and run-time performance plus memory footprint
> > > > >
> > > > > b) very little number of configurations would work in a stable way
> > > > > (because we do not test them, and some optimization passes are
> > > > > documented to work only in specific conditions, i.e. other
> > > > > optimizations preceded)
> > > > >
> > > > > What do you think?
> > > > >
> > > > > > On 17/12/2007, Mikhail Fursov <mi...@gmail.com> wrote:
> > > > > > >
> > > > > > > On Dec 17, 2007 4:06 PM, Simon Chow <si...@gmail.com>
> > > wrote:
> > > > > > >
> > > > > > > > Thank you very much!
> > > > > > > >
> > > > > > > > So users should choose pipeline for methods before
> execution,
> > > isn't
> > > > > it?
> > > > > > >
> > > > > > > Yes.
> > > > > > >
> > > > > > >
> > > > > > > > Then I wants to know how to build a pipeline with the most
> > > efficient
> > > > > > > > compilation result of a specified method. Does it rely on
> the
> > > > > > > developer's
> > > > > > > > experience?
> > > > > > > >
> > > > > > > > Yes, it depends on developer's experience and on
> optimizations
> > > you
> > > > > > > expect
> > > > > > > to work for your method. E.g. if you know that your hot-spot
> > > method
> > > > > > > benefits
> > > > > > > from particular optimization - you just add it to the
> optimization
> > > > > path
> > > > > > > and
> > > > > > > tune it to do the best job for your method.
> > > > > > >
> > > > > > > --
> > > > > > > Mikhail Fursov
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > From : Simon.Chow@Software School of Fudan University
> > > > >
> > > > > --
> > > > > Egor Pasko
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > From : Simon.Chow@Software School of Fudan University
> > >
> > > --
> > > Egor Pasko
> > >
> > >
> >
> >
> > --
> >
> > From : Simon.Chow@Software School of Fudan University
> >
>
>
>
> --
> http://xiao-feng.blogspot.com
>



-- 
Cannibal
CS.Fudan University

Re: [drlvm][jitrino]A question of pipeline and method filter

Posted by Xiao-Feng Li <xi...@gmail.com>.
On Jan 15, 2008 10:37 AM, Simon Chow <si...@gmail.com> wrote:
>
> On 10 Jan 2008 17:59:47 +0300, Egor Pasko <eg...@gmail.com> wrote:
> >
> > On the 0x3C7 day of Apache Harmony Simon Chow wrote:
> > > On 18 Dec 2007 14:04:17 +0300, Egor Pasko <eg...@gmail.com> wrote:
> > > >
> > > > On the 0x3AF day of Apache Harmony Simon Chow wrote:
> > > > > Is there any analysis tools automatically choosing optimization path
> > for
> > > > my
> > > > > source code.
> > > > > If no,
> > > > > Do you think such a tool can help developers a lot for archiving
> > better
> > > > > performance on Harmony.
> > > > > I am trying to do some research for OPT, expecting for your advice.
> > > > Thanks!
> > > >
> > > > Simon,
> > > >
> > > > I just want to add some of my long thoughts.. :)
> > > >
> > > > JITs aim at solving the problem of optimizing code with more or less
> > > > universal approaches. We have this great tool as compilation pipeline
> > > > management for developers' ability to experiment. JIT is already
> > > > overly complicated with many pipeline phases influencing each other
> > > > sometimes in very unexpected ways :)
> > > >
> > > > I do not believe in just-in-time meta-optimization because even the
> > > > optimization tool (without meta) is already very complicated. However,
> > > > if a user is ready to pay a lot if time to get a real bang in
> > > > performance (of a single method or the whole app), they should
> > > > consider searching in the big space of JIT configurations
> > > > automatically, where some not very intelligent artificial intelligence
> > > > might be promising here.
> > >
> > >
> > > Sorry for a late reply.
> > > Thank you for sharing so much thoughts! :)
> > >
> > > I have rethinked this question recently.
> > > I strongly agree that it hard to write a program with such intelligence.
> > > And I am curious about intelligent artificial intelligence you said :)
> > What
> > > is the method of searching configuration space?
> >
> > that's a big subject of machine learning. There are a bunch of methods
> > with lots of modifications: Support Vector Machine (SVM), genetic
> > algorithms, neural networks, boosting, etc. There is a wikipedia link
> > collecting them:
> >
> > http://en.wikipedia.org/wiki/Machine_learning
> >
> > wanna dive into this nightmare? :)
> >
> > > Despiting the untested passes, Is there any possibility changing the
> > > pipeline configuration (or create a new pipeline) for a particular set
> > of
> > > method which may archive better performance with some optimization pass
> > by
> > > analyzing profiling information?
> >
> > Do you want to implement a function that takes profile as parameter
> > and tells which optpass to use?
>
>
> Yes :)
>
> Currently such tricks in Execution Manager are not supported, you can
> > only set optimization passes based on method names (or parts of method
> > names, for example, we construct different path for "...::<clinit>"
> > methods that run only once")
> >
> > And I doubt one can write a sane function that tells which pass to use
> > based on profile (and maybe bytecode supplemented).
>
>
> Why is it? In my view, Hotspot uses profile to find 'hot section' and direct
> its recompilation at runtime. I think this is similar to 'change pass based
> on profile', isn't it?


It's easy to find hotspots and to recompile them with certain
predefined optimizations, while it's hard to find the best
optimization combinations. It's an NP-hard problem.

Thanks,
xiaofeng

> Thanks!
>
>
>
> So, I probably
> > misunderstood you.
> >
> > > Thanks
> > >
> > > I suggest to apply artificial intelligence here because anyway we
> > > > won't be able to understand what configurations are best using our own
> > > > brains and hence we won't be able to write code for that.
> > > >
> > > > But be prepared to see that:
> > > >
> > > > a) not many of possible JIT pipelines make sense in terms of both
> > > > compile-time and run-time performance plus memory footprint
> > > >
> > > > b) very little number of configurations would work in a stable way
> > > > (because we do not test them, and some optimization passes are
> > > > documented to work only in specific conditions, i.e. other
> > > > optimizations preceded)
> > > >
> > > > What do you think?
> > > >
> > > > > On 17/12/2007, Mikhail Fursov <mi...@gmail.com> wrote:
> > > > > >
> > > > > > On Dec 17, 2007 4:06 PM, Simon Chow <si...@gmail.com>
> > wrote:
> > > > > >
> > > > > > > Thank you very much!
> > > > > > >
> > > > > > > So users should choose pipeline for methods before execution,
> > isn't
> > > > it?
> > > > > >
> > > > > > Yes.
> > > > > >
> > > > > >
> > > > > > > Then I wants to know how to build a pipeline with the most
> > efficient
> > > > > > > compilation result of a specified method. Does it rely on the
> > > > > > developer's
> > > > > > > experience?
> > > > > > >
> > > > > > > Yes, it depends on developer's experience and on optimizations
> > you
> > > > > > expect
> > > > > > to work for your method. E.g. if you know that your hot-spot
> > method
> > > > > > benefits
> > > > > > from particular optimization - you just add it to the optimization
> > > > path
> > > > > > and
> > > > > > tune it to do the best job for your method.
> > > > > >
> > > > > > --
> > > > > > Mikhail Fursov
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > From : Simon.Chow@Software School of Fudan University
> > > >
> > > > --
> > > > Egor Pasko
> > > >
> > > >
> > >
> > >
> > > --
> > > From : Simon.Chow@Software School of Fudan University
> >
> > --
> > Egor Pasko
> >
> >
>
>
> --
>
> From : Simon.Chow@Software School of Fudan University
>



-- 
http://xiao-feng.blogspot.com

Re: [drlvm][jitrino]A question of pipeline and method filter

Posted by Simon Chow <si...@gmail.com>.
On 10 Jan 2008 17:59:47 +0300, Egor Pasko <eg...@gmail.com> wrote:
>
> On the 0x3C7 day of Apache Harmony Simon Chow wrote:
> > On 18 Dec 2007 14:04:17 +0300, Egor Pasko <eg...@gmail.com> wrote:
> > >
> > > On the 0x3AF day of Apache Harmony Simon Chow wrote:
> > > > Is there any analysis tools automatically choosing optimization path
> for
> > > my
> > > > source code.
> > > > If no,
> > > > Do you think such a tool can help developers a lot for archiving
> better
> > > > performance on Harmony.
> > > > I am trying to do some research for OPT, expecting for your advice.
> > > Thanks!
> > >
> > > Simon,
> > >
> > > I just want to add some of my long thoughts.. :)
> > >
> > > JITs aim at solving the problem of optimizing code with more or less
> > > universal approaches. We have this great tool as compilation pipeline
> > > management for developers' ability to experiment. JIT is already
> > > overly complicated with many pipeline phases influencing each other
> > > sometimes in very unexpected ways :)
> > >
> > > I do not believe in just-in-time meta-optimization because even the
> > > optimization tool (without meta) is already very complicated. However,
> > > if a user is ready to pay a lot if time to get a real bang in
> > > performance (of a single method or the whole app), they should
> > > consider searching in the big space of JIT configurations
> > > automatically, where some not very intelligent artificial intelligence
> > > might be promising here.
> >
> >
> > Sorry for a late reply.
> > Thank you for sharing so much thoughts! :)
> >
> > I have rethinked this question recently.
> > I strongly agree that it hard to write a program with such intelligence.
> > And I am curious about intelligent artificial intelligence you said :)
> What
> > is the method of searching configuration space?
>
> that's a big subject of machine learning. There are a bunch of methods
> with lots of modifications: Support Vector Machine (SVM), genetic
> algorithms, neural networks, boosting, etc. There is a wikipedia link
> collecting them:
>
> http://en.wikipedia.org/wiki/Machine_learning
>
> wanna dive into this nightmare? :)
>
> > Despiting the untested passes, Is there any possibility changing the
> > pipeline configuration (or create a new pipeline) for a particular set
> of
> > method which may archive better performance with some optimization pass
> by
> > analyzing profiling information?
>
> Do you want to implement a function that takes profile as parameter
> and tells which optpass to use?


Yes :)

Currently such tricks in Execution Manager are not supported, you can
> only set optimization passes based on method names (or parts of method
> names, for example, we construct different path for "...::<clinit>"
> methods that run only once")
>
> And I doubt one can write a sane function that tells which pass to use
> based on profile (and maybe bytecode supplemented).


Why is it? In my view, Hotspot uses profile to find 'hot section' and direct
its recompilation at runtime. I think this is similar to 'change pass based
on profile', isn't it?

Thanks!


So, I probably
> misunderstood you.
>
> > Thanks
> >
> > I suggest to apply artificial intelligence here because anyway we
> > > won't be able to understand what configurations are best using our own
> > > brains and hence we won't be able to write code for that.
> > >
> > > But be prepared to see that:
> > >
> > > a) not many of possible JIT pipelines make sense in terms of both
> > > compile-time and run-time performance plus memory footprint
> > >
> > > b) very little number of configurations would work in a stable way
> > > (because we do not test them, and some optimization passes are
> > > documented to work only in specific conditions, i.e. other
> > > optimizations preceded)
> > >
> > > What do you think?
> > >
> > > > On 17/12/2007, Mikhail Fursov <mi...@gmail.com> wrote:
> > > > >
> > > > > On Dec 17, 2007 4:06 PM, Simon Chow <si...@gmail.com>
> wrote:
> > > > >
> > > > > > Thank you very much!
> > > > > >
> > > > > > So users should choose pipeline for methods before execution,
> isn't
> > > it?
> > > > >
> > > > > Yes.
> > > > >
> > > > >
> > > > > > Then I wants to know how to build a pipeline with the most
> efficient
> > > > > > compilation result of a specified method. Does it rely on the
> > > > > developer's
> > > > > > experience?
> > > > > >
> > > > > > Yes, it depends on developer's experience and on optimizations
> you
> > > > > expect
> > > > > to work for your method. E.g. if you know that your hot-spot
> method
> > > > > benefits
> > > > > from particular optimization - you just add it to the optimization
> > > path
> > > > > and
> > > > > tune it to do the best job for your method.
> > > > >
> > > > > --
> > > > > Mikhail Fursov
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > From : Simon.Chow@Software School of Fudan University
> > >
> > > --
> > > Egor Pasko
> > >
> > >
> >
> >
> > --
> > From : Simon.Chow@Software School of Fudan University
>
> --
> Egor Pasko
>
>


-- 
>From : Simon.Chow@Software School of Fudan University

Re: [drlvm][jitrino]A question of pipeline and method filter

Posted by Egor Pasko <eg...@gmail.com>.
On the 0x3C7 day of Apache Harmony Simon Chow wrote:
> On 18 Dec 2007 14:04:17 +0300, Egor Pasko <eg...@gmail.com> wrote:
> >
> > On the 0x3AF day of Apache Harmony Simon Chow wrote:
> > > Is there any analysis tools automatically choosing optimization path for
> > my
> > > source code.
> > > If no,
> > > Do you think such a tool can help developers a lot for archiving better
> > > performance on Harmony.
> > > I am trying to do some research for OPT, expecting for your advice.
> > Thanks!
> >
> > Simon,
> >
> > I just want to add some of my long thoughts.. :)
> >
> > JITs aim at solving the problem of optimizing code with more or less
> > universal approaches. We have this great tool as compilation pipeline
> > management for developers' ability to experiment. JIT is already
> > overly complicated with many pipeline phases influencing each other
> > sometimes in very unexpected ways :)
> >
> > I do not believe in just-in-time meta-optimization because even the
> > optimization tool (without meta) is already very complicated. However,
> > if a user is ready to pay a lot if time to get a real bang in
> > performance (of a single method or the whole app), they should
> > consider searching in the big space of JIT configurations
> > automatically, where some not very intelligent artificial intelligence
> > might be promising here.
> 
> 
> Sorry for a late reply.
> Thank you for sharing so much thoughts! :)
> 
> I have rethinked this question recently.
> I strongly agree that it hard to write a program with such intelligence.
> And I am curious about intelligent artificial intelligence you said :) What
> is the method of searching configuration space?

that's a big subject of machine learning. There are a bunch of methods
with lots of modifications: Support Vector Machine (SVM), genetic
algorithms, neural networks, boosting, etc. There is a wikipedia link
collecting them:

http://en.wikipedia.org/wiki/Machine_learning

wanna dive into this nightmare? :)

> Despiting the untested passes, Is there any possibility changing the
> pipeline configuration (or create a new pipeline) for a particular set of
> method which may archive better performance with some optimization pass by
> analyzing profiling information?

Do you want to implement a function that takes profile as parameter
and tells which optpass to use?

Currently such tricks in Execution Manager are not supported, you can
only set optimization passes based on method names (or parts of method
names, for example, we construct different path for "...::<clinit>"
methods that run only once")

And I doubt one can write a sane function that tells which pass to use
based on profile (and maybe bytecode supplemented). So, I probably
misunderstood you.

> Thanks
> 
> I suggest to apply artificial intelligence here because anyway we
> > won't be able to understand what configurations are best using our own
> > brains and hence we won't be able to write code for that.
> >
> > But be prepared to see that:
> >
> > a) not many of possible JIT pipelines make sense in terms of both
> > compile-time and run-time performance plus memory footprint
> >
> > b) very little number of configurations would work in a stable way
> > (because we do not test them, and some optimization passes are
> > documented to work only in specific conditions, i.e. other
> > optimizations preceded)
> >
> > What do you think?
> >
> > > On 17/12/2007, Mikhail Fursov <mi...@gmail.com> wrote:
> > > >
> > > > On Dec 17, 2007 4:06 PM, Simon Chow <si...@gmail.com> wrote:
> > > >
> > > > > Thank you very much!
> > > > >
> > > > > So users should choose pipeline for methods before execution, isn't
> > it?
> > > >
> > > > Yes.
> > > >
> > > >
> > > > > Then I wants to know how to build a pipeline with the most efficient
> > > > > compilation result of a specified method. Does it rely on the
> > > > developer's
> > > > > experience?
> > > > >
> > > > > Yes, it depends on developer's experience and on optimizations you
> > > > expect
> > > > to work for your method. E.g. if you know that your hot-spot method
> > > > benefits
> > > > from particular optimization - you just add it to the optimization
> > path
> > > > and
> > > > tune it to do the best job for your method.
> > > >
> > > > --
> > > > Mikhail Fursov
> > > >
> > >
> > >
> > >
> > > --
> > > From : Simon.Chow@Software School of Fudan University
> >
> > --
> > Egor Pasko
> >
> >
> 
> 
> -- 
> From : Simon.Chow@Software School of Fudan University

-- 
Egor Pasko


Re: [drlvm][jitrino]A question of pipeline and method filter

Posted by Simon Chow <si...@gmail.com>.
On 18 Dec 2007 14:04:17 +0300, Egor Pasko <eg...@gmail.com> wrote:
>
> On the 0x3AF day of Apache Harmony Simon Chow wrote:
> > Is there any analysis tools automatically choosing optimization path for
> my
> > source code.
> > If no,
> > Do you think such a tool can help developers a lot for archiving better
> > performance on Harmony.
> > I am trying to do some research for OPT, expecting for your advice.
> Thanks!
>
> Simon,
>
> I just want to add some of my long thoughts.. :)
>
> JITs aim at solving the problem of optimizing code with more or less
> universal approaches. We have this great tool as compilation pipeline
> management for developers' ability to experiment. JIT is already
> overly complicated with many pipeline phases influencing each other
> sometimes in very unexpected ways :)
>
> I do not believe in just-in-time meta-optimization because even the
> optimization tool (without meta) is already very complicated. However,
> if a user is ready to pay a lot if time to get a real bang in
> performance (of a single method or the whole app), they should
> consider searching in the big space of JIT configurations
> automatically, where some not very intelligent artificial intelligence
> might be promising here.


Sorry for a late reply.
Thank you for sharing so much thoughts! :)

I have rethinked this question recently.
I strongly agree that it hard to write a program with such intelligence.
And I am curious about intelligent artificial intelligence you said :) What
is the method of searching configuration space?

Despiting the untested passes, Is there any possibility changing the
pipeline configuration (or create a new pipeline) for a particular set of
method which may archive better performance with some optimization pass by
analyzing profiling information?

Thanks

I suggest to apply artificial intelligence here because anyway we
> won't be able to understand what configurations are best using our own
> brains and hence we won't be able to write code for that.
>
> But be prepared to see that:
>
> a) not many of possible JIT pipelines make sense in terms of both
> compile-time and run-time performance plus memory footprint
>
> b) very little number of configurations would work in a stable way
> (because we do not test them, and some optimization passes are
> documented to work only in specific conditions, i.e. other
> optimizations preceded)
>
> What do you think?
>
> > On 17/12/2007, Mikhail Fursov <mi...@gmail.com> wrote:
> > >
> > > On Dec 17, 2007 4:06 PM, Simon Chow <si...@gmail.com> wrote:
> > >
> > > > Thank you very much!
> > > >
> > > > So users should choose pipeline for methods before execution, isn't
> it?
> > >
> > > Yes.
> > >
> > >
> > > > Then I wants to know how to build a pipeline with the most efficient
> > > > compilation result of a specified method. Does it rely on the
> > > developer's
> > > > experience?
> > > >
> > > > Yes, it depends on developer's experience and on optimizations you
> > > expect
> > > to work for your method. E.g. if you know that your hot-spot method
> > > benefits
> > > from particular optimization - you just add it to the optimization
> path
> > > and
> > > tune it to do the best job for your method.
> > >
> > > --
> > > Mikhail Fursov
> > >
> >
> >
> >
> > --
> > From : Simon.Chow@Software School of Fudan University
>
> --
> Egor Pasko
>
>


-- 
>From : Simon.Chow@Software School of Fudan University

Re: [drlvm][jitrino]A question of pipeline and method filter

Posted by Egor Pasko <eg...@gmail.com>.
On the 0x3AF day of Apache Harmony Simon Chow wrote:
> Is there any analysis tools automatically choosing optimization path for my
> source code.
> If no,
> Do you think such a tool can help developers a lot for archiving better
> performance on Harmony.
> I am trying to do some research for OPT, expecting for your advice. Thanks!

Simon,

I just want to add some of my long thoughts.. :)

JITs aim at solving the problem of optimizing code with more or less
universal approaches. We have this great tool as compilation pipeline
management for developers' ability to experiment. JIT is already
overly complicated with many pipeline phases influencing each other
sometimes in very unexpected ways :)

I do not believe in just-in-time meta-optimization because even the
optimization tool (without meta) is already very complicated. However,
if a user is ready to pay a lot if time to get a real bang in
performance (of a single method or the whole app), they should
consider searching in the big space of JIT configurations
automatically, where some not very intelligent artificial intelligence
might be promising here.

I suggest to apply artificial intelligence here because anyway we
won't be able to understand what configurations are best using our own
brains and hence we won't be able to write code for that.

But be prepared to see that:

a) not many of possible JIT pipelines make sense in terms of both
compile-time and run-time performance plus memory footprint

b) very little number of configurations would work in a stable way
(because we do not test them, and some optimization passes are
documented to work only in specific conditions, i.e. other
optimizations preceded)

What do you think?

> On 17/12/2007, Mikhail Fursov <mi...@gmail.com> wrote:
> >
> > On Dec 17, 2007 4:06 PM, Simon Chow <si...@gmail.com> wrote:
> >
> > > Thank you very much!
> > >
> > > So users should choose pipeline for methods before execution, isn't it?
> >
> > Yes.
> >
> >
> > > Then I wants to know how to build a pipeline with the most efficient
> > > compilation result of a specified method. Does it rely on the
> > developer's
> > > experience?
> > >
> > > Yes, it depends on developer's experience and on optimizations you
> > expect
> > to work for your method. E.g. if you know that your hot-spot method
> > benefits
> > from particular optimization - you just add it to the optimization path
> > and
> > tune it to do the best job for your method.
> >
> > --
> > Mikhail Fursov
> >
> 
> 
> 
> -- 
> From : Simon.Chow@Software School of Fudan University

-- 
Egor Pasko


Re: [drlvm][jitrino]A question of pipeline and method filter

Posted by Simon Chow <si...@gmail.com>.
Is there any analysis tools automatically choosing optimization path for my
source code.
If no,
Do you think such a tool can help developers a lot for archiving better
performance on Harmony.
I am trying to do some research for OPT, expecting for your advice. Thanks!

On 17/12/2007, Mikhail Fursov <mi...@gmail.com> wrote:
>
> On Dec 17, 2007 4:06 PM, Simon Chow <si...@gmail.com> wrote:
>
> > Thank you very much!
> >
> > So users should choose pipeline for methods before execution, isn't it?
>
> Yes.
>
>
> > Then I wants to know how to build a pipeline with the most efficient
> > compilation result of a specified method. Does it rely on the
> developer's
> > experience?
> >
> > Yes, it depends on developer's experience and on optimizations you
> expect
> to work for your method. E.g. if you know that your hot-spot method
> benefits
> from particular optimization - you just add it to the optimization path
> and
> tune it to do the best job for your method.
>
> --
> Mikhail Fursov
>



-- 
>From : Simon.Chow@Software School of Fudan University

Re: [drlvm][jitrino]A question of pipeline and method filter

Posted by Mikhail Fursov <mi...@gmail.com>.
On Dec 17, 2007 4:06 PM, Simon Chow <si...@gmail.com> wrote:

> Thank you very much!
>
> So users should choose pipeline for methods before execution, isn't it?

Yes.


> Then I wants to know how to build a pipeline with the most efficient
> compilation result of a specified method. Does it rely on the developer's
> experience?
>
> Yes, it depends on developer's experience and on optimizations you expect
to work for your method. E.g. if you know that your hot-spot method benefits
from particular optimization - you just add it to the optimization path and
tune it to do the best job for your method.

-- 
Mikhail Fursov

Re: [drlvm][jitrino]A question of pipeline and method filter

Posted by Simon Chow <si...@gmail.com>.
Thank you very much!

So users should choose pipeline for methods before execution, isn't it?
Then I wants to know how to build a pipeline with the most efficient
compilation result of a specified method. Does it rely on the developer's
experience?



On 17/12/2007, Mikhail Fursov <mi...@gmail.com> wrote:
>
> Hi Simon,
> On Dec 17, 2007 2:35 PM, Simon Chow <si...@gmail.com> wrote:
>
> > First, I am just a beginner for OPT.
> > I find a file named opt.emconf in default vm. Is it the default
> > configuration of compilation pipeline in OPT?
> >
>
> Yes, this configuration file is used when you pass -Xem:opt option to VM.
> 'opt' here is the name of the file. You can specify the full path to your
> custom configuration file with -Xem option or put it into 'bin/default'
> directory and use the filename only (file extension is optional).
>
>
> >
> > My question is that, Is Harmony VM able to change the pipeline or method
> > filters at runtime?
> > i.e. Could I specify a pipeline(named P) to a method (named M)
> > dynamically?
> >
>
> You can't change JIT configuration in runtime but you can use command line
> to override any of existing "-XX" option stored in emconf file at startup.
> The format is the same as in emconf - you can just copy it and use in
> command line.
>
>
> --
> Mikhail Fursov
>



-- 
>From : Simon.Chow@Software School of Fudan University

Re: [drlvm][jitrino]A question of pipeline and method filter

Posted by Mikhail Fursov <mi...@gmail.com>.
Hi Simon,
On Dec 17, 2007 2:35 PM, Simon Chow <si...@gmail.com> wrote:

> First, I am just a beginner for OPT.
> I find a file named opt.emconf in default vm. Is it the default
> configuration of compilation pipeline in OPT?
>

Yes, this configuration file is used when you pass -Xem:opt option to VM.
'opt' here is the name of the file. You can specify the full path to your
custom configuration file with -Xem option or put it into 'bin/default'
directory and use the filename only (file extension is optional).


>
> My question is that, Is Harmony VM able to change the pipeline or method
> filters at runtime?
> i.e. Could I specify a pipeline(named P) to a method (named M)
> dynamically?
>

You can't change JIT configuration in runtime but you can use command line
to override any of existing "-XX" option stored in emconf file at startup.
The format is the same as in emconf - you can just copy it and use in
command line.


-- 
Mikhail Fursov