You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by zouqiong <us...@gmail.com> on 2007/01/17 03:47:30 UTC
how to get the time used by the OPT, JET?
I try option *-Djit.arg.log=ct,irdump,dotdump,info, and it seems not
working.
The version of DRLVM I use is 438320.
Thanks
*--
Best Regards,
Qiong,Zou
Re: how to get the time used by the OPT, JET?
Posted by Alexey Varlamov <al...@gmail.com>.
2007/1/17, zouqiong <us...@gmail.com>:
> And I found that ~Dll_JIT() won't be called unless use option *
> -XcleanupOnExit
>
> However, if i open option -XcleanupOnExit, SIGSEGV in VM code happens!
Hmm, the version you are exporing is rather old. There are more recent
snapshots available, if you prefer not to checkout latest svn state.
VM shutdown was deeply refactored last month, -XcleanupOnExit is no more.
>
>
> *
> 2007/1/17, Alexey Varlamov <al...@gmail.com>:
> >
> > Cmdline syntax of VM internal options was changed from -D<key=value> to
> > -XD<key=value>.
> > And beware, it will be changed again in some tine, to be RI-like:
> > -XX:<key=value>
> >
> > 2007/1/17, zouqiong <us...@gmail.com>:
> > > I try option *-Djit.arg.log=ct,irdump,dotdump,info, and it seems not
> > > working.
> > > The version of DRLVM I use is 438320.
> > >
> > > Thanks
> > >
> > > *--
> > > Best Regards,
> > > Qiong,Zou
> > >
> > >
> >
>
>
>
> --
> Best Regards,
> Qiong,Zou
>
>
Re: how to get the time used by the OPT, JET?
Posted by zouqiong <us...@gmail.com>.
And I found that ~Dll_JIT() won't be called unless use option *
-XcleanupOnExit
However, if i open option -XcleanupOnExit, SIGSEGV in VM code happens!
*
2007/1/17, Alexey Varlamov <al...@gmail.com>:
>
> Cmdline syntax of VM internal options was changed from -D<key=value> to
> -XD<key=value>.
> And beware, it will be changed again in some tine, to be RI-like:
> -XX:<key=value>
>
> 2007/1/17, zouqiong <us...@gmail.com>:
> > I try option *-Djit.arg.log=ct,irdump,dotdump,info, and it seems not
> > working.
> > The version of DRLVM I use is 438320.
> >
> > Thanks
> >
> > *--
> > Best Regards,
> > Qiong,Zou
> >
> >
>
--
Best Regards,
Qiong,Zou
RE: Re: how to get the time used by the OPT, JET?
Posted by "Morozova, Nadezhda" <na...@intel.com>.
Thanks Salikh :)
Cheers,
Nadya
>-----Original Message-----
>From: news [mailto:news@sea.gmane.org] On Behalf Of Salikh Zakirov
>Sent: Wednesday, January 17, 2007 3:11 PM
>To: dev@harmony.apache.org
>Subject: Re: how to get the time used by the OPT, JET?
>
>>> From: Alexey Varlamov [mailto:alexey.v.varlamov@gmail.com]
>>> Cmdline syntax of VM internal options was changed from -D<key=value>
to
>>> -XD<key=value>.
>>> And beware, it will be changed again in some tine, to be RI-like:
>>> -XX:<key=value>
>
>Morozova, Nadezhda wrote:
>> Hi,
>> Could somebody please adjust the Wiki page with the cmd options to
>> reflect such changes?
>> http://wiki.apache.org/harmony/DrlvmCommandLineOptions
>
>Done
>
>--
>Salikh Zakirov
Re: how to get the time used by the OPT, JET?
Posted by Salikh Zakirov <Sa...@Intel.com>.
>> From: Alexey Varlamov [mailto:alexey.v.varlamov@gmail.com]
>> Cmdline syntax of VM internal options was changed from -D<key=value> to
>> -XD<key=value>.
>> And beware, it will be changed again in some tine, to be RI-like:
>> -XX:<key=value>
Morozova, Nadezhda wrote:
> Hi,
> Could somebody please adjust the Wiki page with the cmd options to
> reflect such changes?
> http://wiki.apache.org/harmony/DrlvmCommandLineOptions
Done
--
Salikh Zakirov
Re: how to get the time used by the OPT, JET?
Posted by Rana Dasgupta <rd...@gmail.com>.
That's good, thanks Mikhail. And I agree about JET.
On 1/25/07, Mikhail Fursov <mi...@gmail.com> wrote:
>
> Hi Rana,
>
> On 1/25/07, Rana Dasgupta <rd...@gmail.com> wrote:
> >
> > Hi,
> > For the jit guys, I have a somewhat (?) related question.
> > When looking at the jit logs for tight loops like:
> >
> > for( indx = 0; indx < 1000; indx++)
> > {
> > afrom[indx] = afrom[indx + 1];
> > }
> >
> > which is fairly common in Spec sequences, sorts, etc.....
> > there are of course three checks during the assignmnet ...null check,
> type
> > check and bounds check. I wanted to make sure that for the above pattern
> of
> > code, the type check was being optimized away. Though is is more potent
> in
> > the jet compiler which I think calls a helper for this, I wanted to
> > check this in the opt compiler. I am quite new to jitrino's logs.
> >
>
> I have 2 comments here:
> 1) Let's avoid any optimizations in JET and leave it as simple as
> possilble.
> Reasons: a) all hotstops are Jitrino.OPT targets b) Jitrino.JET is already
> ~
> 10 times faster then SUN interpreter.
>
> 2) I tried the method:
> public static int foo6(String[] afrom) {
> for( int indx = 0; indx < 1000; indx++) {
> afrom[indx] = afrom[indx + 1];
> }
> return 0;
> }
>
> The complete IR is:
> -------- irDump: Test::foo6 --------
> Block ENTRY:
> Predecessors:
> Successors: L1
> I0:--- MethodEntry(Test::foo6): ()
> I4:defarg -) g1:cls:java/lang/String[]
> I6:ldci4 #0 -) g3:int32
> I7:stvar g3 -) v1:int32
> GOTO L1
>
> Block L1:
> Predecessors: ENTRY L10
> Successors: L3 L2
> I1:L1:
> I8:ldvar v1 -) t4:int32
> I9:ldci4 #1000 -) t5:int32
> I10:if cge.i4 t4, t5 goto L3
> GOTO L2
>
> Block L2:
> Predecessors: L1
> Successors: L8 UNWIND
> I2:L2:
> I11:ldci4 #1 -) t6:int32
> I12:add t4, t6 -) t7:int32
> I13:chknull g1 -) t8:tau
> GOTO L8
>
> Block L8:
> Predecessors: L2
> Successors: L9 UNWIND
> I34:L8:
> I14:tauhastype g1,cls:java/lang/String[] -) t9:tau
> I15:arraylen g1 ((t8,t9)) -) t10:int32
> I16:chkbounds t7 .lt. t10 -) t11:tau
> GOTO L9
>
> Block L9:
> Predecessors: L8
> Successors: L10 UNWIND
> I35:L9:
> I17:tauand t9, t11 -) t12:tau
> I18:ldbase g1 -) t13:ref:cls:java/lang/String
> I19:addindex t13, t7 -) t14:ref:cls:java/lang/String
> I20:ldind.unc:str [t14] ((t8,t12)) -) t15:cls:java/lang/String
> I21:chkbounds t4 .lt. t10 -) t16:tau
> GOTO L10
>
> Block UNWIND:
> Predecessors: L2 L8 L9
> Successors: EXIT
> I32:L6:
> GOTO EXIT
>
> Block L10:
> Predecessors: L9
> Successors: L1
> I36:L10:
> I22:tauand t9, t16 -) t17:tau
> I23:tauexacttype g1,cls:java/lang/String[] -) t18:tau
> I24:addindex t13, t4 -) t19:ref:cls:java/lang/String
> I25:stind.unc:str t15 ((t8,t17,t18)) -) [t19]
> I26:stvar t7 -) v1:int32
> GOTO L1
>
> Block L3:
> Predecessors: L1
> Successors: RETURN
> I3:L3:
> I29:return g3
>
> Block RETURN:
> Predecessors: L3
> Successors: EXIT
> I31:L5:
> GOTO EXIT
>
> Block EXIT:
> Predecessors: RETURN UNWIND
> Successors:
> I33:L7:
>
> Loop exits are:
> 1) I10:if cge.i4 t4, t5 goto L3 -> bounds check->OK (a candidate for
> unroll optimization I'm finishing now)
> 2) I13:chknull g1 -) t8:tau -> checks that array is not NULL. The
> optimization to move this check out of the loop is loop peeling and it is
> enabled only in server mode today. However if NullPointerException is not
> caught in the same method, Jitrino.OPT does not generate null-checks and
> hardware exception filter is used here.
> 3) I16:chkbounds t7 .lt. t10 -) t11:tau and
> 4) I21:chkbounds t4 .lt. t10 -) t16:tau are bounds checks for [i], [i+1]
> elements. I think it's ok too. We need these checks because loop limit is
> not arr.length but some number. May be abcd can help us here?
>
> The taus like
> I14:tauhastype g1,cls:java/lang/String[] -) t9:tau
> and
> I23:tauexacttype g1,cls:java/lang/String[] -) t18:tau
> are assertions(statements) in Jitrino.OPT. No checking code is generated
> and
> these tau can be used as 'true' or 'check was done' flag in a code it
> dominates.
>
> But looking at L8, L9, L10, I am not sure that I understand that the type
> > check is going away, or what is happening to tauhastype.
> >
>
> It's easy to understand with taus if 'tau' is a simple statement or a
> helper
> call. If tau-op finishes the block and you see exception edge -> Jitrino's
> optimizer treats it like a helper call (but the call still can be
> eliminated
> in CG!). If tau does not ends a block -> this is a statement and there
> will
> no code generated for it.
>
> Is there a manual on the tau operators that the non jitrino people can
> read
> > ?
> >
>
> I've never seen this manual. I've learned taus from the code and IR by
> myself. But I'm going to ask this question and will send a reply if the
> manual exists :)
>
> --
> Mikhail Fursov
>
>
Re: how to get the time used by the OPT, JET?
Posted by Naveen Neelakantam <ne...@uiuc.edu>.
On Jan 27, 2007, at 6:25 AM, Egor Pasko wrote:
> On the 0x269 day of Apache Harmony Mikhail Fursov wrote:
>> Hi Rana,
>>
>> On 1/25/07, Rana Dasgupta <rd...@gmail.com> wrote:
>>>
>>> Hi,
>>> For the jit guys, I have a somewhat (?) related question.
>>> When looking at the jit logs for tight loops like:
>>>
>>> for( indx = 0; indx < 1000; indx++)
>>> {
>>> afrom[indx] = afrom[indx + 1];
>>> }
>>>
>>> which is fairly common in Spec sequences, sorts, etc.....
>>> there are of course three checks during the assignmnet ...null
>>> check, type
>>> check and bounds check. I wanted to make sure that for the above
>>> pattern of
>>> code, the type check was being optimized away. Though is is more
>>> potent in
>>> the jet compiler which I think calls a helper for this, I wanted to
>>> check this in the opt compiler. I am quite new to jitrino's logs.
>>>
>>
>> I have 2 comments here:
>> 1) Let's avoid any optimizations in JET and leave it as simple as
>> possilble.
>> Reasons: a) all hotstops are Jitrino.OPT targets b) Jitrino.JET is
>> already ~
>> 10 times faster then SUN interpreter.
>>
>> 2) I tried the method:
>> public static int foo6(String[] afrom) {
>> for( int indx = 0; indx < 1000; indx++) {
>> afrom[indx] = afrom[indx + 1];
>> }
>> return 0;
>> }
>>
>> The complete IR is:
>> -------- irDump: Test::foo6 --------
>> Block ENTRY:
>> Predecessors:
>> Successors: L1
>> I0:--- MethodEntry(Test::foo6): ()
>> I4:defarg -) g1:cls:java/lang/String[]
>> I6:ldci4 #0 -) g3:int32
>> I7:stvar g3 -) v1:int32
>> GOTO L1
>>
>> Block L1:
>> Predecessors: ENTRY L10
>> Successors: L3 L2
>> I1:L1:
>> I8:ldvar v1 -) t4:int32
>> I9:ldci4 #1000 -) t5:int32
>> I10:if cge.i4 t4, t5 goto L3
>> GOTO L2
>>
>> Block L2:
>> Predecessors: L1
>> Successors: L8 UNWIND
>> I2:L2:
>> I11:ldci4 #1 -) t6:int32
>> I12:add t4, t6 -) t7:int32
>> I13:chknull g1 -) t8:tau
>> GOTO L8
>>
>> Block L8:
>> Predecessors: L2
>> Successors: L9 UNWIND
>> I34:L8:
>> I14:tauhastype g1,cls:java/lang/String[] -) t9:tau
>> I15:arraylen g1 ((t8,t9)) -) t10:int32
>> I16:chkbounds t7 .lt. t10 -) t11:tau
>> GOTO L9
>>
>> Block L9:
>> Predecessors: L8
>> Successors: L10 UNWIND
>> I35:L9:
>> I17:tauand t9, t11 -) t12:tau
>> I18:ldbase g1 -) t13:ref:cls:java/lang/String
>> I19:addindex t13, t7 -) t14:ref:cls:java/lang/String
>> I20:ldind.unc:str [t14] ((t8,t12)) -) t15:cls:java/lang/String
>> I21:chkbounds t4 .lt. t10 -) t16:tau
>> GOTO L10
>>
>> Block UNWIND:
>> Predecessors: L2 L8 L9
>> Successors: EXIT
>> I32:L6:
>> GOTO EXIT
>>
>> Block L10:
>> Predecessors: L9
>> Successors: L1
>> I36:L10:
>> I22:tauand t9, t16 -) t17:tau
>> I23:tauexacttype g1,cls:java/lang/String[] -) t18:tau
>> I24:addindex t13, t4 -) t19:ref:cls:java/lang/String
>> I25:stind.unc:str t15 ((t8,t17,t18)) -) [t19]
>> I26:stvar t7 -) v1:int32
>> GOTO L1
>>
>> Block L3:
>> Predecessors: L1
>> Successors: RETURN
>> I3:L3:
>> I29:return g3
>>
>> Block RETURN:
>> Predecessors: L3
>> Successors: EXIT
>> I31:L5:
>> GOTO EXIT
>>
>> Block EXIT:
>> Predecessors: RETURN UNWIND
>> Successors:
>> I33:L7:
>>
>> Loop exits are:
>> 1) I10:if cge.i4 t4, t5 goto L3 -> bounds check->OK (a
>> candidate for
>> unroll optimization I'm finishing now)
>> 2) I13:chknull g1 -) t8:tau -> checks that array is not NULL. The
>> optimization to move this check out of the loop is loop peeling
>> and it is
>> enabled only in server mode today. However if NullPointerException
>> is not
>> caught in the same method, Jitrino.OPT does not generate null-
>> checks and
>> hardware exception filter is used here.
>> 3) I16:chkbounds t7 .lt. t10 -) t11:tau and
>> 4) I21:chkbounds t4 .lt. t10 -) t16:tau are bounds checks for
>> [i], [i+1]
>> elements. I think it's ok too. We need these checks because loop
>> limit is
>> not arr.length but some number. May be abcd can help us here?
>
> Unfortunately, not. Pure ABCD does not solve this bound check. We need
> a proper "loop versioning" for ABCD to solve it. TBD.
I believe ABCD would remove (4), the check for afrom[i]. It is
dominated by (3), the check for afrom[i +1].
And if the loop is peeled or unrolled, I believe all but the first
bounds check would be eliminated.
We need Egor's reimplementation ABCD thought to try this out. I
think I've finished it, but have not contributed the changes back yet.
>
>> The taus like
>> I14:tauhastype g1,cls:java/lang/String[] -) t9:tau
>> and
>> I23:tauexacttype g1,cls:java/lang/String[] -) t18:tau
>> are assertions(statements) in Jitrino.OPT. No checking code is
>> generated and
>> these tau can be used as 'true' or 'check was done' flag in a code it
>> dominates.
>>
>> But looking at L8, L9, L10, I am not sure that I understand that
>> the type
>>> check is going away, or what is happening to tauhastype.
>>>
>>
>> It's easy to understand with taus if 'tau' is a simple statement
>> or a helper
>> call. If tau-op finishes the block and you see exception edge ->
>> Jitrino's
>> optimizer treats it like a helper call (but the call still can be
>> eliminated
>> in CG!). If tau does not ends a block -> this is a statement and
>> there will
>> no code generated for it.
>>
>> Is there a manual on the tau operators that the non jitrino people
>> can read
>>> ?
>>>
>>
>> I've never seen this manual. I've learned taus from the code and
>> IR by
>> myself. But I'm going to ask this question and will send a reply
>> if the
>> manual exists :)
>>
>> --
>> Mikhail Fursov
>
> --
> Egor Pasko
>
Re: how to get the time used by the OPT, JET?
Posted by Egor Pasko <eg...@gmail.com>.
On the 0x269 day of Apache Harmony Mikhail Fursov wrote:
> Hi Rana,
>
> On 1/25/07, Rana Dasgupta <rd...@gmail.com> wrote:
> >
> > Hi,
> > For the jit guys, I have a somewhat (?) related question.
> > When looking at the jit logs for tight loops like:
> >
> > for( indx = 0; indx < 1000; indx++)
> > {
> > afrom[indx] = afrom[indx + 1];
> > }
> >
> > which is fairly common in Spec sequences, sorts, etc.....
> > there are of course three checks during the assignmnet ...null check, type
> > check and bounds check. I wanted to make sure that for the above pattern of
> > code, the type check was being optimized away. Though is is more potent in
> > the jet compiler which I think calls a helper for this, I wanted to
> > check this in the opt compiler. I am quite new to jitrino's logs.
> >
>
> I have 2 comments here:
> 1) Let's avoid any optimizations in JET and leave it as simple as possilble.
> Reasons: a) all hotstops are Jitrino.OPT targets b) Jitrino.JET is already ~
> 10 times faster then SUN interpreter.
>
> 2) I tried the method:
> public static int foo6(String[] afrom) {
> for( int indx = 0; indx < 1000; indx++) {
> afrom[indx] = afrom[indx + 1];
> }
> return 0;
> }
>
> The complete IR is:
> -------- irDump: Test::foo6 --------
> Block ENTRY:
> Predecessors:
> Successors: L1
> I0:--- MethodEntry(Test::foo6): ()
> I4:defarg -) g1:cls:java/lang/String[]
> I6:ldci4 #0 -) g3:int32
> I7:stvar g3 -) v1:int32
> GOTO L1
>
> Block L1:
> Predecessors: ENTRY L10
> Successors: L3 L2
> I1:L1:
> I8:ldvar v1 -) t4:int32
> I9:ldci4 #1000 -) t5:int32
> I10:if cge.i4 t4, t5 goto L3
> GOTO L2
>
> Block L2:
> Predecessors: L1
> Successors: L8 UNWIND
> I2:L2:
> I11:ldci4 #1 -) t6:int32
> I12:add t4, t6 -) t7:int32
> I13:chknull g1 -) t8:tau
> GOTO L8
>
> Block L8:
> Predecessors: L2
> Successors: L9 UNWIND
> I34:L8:
> I14:tauhastype g1,cls:java/lang/String[] -) t9:tau
> I15:arraylen g1 ((t8,t9)) -) t10:int32
> I16:chkbounds t7 .lt. t10 -) t11:tau
> GOTO L9
>
> Block L9:
> Predecessors: L8
> Successors: L10 UNWIND
> I35:L9:
> I17:tauand t9, t11 -) t12:tau
> I18:ldbase g1 -) t13:ref:cls:java/lang/String
> I19:addindex t13, t7 -) t14:ref:cls:java/lang/String
> I20:ldind.unc:str [t14] ((t8,t12)) -) t15:cls:java/lang/String
> I21:chkbounds t4 .lt. t10 -) t16:tau
> GOTO L10
>
> Block UNWIND:
> Predecessors: L2 L8 L9
> Successors: EXIT
> I32:L6:
> GOTO EXIT
>
> Block L10:
> Predecessors: L9
> Successors: L1
> I36:L10:
> I22:tauand t9, t16 -) t17:tau
> I23:tauexacttype g1,cls:java/lang/String[] -) t18:tau
> I24:addindex t13, t4 -) t19:ref:cls:java/lang/String
> I25:stind.unc:str t15 ((t8,t17,t18)) -) [t19]
> I26:stvar t7 -) v1:int32
> GOTO L1
>
> Block L3:
> Predecessors: L1
> Successors: RETURN
> I3:L3:
> I29:return g3
>
> Block RETURN:
> Predecessors: L3
> Successors: EXIT
> I31:L5:
> GOTO EXIT
>
> Block EXIT:
> Predecessors: RETURN UNWIND
> Successors:
> I33:L7:
>
> Loop exits are:
> 1) I10:if cge.i4 t4, t5 goto L3 -> bounds check->OK (a candidate for
> unroll optimization I'm finishing now)
> 2) I13:chknull g1 -) t8:tau -> checks that array is not NULL. The
> optimization to move this check out of the loop is loop peeling and it is
> enabled only in server mode today. However if NullPointerException is not
> caught in the same method, Jitrino.OPT does not generate null-checks and
> hardware exception filter is used here.
> 3) I16:chkbounds t7 .lt. t10 -) t11:tau and
> 4) I21:chkbounds t4 .lt. t10 -) t16:tau are bounds checks for [i], [i+1]
> elements. I think it's ok too. We need these checks because loop limit is
> not arr.length but some number. May be abcd can help us here?
Unfortunately, not. Pure ABCD does not solve this bound check. We need
a proper "loop versioning" for ABCD to solve it. TBD.
> The taus like
> I14:tauhastype g1,cls:java/lang/String[] -) t9:tau
> and
> I23:tauexacttype g1,cls:java/lang/String[] -) t18:tau
> are assertions(statements) in Jitrino.OPT. No checking code is generated and
> these tau can be used as 'true' or 'check was done' flag in a code it
> dominates.
>
> But looking at L8, L9, L10, I am not sure that I understand that the type
> > check is going away, or what is happening to tauhastype.
> >
>
> It's easy to understand with taus if 'tau' is a simple statement or a helper
> call. If tau-op finishes the block and you see exception edge -> Jitrino's
> optimizer treats it like a helper call (but the call still can be eliminated
> in CG!). If tau does not ends a block -> this is a statement and there will
> no code generated for it.
>
> Is there a manual on the tau operators that the non jitrino people can read
> > ?
> >
>
> I've never seen this manual. I've learned taus from the code and IR by
> myself. But I'm going to ask this question and will send a reply if the
> manual exists :)
>
> --
> Mikhail Fursov
--
Egor Pasko
Re: how to get the time used by the OPT, JET?
Posted by Mikhail Fursov <mi...@gmail.com>.
Hi Rana,
On 1/25/07, Rana Dasgupta <rd...@gmail.com> wrote:
>
> Hi,
> For the jit guys, I have a somewhat (?) related question.
> When looking at the jit logs for tight loops like:
>
> for( indx = 0; indx < 1000; indx++)
> {
> afrom[indx] = afrom[indx + 1];
> }
>
> which is fairly common in Spec sequences, sorts, etc.....
> there are of course three checks during the assignmnet ...null check, type
> check and bounds check. I wanted to make sure that for the above pattern of
> code, the type check was being optimized away. Though is is more potent in
> the jet compiler which I think calls a helper for this, I wanted to
> check this in the opt compiler. I am quite new to jitrino's logs.
>
I have 2 comments here:
1) Let's avoid any optimizations in JET and leave it as simple as possilble.
Reasons: a) all hotstops are Jitrino.OPT targets b) Jitrino.JET is already ~
10 times faster then SUN interpreter.
2) I tried the method:
public static int foo6(String[] afrom) {
for( int indx = 0; indx < 1000; indx++) {
afrom[indx] = afrom[indx + 1];
}
return 0;
}
The complete IR is:
-------- irDump: Test::foo6 --------
Block ENTRY:
Predecessors:
Successors: L1
I0:--- MethodEntry(Test::foo6): ()
I4:defarg -) g1:cls:java/lang/String[]
I6:ldci4 #0 -) g3:int32
I7:stvar g3 -) v1:int32
GOTO L1
Block L1:
Predecessors: ENTRY L10
Successors: L3 L2
I1:L1:
I8:ldvar v1 -) t4:int32
I9:ldci4 #1000 -) t5:int32
I10:if cge.i4 t4, t5 goto L3
GOTO L2
Block L2:
Predecessors: L1
Successors: L8 UNWIND
I2:L2:
I11:ldci4 #1 -) t6:int32
I12:add t4, t6 -) t7:int32
I13:chknull g1 -) t8:tau
GOTO L8
Block L8:
Predecessors: L2
Successors: L9 UNWIND
I34:L8:
I14:tauhastype g1,cls:java/lang/String[] -) t9:tau
I15:arraylen g1 ((t8,t9)) -) t10:int32
I16:chkbounds t7 .lt. t10 -) t11:tau
GOTO L9
Block L9:
Predecessors: L8
Successors: L10 UNWIND
I35:L9:
I17:tauand t9, t11 -) t12:tau
I18:ldbase g1 -) t13:ref:cls:java/lang/String
I19:addindex t13, t7 -) t14:ref:cls:java/lang/String
I20:ldind.unc:str [t14] ((t8,t12)) -) t15:cls:java/lang/String
I21:chkbounds t4 .lt. t10 -) t16:tau
GOTO L10
Block UNWIND:
Predecessors: L2 L8 L9
Successors: EXIT
I32:L6:
GOTO EXIT
Block L10:
Predecessors: L9
Successors: L1
I36:L10:
I22:tauand t9, t16 -) t17:tau
I23:tauexacttype g1,cls:java/lang/String[] -) t18:tau
I24:addindex t13, t4 -) t19:ref:cls:java/lang/String
I25:stind.unc:str t15 ((t8,t17,t18)) -) [t19]
I26:stvar t7 -) v1:int32
GOTO L1
Block L3:
Predecessors: L1
Successors: RETURN
I3:L3:
I29:return g3
Block RETURN:
Predecessors: L3
Successors: EXIT
I31:L5:
GOTO EXIT
Block EXIT:
Predecessors: RETURN UNWIND
Successors:
I33:L7:
Loop exits are:
1) I10:if cge.i4 t4, t5 goto L3 -> bounds check->OK (a candidate for
unroll optimization I'm finishing now)
2) I13:chknull g1 -) t8:tau -> checks that array is not NULL. The
optimization to move this check out of the loop is loop peeling and it is
enabled only in server mode today. However if NullPointerException is not
caught in the same method, Jitrino.OPT does not generate null-checks and
hardware exception filter is used here.
3) I16:chkbounds t7 .lt. t10 -) t11:tau and
4) I21:chkbounds t4 .lt. t10 -) t16:tau are bounds checks for [i], [i+1]
elements. I think it's ok too. We need these checks because loop limit is
not arr.length but some number. May be abcd can help us here?
The taus like
I14:tauhastype g1,cls:java/lang/String[] -) t9:tau
and
I23:tauexacttype g1,cls:java/lang/String[] -) t18:tau
are assertions(statements) in Jitrino.OPT. No checking code is generated and
these tau can be used as 'true' or 'check was done' flag in a code it
dominates.
But looking at L8, L9, L10, I am not sure that I understand that the type
> check is going away, or what is happening to tauhastype.
>
It's easy to understand with taus if 'tau' is a simple statement or a helper
call. If tau-op finishes the block and you see exception edge -> Jitrino's
optimizer treats it like a helper call (but the call still can be eliminated
in CG!). If tau does not ends a block -> this is a statement and there will
no code generated for it.
Is there a manual on the tau operators that the non jitrino people can read
> ?
>
I've never seen this manual. I've learned taus from the code and IR by
myself. But I'm going to ask this question and will send a reply if the
manual exists :)
--
Mikhail Fursov
Re: how to get the time used by the OPT, JET?
Posted by Rana Dasgupta <rd...@gmail.com>.
Hi,
For the jit guys, I have a somewhat (?) related question.
When looking at the jit logs for tight loops like:
for( indx = 0; indx < 1000; indx++)
{
afrom[indx] = afrom[indx + 1];
}
which is fairly common in Spec sequences, sorts, etc.....
there are of course three checks during the assignmnet ...null check, type
check and bounds check. I wanted to make sure that for the above pattern of
code, the type check was being optimized away. Though is is more potent in
the jet compiler which I think calls a helper for this, I wanted to
check this in the opt compiler. I am quite new to jitrino's logs.
In the debugger, I see that the jitrino.opt compilation does
genTauCheckElementType() which finally simplifies through
simplifytaucheckelementtype(). This does a subclass check and for the above
generates a genTauHasExactType...
In the log ( attached ) , in the HIR, after global operand analysis, the ct
log shows:
Block L2:
Predecessors: L1
Successors: L8 UNWIND
I2:L2:
I11:ldci4 #1 -) t6:int32
I12:add t4, t6 -) t7:int32
I13:chknull g1 -) t8:tau
GOTO L8
Block L8:
Predecessors: L2
Successors: L9 UNWIND
I33:L8:
I14:tauhastype g1,cls:ArrayRef[] -) t9:tau
I15:arraylen g1 ((t8,t9)) -) t10:int32
I16:chkbounds t7 .lt. t10 -) t11:tau
GOTO L9
Block L9:
Predecessors: L8
Successors: L10 UNWIND
I34:L9:
I17:tauand t9, t11 -) t12:tau
I18:ldbase g1 -) t13:ref:cls:ArrayRef
I19:addindex t13, t7 -) t14:ref:cls:ArrayRef
I20:ldind.unc:o [t14] ((t8,t12)) -) t15:cls:ArrayRef
I21:chkbounds t4 .lt. t10 -) t16:tau
GOTO L10
Block UNWIND:
Predecessors: L2 L8 L9
Successors: EXIT
I31:L6:
GOTO EXIT
Block L10:
Predecessors: L9
Successors: L1
I35:L10:
I22:tauand t9, t16 -) t17:tau
I23:tausafe() -) t18:tau
I24:addindex t13, t4 -) t19:ref:cls:ArrayRef
I25:stind.unc:o t15 ((t8,t17,t18)) -) [t19]
I26:stvar t7 -) v1:int32
GOTO L1
But looking at L8, L9, L10, I am not sure that I understand that the type
check is going away, or what is happening to tauhastype. Is there a manual
on the tau operators that the non jitrino people can read ? I think the
final code generated is fine since the only exception being checked in the
generated code is the bounds check. Sorry for the long question.
Rana
On 1/18/07, Mikhail Fursov <mi...@gmail.com> wrote:
>
> Answers:
>
> On 1/18/07, zouqiong <us...@gmail.com> wrote:
> >
> > Thanks. I want to know about three things:
> >
> > 1) the compilation time for both OPT and JET.
>
>
> -XDjit.arg.time=on
> If you need to measure total time for your code/algorithm add new timer.
> See
> any of existing timers (search by it's name in log) to see how it's work.
>
> 2) IR and compilation log for a method compiled by OPT.
>
>
> All IR:
> -Xem:opt -XDjit.arg.log=ct,irdump,dotdump
>
> IR for the specified method:
> -Xem:opt -XDjit.CS_OPT.f.filter=Test::main -XDjit.f.arg.log=ct
> ,irdump,dotdump
>
>
> Read this doc to learn more:
> http://harmony.apache.org/subcomponents/drlvm/JIT_PMF.html
>
> 3) some runtime metrics for managed code.
>
>
> -Xem:opt -XDjit.arg.codegen.iprof=on -
> XDjit.arg.codegen.iprof.config=iprof.cfg
> Note! you can use per-method filters here too.
> Read this doc to learn more:
> http://harmony.apache.org/subcomponents/drlvm/internal_profiler.html
>
>
> --
> Mikhail Fursov
>
>
Re: how to get the time used by the OPT, JET?
Posted by Mikhail Fursov <mi...@gmail.com>.
Answers:
On 1/18/07, zouqiong <us...@gmail.com> wrote:
>
> Thanks. I want to know about three things:
>
> 1) the compilation time for both OPT and JET.
-XDjit.arg.time=on
If you need to measure total time for your code/algorithm add new timer. See
any of existing timers (search by it's name in log) to see how it's work.
2) IR and compilation log for a method compiled by OPT.
All IR:
-Xem:opt -XDjit.arg.log=ct,irdump,dotdump
IR for the specified method:
-Xem:opt -XDjit.CS_OPT.f.filter=Test::main -XDjit.f.arg.log=ct,irdump,dotdump
Read this doc to learn more:
http://harmony.apache.org/subcomponents/drlvm/JIT_PMF.html
3) some runtime metrics for managed code.
-Xem:opt -XDjit.arg.codegen.iprof=on -
XDjit.arg.codegen.iprof.config=iprof.cfg
Note! you can use per-method filters here too.
Read this doc to learn more:
http://harmony.apache.org/subcomponents/drlvm/internal_profiler.html
--
Mikhail Fursov
Re: how to get the time used by the OPT, JET?
Posted by zouqiong <us...@gmail.com>.
Thanks. I want to know about three things:
1) the compilation time for both OPT and JET.
2) IR and compilation log for a method compiled by OPT.
3) some runtime metrics for managed code.
Zouqiong,
> I need to understand more precisely what do you want to get from log:
> 1) Do you need to know the compilation time for JET/OPT ?
> or
> 2) Do you need to know which method is compiled by JET/OPT and when it
> happens?
> or
> 3) Do you need to get IR and compilation log for a method compiled by
> JIT/OPT?
> or
> 4) Do you need to know some runtime (not compile time) metrics for managed
> code?
>
> Some logging options for JET and OPT are different. I need more details
> before I can help you.
>
> --
> Mikhail Fursov
>
>
--
Best Regards,
Qiong,Zou
Re: how to get the time used by the OPT, JET?
Posted by Mikhail Fursov <mi...@gmail.com>.
On 1/17/07, zouqiong <us...@gmail.com> wrote:
>
> Thanks for your reply.
> But I am afraid it didn't work.
>
> I want to know all the time spend in the OPT compiler and JET compiler.
Zouqiong,
I need to understand more precisely what do you want to get from log:
1) Do you need to know the compilation time for JET/OPT ?
or
2) Do you need to know which method is compiled by JET/OPT and when it
happens?
or
3) Do you need to get IR and compilation log for a method compiled by
JIT/OPT?
or
4) Do you need to know some runtime (not compile time) metrics for managed
code?
Some logging options for JET and OPT are different. I need more details
before I can help you.
--
Mikhail Fursov
Re: how to get the time used by the OPT, JET?
Posted by zouqiong <us...@gmail.com>.
Thanks for your reply.
But I am afraid it didn't work.
I want to know all the time spend in the OPT compiler and JET compiler.
Can you tell me about the detailed option?
2007/1/17, Alexey Varlamov <al...@gmail.com>:
>
> Cmdline syntax of VM internal options was changed from -D<key=value> to
> -XD<key=value>.
> And beware, it will be changed again in some tine, to be RI-like:
> -XX:<key=value>
>
> 2007/1/17, zouqiong <us...@gmail.com>:
> > I try option *-Djit.arg.log=ct,irdump,dotdump,info, and it seems not
> > working.
> > The version of DRLVM I use is 438320.
> >
> > Thanks
> >
> > *--
> > Best Regards,
> > Qiong,Zou
> >
> >
>
--
Best Regards,
Qiong,Zou
RE: how to get the time used by the OPT, JET?
Posted by "Morozova, Nadezhda" <na...@intel.com>.
Hi,
Could somebody please adjust the Wiki page with the cmd options to
reflect such changes?
http://wiki.apache.org/harmony/DrlvmCommandLineOptions
Cheers,
Nadya
>-----Original Message-----
>From: Alexey Varlamov [mailto:alexey.v.varlamov@gmail.com]
>Sent: Wednesday, January 17, 2007 8:31 AM
>To: dev@harmony.apache.org
>Subject: Re: how to get the time used by the OPT, JET?
>
>Cmdline syntax of VM internal options was changed from -D<key=value> to
>-XD<key=value>.
>And beware, it will be changed again in some tine, to be RI-like:
>-XX:<key=value>
>
>2007/1/17, zouqiong <us...@gmail.com>:
>> I try option *-Djit.arg.log=ct,irdump,dotdump,info, and it seems not
>> working.
>> The version of DRLVM I use is 438320.
>>
>> Thanks
>>
>> *--
>> Best Regards,
>> Qiong,Zou
>>
>>
Re: how to get the time used by the OPT, JET?
Posted by Alexey Varlamov <al...@gmail.com>.
Cmdline syntax of VM internal options was changed from -D<key=value> to
-XD<key=value>.
And beware, it will be changed again in some tine, to be RI-like:
-XX:<key=value>
2007/1/17, zouqiong <us...@gmail.com>:
> I try option *-Djit.arg.log=ct,irdump,dotdump,info, and it seems not
> working.
> The version of DRLVM I use is 438320.
>
> Thanks
>
> *--
> Best Regards,
> Qiong,Zou
>
>