On 7/4/07, Mikhail Fursov <[EMAIL PROTECTED]> wrote:
Clara,
On 7/4/07, clara <[EMAIL PROTECTED]> wrote:
>
> Our objective is to exploit a more accurate inter-procedural k-layer EA,
> which
> will guide the JIT-assisted GC (a bit like free-me [1]) or concurrency
> analysis.
Here my question is: do you want to compute object lifetime and add
free()
calls during compilation time only or use special runtime variables to
track if method's argument and return values of object type are escaped
and
guard free() call with this variable check?
We do the former.
Our EA is dependant on SSA, and a rough inter-procedural k-layer EA has been
> implemented ( by writing a optpass ). We need type propagation to
obtain
> and
> analyze more related method. But we could not know how this kind of type
> propagation cost, and why jitrino implement inter-procedural analysis by
> inlining
> and not by cross-procedural infomation transfer.
The answer is: this is the easier way to get the same information. Using
it
for a limited set of methods (hot methods) we do not need to invent new
type
of profile and we do not depend on the fact if the method we want to
analyze
was compiled before or not.
You can use cross-procedural profiles if it fits your needs better. I can
help you to integrate into EM's infrastructure and make it JIT
independent.
The cross-procedural profiling is our next step work. At present we do
it by cross-procedural infomation transfer in JIT.
Another problem is there are many objects referenced by many container
> objects
> in applications. Do you have some good advices on analyzing such
objects?
Do you mean something like String and shared between different strings
char[] objects here or references from java.util.* containers?
Unfortunately I can't give any good advice here unless I learn details of
your method better.
Would it be OK if we start with simple examples and simple solutions and
advance step by step?
Let's see a simple example below.
public class kit {
static Long largest = NULL;
static public void main(String[] arg){
kit k = new kit();
k.f1(999);
}
public void f1(int m){
Long[] c = new Long[1000];
for(int i=0;i<1000;i++){
c[i] = new Long(i);
if(i==m)
this.largest = c[i];
}
}
}
Here, c is a local array and be allocated 1000 Long instances in f1().
Only one Long object escape f1 by the static field this.largest, others
don't escape f1.
But it is difficult to obtain the above accurate escape state using EA,
due to the use of array c.
In EA of jitrino.JIT, a conservative method is used. One array has only
one escape state field, and all the objects referred in the array have
the uniform escape state.
There are some other improved methods, such as region-based (to
divide an array into several regions, each region has a escape state
field). Or we can use profiling on the index or a range of indexes,
but it would be costly.
Do you have some good advices?
[1] Samuel Z. Guyer, Kathryn S. McKinley, and Daniel Frampton.
> Free-Me: a static analysis for automatic individual object.
> In PLDI 2006, Ottawa, Ontario, Canada reclamation, 2006.
>
> ----- Original Message -----
> From: "Mikhail Fursov" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Tuesday, July 03, 2007 5:43 PM
> Subject: Re: [drlvm][jitrino]Are there any static type checking and type
> propagation?
>
>
> > On 7/3/07, clara <[EMAIL PROTECTED]> wrote:
> >>
> >> Thanks.
> >>
> >> We are exploiting an inter-procedural k-layer escape analysis, which
> are
> >> not dependent on inlining. So we will do some cross-procedure type
> >> propagation ourselves. :-)
> >> Could you give us some advices on it according to your experiences?
> >>
> >>
> > First of all you can use JavaBytecodeTranslator to produce HIR for the
> > methods you are interested to analyze. Drop this HIR (do not inline
it)
> > after you checked the data you need.
> >
> > Could you describe your task and proposed solution in more details, so
> we
> > can think about more precise advices?
> >
> > --
> > Mikhail Fursov
> >
--
Mikhail Fursov