« Return to Thread: Recompilation and OSR
Colin(Du Li) wrote:Thanks a lot for your detailed answers, Eliot!
> This all unless you mean a method was optimized under an assumption later
> proved false, e.g., that a class would not have subclasses and thus that
> certain methods could be treated as final and not dispatched. In that case
> OSR
> *must* be applied. This is more of a de-optimization than an optimization.
Yes, that's exactly what I meant. I just wanna find a concrete example in
jikes to study
how the recompilation(including de-opt) and OSR part works.
> 2. I'm not quite clear how recompilation can deal with inlining. e.g.
>>
>
> m1(){
>> ...
>> m2();
>> ...
>> }
>>
>
> 1). m2 is inlined in m1 since m2 is hot.
>> 2). Late on, m2 have to be recompiled since optimization invalidation.
>> Then
>> how can compiler replace the INLINED m2 code in method m1 if m1 is not
>> currently being executed so that OSR cannot work?
>>
>> Do I express my questions clearly?
>>
>
> Again, I'm not 100% sure, but things are *easier* in the absence of active
> invocations. You invalidate and recompile m1 precisely because of its
> dependence on m2 via inlining. This could lead to m1 being compiled a
> different way (not inlining m2, perhaps -- the case I mentioned is one
> where
> in principle if m2 had been treated as final but turned out not to be, and
> the
> compiler *might* then not inline again -- or might use guarded inlining),
> or
> inlining the new m2, etc.
>
> If the system can figure out that m2 is "part of" m1 in the active
> invocation
> (OSR) case, then it can certainly do so in the no-active-invocations case.
>
Sorry, I should clarify my question a bit.
Let's say method m2 is inlined in 2 different methods m1 and m3 as follows:
m1() {
...
m2()
...
}
m1() {
...
m2()
...
}
Later on, the system find m2 need do a de-opt, how will jvm find out which
methods(m1 and m3 in this example) need to be recompiled due to
dependence on m2?
> Someone else will need to point you to the code locations in the system,
> however.
>
> Yes, it will be very helpful!
Regards.
Du
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
« Return to Thread: Recompilation and OSR
| Free embeddable forum powered by Nabble | Forum Help |