You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Nathan Beyer <nd...@apache.org> on 2007/04/18 07:52:57 UTC

[drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Would anyone else like to review this patch? It's somewhat
significant. I've tested it on a P4/WinXP and DRLVM works without any
noticeable regressions. I've done some initial tests on a Quad
P3/Ubuntu and I can now run a simple Hello World with the default JIT,
which is a huge step.

If no one has any issues, I'm going to commit this patch.

-Nathan

---------- Forwarded message ----------
From: Nathan Beyer (JIRA) <ji...@apache.org>
Date: Apr 18, 2007 12:49 AM
Subject: [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted
code can not be executed on non-SSE2 platforms
To: commits@harmony.apache.org



    [ https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614
]

Nathan Beyer commented on HARMONY-3246:
---------------------------------------

I've test this on a Linux P3 and it seems to work. I'm now able to run
a simple hello world. Additionally, everything seems to work as it did
on a P4/WinXP.

Let's see if we can get a few more people to review the code.

> [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-3246
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3246
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Nikolay Sidelnikov
>         Assigned To: Nathan Beyer
>         Attachments: p5_fixed_commented.patch
>
>
> Jitrino generates code with SSE and SSE2 instructions which can not be executed on processors older than Pentium 4.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Gregory Shimansky <gs...@gmail.com>.
Mikhail Fursov wrote:
> JET replies on SSE2 instructions and this patch does not fix it. The patch
> fixes only OPT.
> "client" mode contains JET as a first JIT, but I added code to JET to check
> if SSE2 is available and refuse compilation if not.
> The second JIT in 'client' mode is OPT and after JET is refused to 
> compile a
> method, OPT compiles it.
> 
> I have another idea to check in JET if method contains double ops and
> compile it if it does not. It will improve startup time and JVMTI support
> significantly before JET is able to support 'doubles' on i586, because of
> only small number of methods use doubles.
> But I do not want putting all the changes into the same patch and propose
> moving by small steps.
> My proposal is committing this patch (after p3 is renamed to 'i586') and
> open new JIRAs for every problem we have like
> 1) support doubles in JET for non-SSE2 platforms
> 2) various bugs on i586 platforms
> 3) making JET compile methods without doubles on i586 until item1) is 
> ready.
> 
> 
> What do you think on this?

I can guess now why JVMTI tests are failing. JVMTI relies heavily on JET 
because only JET implements functions like get_bc_location_for_native 
and get_native_location_for_bc. When JVMTI mode is enabled on the 
command line (e.g. something like -agentlib or -agentpath is specified), 
EM chooses ti.emconf instead of the default client.emconf file which 
defines only one JIT chain - JET_TI. If JET refuses to compile the 
methods,  and there is no 2nd chain, the program won't be executed.

-- 
Gregory


Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Nathan Beyer <nd...@apache.org>.
Sweet. I'll be waiting for the JIRA issue. Thanks.

-Nathan

On 4/20/07, Mikhail Fursov <mi...@gmail.com> wrote:
> I think yes. I'm going to test and provide the next patch on Monday. It will
> enable JET for all methods without double ops.
>
> On 4/21/07, Nathan Beyer <nd...@apache.org> wrote:
> >
> > I'm fine with limiting this patch and setting up the next steps.
> > Should we create some JIRAs for those steps?
> >
> > -Nathan
> >
> > On 4/20/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > > On 4/21/07, Rana Dasgupta <rd...@gmail.com> wrote:
> > > >
> > > > On 4/19/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > > > > JET replies on SSE2 instructions and this patch does not fix it. The
> > > > patch
> > > > > fixes only OPT.
> > > > > "client" mode contains JET as a first JIT, but I added code to JET
> > to
> > > > check
> > > > > if SSE2 is available and refuse compilation if not.
> > > > > The second JIT in 'client' mode is OPT and after JET is refused to
> > > > compile a
> > > > > method, OPT compiles it.
> > > > >
> > > > > I have another idea to check in JET if method contains double ops
> > and
> > > > > compile it if it does not. It will improve startup time and JVMTI
> > > > support
> > > > > significantly before JET is able to support 'doubles' on i586,
> > because
> > > > of
> > > > > only small number of methods use doubles.
> > > >
> > > > Good idea. This above on 586/P3 can be phase I of P3 support. The rest
> > > > is somewhat lower priority imho. Since the minimum it is being tested
> > > > on is P3, why not call it P3?
> > >
> > >
> > >  The first name was p5. My first patch with cpuid integration use
> > > 'p3' as the name. The only difference in the second patch is
> > > 'p3' name changed to 'i586'. So we have a choice here :)
> > > Actually I vote for the last
> > > name. However I do not think the name is really matters here. Comments
> > in
> > > the file give detailed description for those who interested in details.
> > >
> > > --
> > > Mikhail Fursov
> > >
> >
>
>
>
> --
> Mikhail Fursov
>

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Mikhail Fursov <mi...@gmail.com>.
I think yes. I'm going to test and provide the next patch on Monday. It will
enable JET for all methods without double ops.

On 4/21/07, Nathan Beyer <nd...@apache.org> wrote:
>
> I'm fine with limiting this patch and setting up the next steps.
> Should we create some JIRAs for those steps?
>
> -Nathan
>
> On 4/20/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > On 4/21/07, Rana Dasgupta <rd...@gmail.com> wrote:
> > >
> > > On 4/19/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > > > JET replies on SSE2 instructions and this patch does not fix it. The
> > > patch
> > > > fixes only OPT.
> > > > "client" mode contains JET as a first JIT, but I added code to JET
> to
> > > check
> > > > if SSE2 is available and refuse compilation if not.
> > > > The second JIT in 'client' mode is OPT and after JET is refused to
> > > compile a
> > > > method, OPT compiles it.
> > > >
> > > > I have another idea to check in JET if method contains double ops
> and
> > > > compile it if it does not. It will improve startup time and JVMTI
> > > support
> > > > significantly before JET is able to support 'doubles' on i586,
> because
> > > of
> > > > only small number of methods use doubles.
> > >
> > > Good idea. This above on 586/P3 can be phase I of P3 support. The rest
> > > is somewhat lower priority imho. Since the minimum it is being tested
> > > on is P3, why not call it P3?
> >
> >
> >  The first name was p5. My first patch with cpuid integration use
> > 'p3' as the name. The only difference in the second patch is
> > 'p3' name changed to 'i586'. So we have a choice here :)
> > Actually I vote for the last
> > name. However I do not think the name is really matters here. Comments
> in
> > the file give detailed description for those who interested in details.
> >
> > --
> > Mikhail Fursov
> >
>



-- 
Mikhail Fursov

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Nathan Beyer <nd...@apache.org>.
I'm fine with limiting this patch and setting up the next steps.
Should we create some JIRAs for those steps?

-Nathan

On 4/20/07, Mikhail Fursov <mi...@gmail.com> wrote:
> On 4/21/07, Rana Dasgupta <rd...@gmail.com> wrote:
> >
> > On 4/19/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > > JET replies on SSE2 instructions and this patch does not fix it. The
> > patch
> > > fixes only OPT.
> > > "client" mode contains JET as a first JIT, but I added code to JET to
> > check
> > > if SSE2 is available and refuse compilation if not.
> > > The second JIT in 'client' mode is OPT and after JET is refused to
> > compile a
> > > method, OPT compiles it.
> > >
> > > I have another idea to check in JET if method contains double ops and
> > > compile it if it does not. It will improve startup time and JVMTI
> > support
> > > significantly before JET is able to support 'doubles' on i586, because
> > of
> > > only small number of methods use doubles.
> >
> > Good idea. This above on 586/P3 can be phase I of P3 support. The rest
> > is somewhat lower priority imho. Since the minimum it is being tested
> > on is P3, why not call it P3?
>
>
>  The first name was p5. My first patch with cpuid integration use
> 'p3' as the name. The only difference in the second patch is
> 'p3' name changed to 'i586'. So we have a choice here :)
> Actually I vote for the last
> name. However I do not think the name is really matters here. Comments in
> the file give detailed description for those who interested in details.
>
> --
> Mikhail Fursov
>

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Mikhail Fursov <mi...@gmail.com>.
On 4/21/07, Rana Dasgupta <rd...@gmail.com> wrote:
>
> On 4/19/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > JET replies on SSE2 instructions and this patch does not fix it. The
> patch
> > fixes only OPT.
> > "client" mode contains JET as a first JIT, but I added code to JET to
> check
> > if SSE2 is available and refuse compilation if not.
> > The second JIT in 'client' mode is OPT and after JET is refused to
> compile a
> > method, OPT compiles it.
> >
> > I have another idea to check in JET if method contains double ops and
> > compile it if it does not. It will improve startup time and JVMTI
> support
> > significantly before JET is able to support 'doubles' on i586, because
> of
> > only small number of methods use doubles.
>
> Good idea. This above on 586/P3 can be phase I of P3 support. The rest
> is somewhat lower priority imho. Since the minimum it is being tested
> on is P3, why not call it P3?


 The first name was p5. My first patch with cpuid integration use
'p3' as the name. The only difference in the second patch is
'p3' name changed to 'i586'. So we have a choice here :)
Actually I vote for the last
name. However I do not think the name is really matters here. Comments in
the file give detailed description for those who interested in details.

-- 
Mikhail Fursov

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Rana Dasgupta <rd...@gmail.com>.
On 4/19/07, Mikhail Fursov <mi...@gmail.com> wrote:
> JET replies on SSE2 instructions and this patch does not fix it. The patch
> fixes only OPT.
> "client" mode contains JET as a first JIT, but I added code to JET to check
> if SSE2 is available and refuse compilation if not.
> The second JIT in 'client' mode is OPT and after JET is refused to compile a
> method, OPT compiles it.
>
> I have another idea to check in JET if method contains double ops and
> compile it if it does not. It will improve startup time and JVMTI support
> significantly before JET is able to support 'doubles' on i586, because of
> only small number of methods use doubles.

Good idea. This above on 586/P3 can be phase I of P3 support. The rest
is somewhat lower priority imho. Since the minimum it is being tested
on is P3, why not call it P3?

> But I do not want putting all the changes into the same patch and propose
> moving by small steps.
> My proposal is committing this patch (after p3 is renamed to 'i586') and
> open new JIRAs for every problem we have like
> 1) support doubles in JET for non-SSE2 platforms
> 2) various bugs on i586 platforms
> 3) making JET compile methods without doubles on i586 until item1) is ready.
>
>
> What do you think on this?
>
> On 4/20/07, Nathan Beyer <nd...@apache.org> wrote:
> >
> > I'm trying it again, but I believe so, yes. Should one of the tests
> > fails? Didn't you mention that JET wouldn't work? Is JET used in the
> > "client" test?
> >
> > -Nathan
> >
> > On 4/19/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > > And one more question: did these JVMTI tests passed with original patch?
> > >
> > > On 4/20/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > > >
> > > > Do you have the same JVMTI errors if you use -Xem:opt option?
> > > > I'll try to reproduce your errors by forcing isSSE2Supported() return
> > > > 'false' for every platform.
> > > >
> > > > On 4/20/07, Nathan Beyer <nd...@apache.org> wrote:
> > > > >
> > > > > I uploaded a test log that shows some errors from JVMTI tests (I
> > think
> > > > > that's what was blowing up). Those seem to be first if you just run
> > > > > "./build.sh test".
> > > > >
> > > > > I'm running "./build.sh smoke.test " and it executing right now, but
> > > > > it's very slow.
> > > > >
> > > > > -Nathan
> > > > >
> > > > > On 4/19/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > > > > > Check new patch, please.
> > > > > >
> > > > > > On 4/19/07, Nathan Beyer <nd...@apache.org> wrote:
> > > > > > >
> > > > > > > On 4/18/07, Mikhail Fursov <mike.fursov@gmail.com > wrote:
> > > > > > > > It's a good idea.
> > > > > > > > I'll do both: add k5 pass to all Jitrino.OPT configs and make
> > EM
> > > > > use
> > > > > > > > opt.emconf by default.
> > > > > > > > So there will no additional configuration nor command line
> > > > > options!
> > > > > > >
> > > > > > > I'm not sure what all this means, but if the last line means
> > DRLVM
> > > > > > > will run and pass its tests on a P3 straight out of the build,
> > then
> > > > > > > that's a +1 from me.
> > > > > > >
> > > > > > > Are you going to post a new patch to this bug? Just so I know
> > what
> > > > > to
> > > > > > > watch for.
> > > > > > >
> > > > > > > -Nathan
> > > > > > >
> > > > > > > >
> > > > > > > > On 4/19/07, Gregory Shimansky < gshimansky@gmail.com> wrote:
> > > > > > > > >
> > > > > > > > > Rana Dasgupta wrote:
> > > > > > > > > > Could be a protocol between the EM and the jits, maybe?
> > > > > > > > >
> > > > > > > > > I also think that EM is the right place to chose the correct
> > > > > emconf
> > > > > > > file
> > > > > > > > > at runtime based on the CPU detection.
> > > > > > > > >
> > > > > > > > > > On 4/18/07, Xiao-Feng Li <xi...@gmail.com> wrote:
> > > > > > > > > >> On 4/18/07, Pavel Ozhdikhin < pavel.ozhdikhin@gmail.com>
> > > > > wrote:
> > > > > > > > > >> > On 4/18/07, Alexey Varlamov <
> > alexey.v.varlamov@gmail.com>
> > > > > wrote:
> > > > > > > > > >> > >
> > > > > > > > > >> > > 2007/4/18, Mikhail Fursov <mi...@gmail.com>:
> > > > > > > > > >> > > > Nathan,
> > > > > > > > > >> > > > I checked the patch and it looks OK except a one
> > issue.
> > > > >
> > > > > > > > > >> > > >
> > > > > > > > > >> > > > I do not really like that we have new p5.emconf in
> > > > > codebase
> > > > > > > and
> > > > > > > > > >> propose
> > > > > > > > > >> > > the
> > > > > > > > > >> > > > following improvement:
> > > > > > > > > >> > > > 1) add p5 pass to all Jitrino.OPT codegen aliases
> > in
> > > > > every
> > > > > > > > > >> emconf we
> > > > > > > > > >> > > have.
> > > > > > > > > >> > > > (I can update the patch if agreed)
> > > > > > > > > >> > > I suppose you meant all ia32 configs :). This is
> > > > > neccesary step
> > > > > > > to
> > > > > > > > > >> > > CPUID autodetection, so it a must actually.
> > > > > > > > > >> > >
> > > > > > > > > >> > > >
> > > > > > > > > >> > > > 2) a. After the commit: Make it turned off by
> > default
> > > > > and use
> > > > > > > > > >> additional
> > > > > > > > > >> > > > cmd-line -XX:jit.arg.codegen.p5=on when run on PC
> > > > > without
> > > > > > > SSE2
> > > > > > > > > >> > > >    b. Start discussion: Use CPUID to detect if SSE2
> > is
> > > > > > > available
> > > > > > > > > >> and
> > > > > > > > > >> > > make
> > > > > > > > > >> > > > JIT turn this pass on automatically if needed.
> > > > > > > > > >> > > >
> > > > > > > > > >> > > > We can implement CPUID check for SSE2 in JIT only
> > (a
> > > > > couple
> > > > > > > of
> > > > > > > > > >> lines of
> > > > > > > > > >> > > > assembly for Linux and Windows)
> > > > > > > > > >> > > > The question is: would it be better if VM provides
> > such
> > > > > > > service
> > > > > > > > > for
> > > > > > > > > >> > > every
> > > > > > > > > >> > > > client? E.g. cpuid_is_sse2_supported()-like
> > methods.
> > > > > > > > > >> > > I'm in serious doubt that it is needed. Too
> > IA-centric,
> > > > > it
> > > > > > > would
> > > > > > > > > have
> > > > > > > > > >> > > little sense in general case. So doing it right in
> > Jit is
> > > > > the
> > > > > > > right
> > > > > > > > > >> > > thing IMO.
> > > > > > > > > >> >
> > > > > > > > > >> >
> > > > > > > > > >> >
> > > > > > > > > >> > Why do you think this is not needed? We might have
> > several
> > > > > JITs
> > > > > > > or
> > > > > > > > > >> > interpreter that can use and extended set of
> > instructions.
> > > > > It
> > > > > > > would
> > > > > > > > > >> be good
> > > > > > > > > >> > to keep these checks in one place in VM.
> > > > > > > > > >>
> > > > > > > > > >> This is architecture specific property, hence Alexey may
> > > > > think it
> > > > > > > > > >> belongs to code generator (here JIT), since otherwise an
> > > > > > > interpreter
> > > > > > > > > >> in C may not need it. I think Alexey's point is valid. To
> > > > > deal with
> > > > > > > > > >> multiple JITs, probably we can put it into some
> > JIT-common
> > > > > files.
> > > > > > > In
> > > > > > > > > >> other words, although multiple JITs may query it, it is
> > not
> > > > > > > > > >> necessarily VM's duty to respond. (Or if we view the
> > > > > JIT-common
> > > > > > > > > >> support as part of VM, then yes, it can be provided by
> > VM.)
> > > > > > > > > >>
> > > > > > > > > >> Thanks,
> > > > > > > > > >> xiaofeng
> > > > > > > > > >>
> > > > > > > > > >> > Thanks,
> > > > > > > > > >> > Pavel
> > > > > > > > > >> >
> > > > > > > > > >> > >
> > > > > > > > > >> > > >
> > > > > > > > > >> > > > On 4/18/07, Nathan Beyer < ndbeyer@apache.org>
> > wrote:
> > > > > > > > > >> > > > >
> > > > > > > > > >> > > > > Would anyone else like to review this patch? It's
> > > > > somewhat
> > > > > > > > > >> > > > > significant. I've tested it on a P4/WinXP and
> > DRLVM
> > > > > works
> > > > > > > > > >> without any
> > > > > > > > > >> > > > > noticeable regressions. I've done some initial
> > tests
> > > > > on a
> > > > > > > Quad
> > > > > > > > > >> > > > > P3/Ubuntu and I can now run a simple Hello World
> > with
> > > > > the
> > > > > > > > > >> default JIT,
> > > > > > > > > >> > > > > which is a huge step.
> > > > > > > > > >> > > > >
> > > > > > > > > >> > > > > If no one has any issues, I'm going to commit
> > this
> > > > > patch.
> > > > > > > > > >> > > > >
> > > > > > > > > >> > > > > -Nathan
> > > > > > > > > >> > > > >
> > > > > > > > > >> > > > > ---------- Forwarded message ----------
> > > > > > > > > >> > > > > From: Nathan Beyer (JIRA) <ji...@apache.org>
> > > > > > > > > >> > > > > Date: Apr 18, 2007 12:49 AM
> > > > > > > > > >> > > > > Subject: [jira] Commented: (HARMONY-3246)
> > > > > [drlvm][jit][opt]
> > > > > > > > > >> Jitted
> > > > > > > > > >> > > > > code can not be executed on non-SSE2 platforms
> > > > > > > > > >> > > > > To: commits@harmony.apache.org
> > > > > > > > > >> > > > >
> > > > > > > > > >> > > > >
> > > > > > > > > >> > > > >
> > > > > > > > > >> > > > >     [
> > > > > > > > > >> > > > >
> > > > > > > > > >> > >
> > > > > > > > > >>
> > > > > > > > >
> > > > > > >
> > https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614
> > > > >
> > > > > > > > > >>
> > > > > > > > > >> > > > > ]
> > > > > > > > > >> > > > >
> > > > > > > > > >> > > > > Nathan Beyer commented on HARMONY-3246:
> > > > > > > > > >> > > > > ---------------------------------------
> > > > > > > > > >> > > > >
> > > > > > > > > >> > > > > I've test this on a Linux P3 and it seems to
> > work.
> > > > > I'm now
> > > > > > > > > >> able to run
> > > > > > > > > >> > > > > a simple hello world. Additionally, everything
> > seems
> > > > > to
> > > > > > > work
> > > > > > > > > >> as it did
> > > > > > > > > >> > > > > on a P4/WinXP.
> > > > > > > > > >> > > > >
> > > > > > > > > >> > > > > Let's see if we can get a few more people to
> > review
> > > > > the
> > > > > > > code.
> > > > > > > > > >> > > > >
> > > > > > > > > >> > > > > > [drlvm][jit][opt] Jitted code can not be
> > executed
> > > > > on
> > > > > > > non-SSE2
> > > > > > > > > >> > > platforms
> > > > > > > > > >> > > > > >
> > > > > > > > > >> > >
> > > > > > > > > >>
> > > > > > >
> > > > >
> > -----------------------------------------------------------------------
> > > > > > > > > >> > > > > >
> > > > > > > > > >> > > > > >                 Key: HARMONY-3246
> > > > > > > > > >> > > > > >                 URL:
> > > > > > > > > >> > > https://issues.apache.org/jira/browse/HARMONY-3246
> > > > > > > > > >> > > > > >             Project: Harmony
> > > > > > > > > >> > > > > >          Issue Type: Improvement
> > > > > > > > > >> > > > > >          Components: DRLVM
> > > > > > > > > >> > > > > >            Reporter: Nikolay Sidelnikov
> > > > > > > > > >> > > > > >         Assigned To: Nathan Beyer
> > > > > > > > > >> > > > > >         Attachments: p5_fixed_commented.patch
> > > > > > > > > >> > > > > >
> > > > > > > > > >> > > > > >
> > > > > > > > > >> > > > > > Jitrino generates code with SSE and SSE2
> > > > > instructions
> > > > > > > which
> > > > > > > > > >> can not
> > > > > > > > > >> > > be
> > > > > > > > > >> > > > > executed on processors older than Pentium 4.
> > > > > > > > > >> > > > >
> > > > > > > > > >> > > > > --
> > > > > > > > > >> > > > > This message is automatically generated by JIRA.
> > > > > > > > > >> > > > > -
> > > > > > > > > >> > > > > You can reply to this email to add a comment to
> > the
> > > > > issue
> > > > > > > > > online.
> > > > > > > > > >> > > > >
> > > > > > > > > >> > > >
> > > > > > > > > >> > > >
> > > > > > > > > >> > > >
> > > > > > > > > >> > > > --
> > > > > > > > > >> > > > Mikhail Fursov
> > > > > > > > > >> > > >
> > > > > > > > > >> > >
> > > > > > > > > >> >
> > > > > > > > > >>
> > > > > > > > > >>
> > > > > > > > > >> --
> > > > > > > > > >> http://xiao-feng.blogspot.com
> > > > > > > > > >>
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Gregory
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Mikhail Fursov
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Mikhail Fursov
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Mikhail Fursov
> > >
> > >
> > >
> > >
> > > --
> > > Mikhail Fursov
> > >
> >
>
>
>
> --
> Mikhail Fursov
>

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Mikhail Fursov <mi...@gmail.com>.
JET replies on SSE2 instructions and this patch does not fix it. The patch
fixes only OPT.
"client" mode contains JET as a first JIT, but I added code to JET to check
if SSE2 is available and refuse compilation if not.
The second JIT in 'client' mode is OPT and after JET is refused to compile a
method, OPT compiles it.

I have another idea to check in JET if method contains double ops and
compile it if it does not. It will improve startup time and JVMTI support
significantly before JET is able to support 'doubles' on i586, because of
only small number of methods use doubles.
But I do not want putting all the changes into the same patch and propose
moving by small steps.
My proposal is committing this patch (after p3 is renamed to 'i586') and
open new JIRAs for every problem we have like
1) support doubles in JET for non-SSE2 platforms
2) various bugs on i586 platforms
3) making JET compile methods without doubles on i586 until item1) is ready.


What do you think on this?

On 4/20/07, Nathan Beyer <nd...@apache.org> wrote:
>
> I'm trying it again, but I believe so, yes. Should one of the tests
> fails? Didn't you mention that JET wouldn't work? Is JET used in the
> "client" test?
>
> -Nathan
>
> On 4/19/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > And one more question: did these JVMTI tests passed with original patch?
> >
> > On 4/20/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > >
> > > Do you have the same JVMTI errors if you use -Xem:opt option?
> > > I'll try to reproduce your errors by forcing isSSE2Supported() return
> > > 'false' for every platform.
> > >
> > > On 4/20/07, Nathan Beyer <nd...@apache.org> wrote:
> > > >
> > > > I uploaded a test log that shows some errors from JVMTI tests (I
> think
> > > > that's what was blowing up). Those seem to be first if you just run
> > > > "./build.sh test".
> > > >
> > > > I'm running "./build.sh smoke.test " and it executing right now, but
> > > > it's very slow.
> > > >
> > > > -Nathan
> > > >
> > > > On 4/19/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > > > > Check new patch, please.
> > > > >
> > > > > On 4/19/07, Nathan Beyer <nd...@apache.org> wrote:
> > > > > >
> > > > > > On 4/18/07, Mikhail Fursov <mike.fursov@gmail.com > wrote:
> > > > > > > It's a good idea.
> > > > > > > I'll do both: add k5 pass to all Jitrino.OPT configs and make
> EM
> > > > use
> > > > > > > opt.emconf by default.
> > > > > > > So there will no additional configuration nor command line
> > > > options!
> > > > > >
> > > > > > I'm not sure what all this means, but if the last line means
> DRLVM
> > > > > > will run and pass its tests on a P3 straight out of the build,
> then
> > > > > > that's a +1 from me.
> > > > > >
> > > > > > Are you going to post a new patch to this bug? Just so I know
> what
> > > > to
> > > > > > watch for.
> > > > > >
> > > > > > -Nathan
> > > > > >
> > > > > > >
> > > > > > > On 4/19/07, Gregory Shimansky < gshimansky@gmail.com> wrote:
> > > > > > > >
> > > > > > > > Rana Dasgupta wrote:
> > > > > > > > > Could be a protocol between the EM and the jits, maybe?
> > > > > > > >
> > > > > > > > I also think that EM is the right place to chose the correct
> > > > emconf
> > > > > > file
> > > > > > > > at runtime based on the CPU detection.
> > > > > > > >
> > > > > > > > > On 4/18/07, Xiao-Feng Li <xi...@gmail.com> wrote:
> > > > > > > > >> On 4/18/07, Pavel Ozhdikhin < pavel.ozhdikhin@gmail.com>
> > > > wrote:
> > > > > > > > >> > On 4/18/07, Alexey Varlamov <
> alexey.v.varlamov@gmail.com>
> > > > wrote:
> > > > > > > > >> > >
> > > > > > > > >> > > 2007/4/18, Mikhail Fursov <mi...@gmail.com>:
> > > > > > > > >> > > > Nathan,
> > > > > > > > >> > > > I checked the patch and it looks OK except a one
> issue.
> > > >
> > > > > > > > >> > > >
> > > > > > > > >> > > > I do not really like that we have new p5.emconf in
> > > > codebase
> > > > > > and
> > > > > > > > >> propose
> > > > > > > > >> > > the
> > > > > > > > >> > > > following improvement:
> > > > > > > > >> > > > 1) add p5 pass to all Jitrino.OPT codegen aliases
> in
> > > > every
> > > > > > > > >> emconf we
> > > > > > > > >> > > have.
> > > > > > > > >> > > > (I can update the patch if agreed)
> > > > > > > > >> > > I suppose you meant all ia32 configs :). This is
> > > > neccesary step
> > > > > > to
> > > > > > > > >> > > CPUID autodetection, so it a must actually.
> > > > > > > > >> > >
> > > > > > > > >> > > >
> > > > > > > > >> > > > 2) a. After the commit: Make it turned off by
> default
> > > > and use
> > > > > > > > >> additional
> > > > > > > > >> > > > cmd-line -XX:jit.arg.codegen.p5=on when run on PC
> > > > without
> > > > > > SSE2
> > > > > > > > >> > > >    b. Start discussion: Use CPUID to detect if SSE2
> is
> > > > > > available
> > > > > > > > >> and
> > > > > > > > >> > > make
> > > > > > > > >> > > > JIT turn this pass on automatically if needed.
> > > > > > > > >> > > >
> > > > > > > > >> > > > We can implement CPUID check for SSE2 in JIT only
> (a
> > > > couple
> > > > > > of
> > > > > > > > >> lines of
> > > > > > > > >> > > > assembly for Linux and Windows)
> > > > > > > > >> > > > The question is: would it be better if VM provides
> such
> > > > > > service
> > > > > > > > for
> > > > > > > > >> > > every
> > > > > > > > >> > > > client? E.g. cpuid_is_sse2_supported()-like
> methods.
> > > > > > > > >> > > I'm in serious doubt that it is needed. Too
> IA-centric,
> > > > it
> > > > > > would
> > > > > > > > have
> > > > > > > > >> > > little sense in general case. So doing it right in
> Jit is
> > > > the
> > > > > > right
> > > > > > > > >> > > thing IMO.
> > > > > > > > >> >
> > > > > > > > >> >
> > > > > > > > >> >
> > > > > > > > >> > Why do you think this is not needed? We might have
> several
> > > > JITs
> > > > > > or
> > > > > > > > >> > interpreter that can use and extended set of
> instructions.
> > > > It
> > > > > > would
> > > > > > > > >> be good
> > > > > > > > >> > to keep these checks in one place in VM.
> > > > > > > > >>
> > > > > > > > >> This is architecture specific property, hence Alexey may
> > > > think it
> > > > > > > > >> belongs to code generator (here JIT), since otherwise an
> > > > > > interpreter
> > > > > > > > >> in C may not need it. I think Alexey's point is valid. To
> > > > deal with
> > > > > > > > >> multiple JITs, probably we can put it into some
> JIT-common
> > > > files.
> > > > > > In
> > > > > > > > >> other words, although multiple JITs may query it, it is
> not
> > > > > > > > >> necessarily VM's duty to respond. (Or if we view the
> > > > JIT-common
> > > > > > > > >> support as part of VM, then yes, it can be provided by
> VM.)
> > > > > > > > >>
> > > > > > > > >> Thanks,
> > > > > > > > >> xiaofeng
> > > > > > > > >>
> > > > > > > > >> > Thanks,
> > > > > > > > >> > Pavel
> > > > > > > > >> >
> > > > > > > > >> > >
> > > > > > > > >> > > >
> > > > > > > > >> > > > On 4/18/07, Nathan Beyer < ndbeyer@apache.org>
> wrote:
> > > > > > > > >> > > > >
> > > > > > > > >> > > > > Would anyone else like to review this patch? It's
> > > > somewhat
> > > > > > > > >> > > > > significant. I've tested it on a P4/WinXP and
> DRLVM
> > > > works
> > > > > > > > >> without any
> > > > > > > > >> > > > > noticeable regressions. I've done some initial
> tests
> > > > on a
> > > > > > Quad
> > > > > > > > >> > > > > P3/Ubuntu and I can now run a simple Hello World
> with
> > > > the
> > > > > > > > >> default JIT,
> > > > > > > > >> > > > > which is a huge step.
> > > > > > > > >> > > > >
> > > > > > > > >> > > > > If no one has any issues, I'm going to commit
> this
> > > > patch.
> > > > > > > > >> > > > >
> > > > > > > > >> > > > > -Nathan
> > > > > > > > >> > > > >
> > > > > > > > >> > > > > ---------- Forwarded message ----------
> > > > > > > > >> > > > > From: Nathan Beyer (JIRA) <ji...@apache.org>
> > > > > > > > >> > > > > Date: Apr 18, 2007 12:49 AM
> > > > > > > > >> > > > > Subject: [jira] Commented: (HARMONY-3246)
> > > > [drlvm][jit][opt]
> > > > > > > > >> Jitted
> > > > > > > > >> > > > > code can not be executed on non-SSE2 platforms
> > > > > > > > >> > > > > To: commits@harmony.apache.org
> > > > > > > > >> > > > >
> > > > > > > > >> > > > >
> > > > > > > > >> > > > >
> > > > > > > > >> > > > >     [
> > > > > > > > >> > > > >
> > > > > > > > >> > >
> > > > > > > > >>
> > > > > > > >
> > > > > >
> https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614
> > > >
> > > > > > > > >>
> > > > > > > > >> > > > > ]
> > > > > > > > >> > > > >
> > > > > > > > >> > > > > Nathan Beyer commented on HARMONY-3246:
> > > > > > > > >> > > > > ---------------------------------------
> > > > > > > > >> > > > >
> > > > > > > > >> > > > > I've test this on a Linux P3 and it seems to
> work.
> > > > I'm now
> > > > > > > > >> able to run
> > > > > > > > >> > > > > a simple hello world. Additionally, everything
> seems
> > > > to
> > > > > > work
> > > > > > > > >> as it did
> > > > > > > > >> > > > > on a P4/WinXP.
> > > > > > > > >> > > > >
> > > > > > > > >> > > > > Let's see if we can get a few more people to
> review
> > > > the
> > > > > > code.
> > > > > > > > >> > > > >
> > > > > > > > >> > > > > > [drlvm][jit][opt] Jitted code can not be
> executed
> > > > on
> > > > > > non-SSE2
> > > > > > > > >> > > platforms
> > > > > > > > >> > > > > >
> > > > > > > > >> > >
> > > > > > > > >>
> > > > > >
> > > >
> -----------------------------------------------------------------------
> > > > > > > > >> > > > > >
> > > > > > > > >> > > > > >                 Key: HARMONY-3246
> > > > > > > > >> > > > > >                 URL:
> > > > > > > > >> > > https://issues.apache.org/jira/browse/HARMONY-3246
> > > > > > > > >> > > > > >             Project: Harmony
> > > > > > > > >> > > > > >          Issue Type: Improvement
> > > > > > > > >> > > > > >          Components: DRLVM
> > > > > > > > >> > > > > >            Reporter: Nikolay Sidelnikov
> > > > > > > > >> > > > > >         Assigned To: Nathan Beyer
> > > > > > > > >> > > > > >         Attachments: p5_fixed_commented.patch
> > > > > > > > >> > > > > >
> > > > > > > > >> > > > > >
> > > > > > > > >> > > > > > Jitrino generates code with SSE and SSE2
> > > > instructions
> > > > > > which
> > > > > > > > >> can not
> > > > > > > > >> > > be
> > > > > > > > >> > > > > executed on processors older than Pentium 4.
> > > > > > > > >> > > > >
> > > > > > > > >> > > > > --
> > > > > > > > >> > > > > This message is automatically generated by JIRA.
> > > > > > > > >> > > > > -
> > > > > > > > >> > > > > You can reply to this email to add a comment to
> the
> > > > issue
> > > > > > > > online.
> > > > > > > > >> > > > >
> > > > > > > > >> > > >
> > > > > > > > >> > > >
> > > > > > > > >> > > >
> > > > > > > > >> > > > --
> > > > > > > > >> > > > Mikhail Fursov
> > > > > > > > >> > > >
> > > > > > > > >> > >
> > > > > > > > >> >
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >> --
> > > > > > > > >> http://xiao-feng.blogspot.com
> > > > > > > > >>
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Gregory
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Mikhail Fursov
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Mikhail Fursov
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Mikhail Fursov
> >
> >
> >
> >
> > --
> > Mikhail Fursov
> >
>



-- 
Mikhail Fursov

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Nathan Beyer <nd...@apache.org>.
I'm trying it again, but I believe so, yes. Should one of the tests
fails? Didn't you mention that JET wouldn't work? Is JET used in the
"client" test?

-Nathan

On 4/19/07, Mikhail Fursov <mi...@gmail.com> wrote:
> And one more question: did these JVMTI tests passed with original patch?
>
> On 4/20/07, Mikhail Fursov <mi...@gmail.com> wrote:
> >
> > Do you have the same JVMTI errors if you use -Xem:opt option?
> > I'll try to reproduce your errors by forcing isSSE2Supported() return
> > 'false' for every platform.
> >
> > On 4/20/07, Nathan Beyer <nd...@apache.org> wrote:
> > >
> > > I uploaded a test log that shows some errors from JVMTI tests (I think
> > > that's what was blowing up). Those seem to be first if you just run
> > > "./build.sh test".
> > >
> > > I'm running "./build.sh smoke.test " and it executing right now, but
> > > it's very slow.
> > >
> > > -Nathan
> > >
> > > On 4/19/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > > > Check new patch, please.
> > > >
> > > > On 4/19/07, Nathan Beyer <nd...@apache.org> wrote:
> > > > >
> > > > > On 4/18/07, Mikhail Fursov <mike.fursov@gmail.com > wrote:
> > > > > > It's a good idea.
> > > > > > I'll do both: add k5 pass to all Jitrino.OPT configs and make EM
> > > use
> > > > > > opt.emconf by default.
> > > > > > So there will no additional configuration nor command line
> > > options!
> > > > >
> > > > > I'm not sure what all this means, but if the last line means DRLVM
> > > > > will run and pass its tests on a P3 straight out of the build, then
> > > > > that's a +1 from me.
> > > > >
> > > > > Are you going to post a new patch to this bug? Just so I know what
> > > to
> > > > > watch for.
> > > > >
> > > > > -Nathan
> > > > >
> > > > > >
> > > > > > On 4/19/07, Gregory Shimansky < gshimansky@gmail.com> wrote:
> > > > > > >
> > > > > > > Rana Dasgupta wrote:
> > > > > > > > Could be a protocol between the EM and the jits, maybe?
> > > > > > >
> > > > > > > I also think that EM is the right place to chose the correct
> > > emconf
> > > > > file
> > > > > > > at runtime based on the CPU detection.
> > > > > > >
> > > > > > > > On 4/18/07, Xiao-Feng Li <xi...@gmail.com> wrote:
> > > > > > > >> On 4/18/07, Pavel Ozhdikhin < pavel.ozhdikhin@gmail.com>
> > > wrote:
> > > > > > > >> > On 4/18/07, Alexey Varlamov <al...@gmail.com>
> > > wrote:
> > > > > > > >> > >
> > > > > > > >> > > 2007/4/18, Mikhail Fursov <mi...@gmail.com>:
> > > > > > > >> > > > Nathan,
> > > > > > > >> > > > I checked the patch and it looks OK except a one issue.
> > >
> > > > > > > >> > > >
> > > > > > > >> > > > I do not really like that we have new p5.emconf in
> > > codebase
> > > > > and
> > > > > > > >> propose
> > > > > > > >> > > the
> > > > > > > >> > > > following improvement:
> > > > > > > >> > > > 1) add p5 pass to all Jitrino.OPT codegen aliases in
> > > every
> > > > > > > >> emconf we
> > > > > > > >> > > have.
> > > > > > > >> > > > (I can update the patch if agreed)
> > > > > > > >> > > I suppose you meant all ia32 configs :). This is
> > > neccesary step
> > > > > to
> > > > > > > >> > > CPUID autodetection, so it a must actually.
> > > > > > > >> > >
> > > > > > > >> > > >
> > > > > > > >> > > > 2) a. After the commit: Make it turned off by default
> > > and use
> > > > > > > >> additional
> > > > > > > >> > > > cmd-line -XX:jit.arg.codegen.p5=on when run on PC
> > > without
> > > > > SSE2
> > > > > > > >> > > >    b. Start discussion: Use CPUID to detect if SSE2 is
> > > > > available
> > > > > > > >> and
> > > > > > > >> > > make
> > > > > > > >> > > > JIT turn this pass on automatically if needed.
> > > > > > > >> > > >
> > > > > > > >> > > > We can implement CPUID check for SSE2 in JIT only (a
> > > couple
> > > > > of
> > > > > > > >> lines of
> > > > > > > >> > > > assembly for Linux and Windows)
> > > > > > > >> > > > The question is: would it be better if VM provides such
> > > > > service
> > > > > > > for
> > > > > > > >> > > every
> > > > > > > >> > > > client? E.g. cpuid_is_sse2_supported()-like methods.
> > > > > > > >> > > I'm in serious doubt that it is needed. Too IA-centric,
> > > it
> > > > > would
> > > > > > > have
> > > > > > > >> > > little sense in general case. So doing it right in Jit is
> > > the
> > > > > right
> > > > > > > >> > > thing IMO.
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >> > Why do you think this is not needed? We might have several
> > > JITs
> > > > > or
> > > > > > > >> > interpreter that can use and extended set of instructions.
> > > It
> > > > > would
> > > > > > > >> be good
> > > > > > > >> > to keep these checks in one place in VM.
> > > > > > > >>
> > > > > > > >> This is architecture specific property, hence Alexey may
> > > think it
> > > > > > > >> belongs to code generator (here JIT), since otherwise an
> > > > > interpreter
> > > > > > > >> in C may not need it. I think Alexey's point is valid. To
> > > deal with
> > > > > > > >> multiple JITs, probably we can put it into some JIT-common
> > > files.
> > > > > In
> > > > > > > >> other words, although multiple JITs may query it, it is not
> > > > > > > >> necessarily VM's duty to respond. (Or if we view the
> > > JIT-common
> > > > > > > >> support as part of VM, then yes, it can be provided by VM.)
> > > > > > > >>
> > > > > > > >> Thanks,
> > > > > > > >> xiaofeng
> > > > > > > >>
> > > > > > > >> > Thanks,
> > > > > > > >> > Pavel
> > > > > > > >> >
> > > > > > > >> > >
> > > > > > > >> > > >
> > > > > > > >> > > > On 4/18/07, Nathan Beyer < ndbeyer@apache.org> wrote:
> > > > > > > >> > > > >
> > > > > > > >> > > > > Would anyone else like to review this patch? It's
> > > somewhat
> > > > > > > >> > > > > significant. I've tested it on a P4/WinXP and DRLVM
> > > works
> > > > > > > >> without any
> > > > > > > >> > > > > noticeable regressions. I've done some initial tests
> > > on a
> > > > > Quad
> > > > > > > >> > > > > P3/Ubuntu and I can now run a simple Hello World with
> > > the
> > > > > > > >> default JIT,
> > > > > > > >> > > > > which is a huge step.
> > > > > > > >> > > > >
> > > > > > > >> > > > > If no one has any issues, I'm going to commit this
> > > patch.
> > > > > > > >> > > > >
> > > > > > > >> > > > > -Nathan
> > > > > > > >> > > > >
> > > > > > > >> > > > > ---------- Forwarded message ----------
> > > > > > > >> > > > > From: Nathan Beyer (JIRA) <ji...@apache.org>
> > > > > > > >> > > > > Date: Apr 18, 2007 12:49 AM
> > > > > > > >> > > > > Subject: [jira] Commented: (HARMONY-3246)
> > > [drlvm][jit][opt]
> > > > > > > >> Jitted
> > > > > > > >> > > > > code can not be executed on non-SSE2 platforms
> > > > > > > >> > > > > To: commits@harmony.apache.org
> > > > > > > >> > > > >
> > > > > > > >> > > > >
> > > > > > > >> > > > >
> > > > > > > >> > > > >     [
> > > > > > > >> > > > >
> > > > > > > >> > >
> > > > > > > >>
> > > > > > >
> > > > > https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614
> > >
> > > > > > > >>
> > > > > > > >> > > > > ]
> > > > > > > >> > > > >
> > > > > > > >> > > > > Nathan Beyer commented on HARMONY-3246:
> > > > > > > >> > > > > ---------------------------------------
> > > > > > > >> > > > >
> > > > > > > >> > > > > I've test this on a Linux P3 and it seems to work.
> > > I'm now
> > > > > > > >> able to run
> > > > > > > >> > > > > a simple hello world. Additionally, everything seems
> > > to
> > > > > work
> > > > > > > >> as it did
> > > > > > > >> > > > > on a P4/WinXP.
> > > > > > > >> > > > >
> > > > > > > >> > > > > Let's see if we can get a few more people to review
> > > the
> > > > > code.
> > > > > > > >> > > > >
> > > > > > > >> > > > > > [drlvm][jit][opt] Jitted code can not be executed
> > > on
> > > > > non-SSE2
> > > > > > > >> > > platforms
> > > > > > > >> > > > > >
> > > > > > > >> > >
> > > > > > > >>
> > > > >
> > > -----------------------------------------------------------------------
> > > > > > > >> > > > > >
> > > > > > > >> > > > > >                 Key: HARMONY-3246
> > > > > > > >> > > > > >                 URL:
> > > > > > > >> > > https://issues.apache.org/jira/browse/HARMONY-3246
> > > > > > > >> > > > > >             Project: Harmony
> > > > > > > >> > > > > >          Issue Type: Improvement
> > > > > > > >> > > > > >          Components: DRLVM
> > > > > > > >> > > > > >            Reporter: Nikolay Sidelnikov
> > > > > > > >> > > > > >         Assigned To: Nathan Beyer
> > > > > > > >> > > > > >         Attachments: p5_fixed_commented.patch
> > > > > > > >> > > > > >
> > > > > > > >> > > > > >
> > > > > > > >> > > > > > Jitrino generates code with SSE and SSE2
> > > instructions
> > > > > which
> > > > > > > >> can not
> > > > > > > >> > > be
> > > > > > > >> > > > > executed on processors older than Pentium 4.
> > > > > > > >> > > > >
> > > > > > > >> > > > > --
> > > > > > > >> > > > > This message is automatically generated by JIRA.
> > > > > > > >> > > > > -
> > > > > > > >> > > > > You can reply to this email to add a comment to the
> > > issue
> > > > > > > online.
> > > > > > > >> > > > >
> > > > > > > >> > > >
> > > > > > > >> > > >
> > > > > > > >> > > >
> > > > > > > >> > > > --
> > > > > > > >> > > > Mikhail Fursov
> > > > > > > >> > > >
> > > > > > > >> > >
> > > > > > > >> >
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> --
> > > > > > > >> http://xiao-feng.blogspot.com
> > > > > > > >>
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Gregory
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Mikhail Fursov
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Mikhail Fursov
> > > >
> > >
> >
> >
> >
> > --
> > Mikhail Fursov
>
>
>
>
> --
> Mikhail Fursov
>

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Mikhail Fursov <mi...@gmail.com>.
And one more question: did these JVMTI tests passed with original patch?

On 4/20/07, Mikhail Fursov <mi...@gmail.com> wrote:
>
> Do you have the same JVMTI errors if you use -Xem:opt option?
> I'll try to reproduce your errors by forcing isSSE2Supported() return
> 'false' for every platform.
>
> On 4/20/07, Nathan Beyer <nd...@apache.org> wrote:
> >
> > I uploaded a test log that shows some errors from JVMTI tests (I think
> > that's what was blowing up). Those seem to be first if you just run
> > "./build.sh test".
> >
> > I'm running "./build.sh smoke.test " and it executing right now, but
> > it's very slow.
> >
> > -Nathan
> >
> > On 4/19/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > > Check new patch, please.
> > >
> > > On 4/19/07, Nathan Beyer <nd...@apache.org> wrote:
> > > >
> > > > On 4/18/07, Mikhail Fursov <mike.fursov@gmail.com > wrote:
> > > > > It's a good idea.
> > > > > I'll do both: add k5 pass to all Jitrino.OPT configs and make EM
> > use
> > > > > opt.emconf by default.
> > > > > So there will no additional configuration nor command line
> > options!
> > > >
> > > > I'm not sure what all this means, but if the last line means DRLVM
> > > > will run and pass its tests on a P3 straight out of the build, then
> > > > that's a +1 from me.
> > > >
> > > > Are you going to post a new patch to this bug? Just so I know what
> > to
> > > > watch for.
> > > >
> > > > -Nathan
> > > >
> > > > >
> > > > > On 4/19/07, Gregory Shimansky < gshimansky@gmail.com> wrote:
> > > > > >
> > > > > > Rana Dasgupta wrote:
> > > > > > > Could be a protocol between the EM and the jits, maybe?
> > > > > >
> > > > > > I also think that EM is the right place to chose the correct
> > emconf
> > > > file
> > > > > > at runtime based on the CPU detection.
> > > > > >
> > > > > > > On 4/18/07, Xiao-Feng Li <xi...@gmail.com> wrote:
> > > > > > >> On 4/18/07, Pavel Ozhdikhin < pavel.ozhdikhin@gmail.com>
> > wrote:
> > > > > > >> > On 4/18/07, Alexey Varlamov <al...@gmail.com>
> > wrote:
> > > > > > >> > >
> > > > > > >> > > 2007/4/18, Mikhail Fursov <mi...@gmail.com>:
> > > > > > >> > > > Nathan,
> > > > > > >> > > > I checked the patch and it looks OK except a one issue.
> >
> > > > > > >> > > >
> > > > > > >> > > > I do not really like that we have new p5.emconf in
> > codebase
> > > > and
> > > > > > >> propose
> > > > > > >> > > the
> > > > > > >> > > > following improvement:
> > > > > > >> > > > 1) add p5 pass to all Jitrino.OPT codegen aliases in
> > every
> > > > > > >> emconf we
> > > > > > >> > > have.
> > > > > > >> > > > (I can update the patch if agreed)
> > > > > > >> > > I suppose you meant all ia32 configs :). This is
> > neccesary step
> > > > to
> > > > > > >> > > CPUID autodetection, so it a must actually.
> > > > > > >> > >
> > > > > > >> > > >
> > > > > > >> > > > 2) a. After the commit: Make it turned off by default
> > and use
> > > > > > >> additional
> > > > > > >> > > > cmd-line -XX:jit.arg.codegen.p5=on when run on PC
> > without
> > > > SSE2
> > > > > > >> > > >    b. Start discussion: Use CPUID to detect if SSE2 is
> > > > available
> > > > > > >> and
> > > > > > >> > > make
> > > > > > >> > > > JIT turn this pass on automatically if needed.
> > > > > > >> > > >
> > > > > > >> > > > We can implement CPUID check for SSE2 in JIT only (a
> > couple
> > > > of
> > > > > > >> lines of
> > > > > > >> > > > assembly for Linux and Windows)
> > > > > > >> > > > The question is: would it be better if VM provides such
> > > > service
> > > > > > for
> > > > > > >> > > every
> > > > > > >> > > > client? E.g. cpuid_is_sse2_supported()-like methods.
> > > > > > >> > > I'm in serious doubt that it is needed. Too IA-centric,
> > it
> > > > would
> > > > > > have
> > > > > > >> > > little sense in general case. So doing it right in Jit is
> > the
> > > > right
> > > > > > >> > > thing IMO.
> > > > > > >> >
> > > > > > >> >
> > > > > > >> >
> > > > > > >> > Why do you think this is not needed? We might have several
> > JITs
> > > > or
> > > > > > >> > interpreter that can use and extended set of instructions.
> > It
> > > > would
> > > > > > >> be good
> > > > > > >> > to keep these checks in one place in VM.
> > > > > > >>
> > > > > > >> This is architecture specific property, hence Alexey may
> > think it
> > > > > > >> belongs to code generator (here JIT), since otherwise an
> > > > interpreter
> > > > > > >> in C may not need it. I think Alexey's point is valid. To
> > deal with
> > > > > > >> multiple JITs, probably we can put it into some JIT-common
> > files.
> > > > In
> > > > > > >> other words, although multiple JITs may query it, it is not
> > > > > > >> necessarily VM's duty to respond. (Or if we view the
> > JIT-common
> > > > > > >> support as part of VM, then yes, it can be provided by VM.)
> > > > > > >>
> > > > > > >> Thanks,
> > > > > > >> xiaofeng
> > > > > > >>
> > > > > > >> > Thanks,
> > > > > > >> > Pavel
> > > > > > >> >
> > > > > > >> > >
> > > > > > >> > > >
> > > > > > >> > > > On 4/18/07, Nathan Beyer < ndbeyer@apache.org> wrote:
> > > > > > >> > > > >
> > > > > > >> > > > > Would anyone else like to review this patch? It's
> > somewhat
> > > > > > >> > > > > significant. I've tested it on a P4/WinXP and DRLVM
> > works
> > > > > > >> without any
> > > > > > >> > > > > noticeable regressions. I've done some initial tests
> > on a
> > > > Quad
> > > > > > >> > > > > P3/Ubuntu and I can now run a simple Hello World with
> > the
> > > > > > >> default JIT,
> > > > > > >> > > > > which is a huge step.
> > > > > > >> > > > >
> > > > > > >> > > > > If no one has any issues, I'm going to commit this
> > patch.
> > > > > > >> > > > >
> > > > > > >> > > > > -Nathan
> > > > > > >> > > > >
> > > > > > >> > > > > ---------- Forwarded message ----------
> > > > > > >> > > > > From: Nathan Beyer (JIRA) <ji...@apache.org>
> > > > > > >> > > > > Date: Apr 18, 2007 12:49 AM
> > > > > > >> > > > > Subject: [jira] Commented: (HARMONY-3246)
> > [drlvm][jit][opt]
> > > > > > >> Jitted
> > > > > > >> > > > > code can not be executed on non-SSE2 platforms
> > > > > > >> > > > > To: commits@harmony.apache.org
> > > > > > >> > > > >
> > > > > > >> > > > >
> > > > > > >> > > > >
> > > > > > >> > > > >     [
> > > > > > >> > > > >
> > > > > > >> > >
> > > > > > >>
> > > > > >
> > > > https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614
> >
> > > > > > >>
> > > > > > >> > > > > ]
> > > > > > >> > > > >
> > > > > > >> > > > > Nathan Beyer commented on HARMONY-3246:
> > > > > > >> > > > > ---------------------------------------
> > > > > > >> > > > >
> > > > > > >> > > > > I've test this on a Linux P3 and it seems to work.
> > I'm now
> > > > > > >> able to run
> > > > > > >> > > > > a simple hello world. Additionally, everything seems
> > to
> > > > work
> > > > > > >> as it did
> > > > > > >> > > > > on a P4/WinXP.
> > > > > > >> > > > >
> > > > > > >> > > > > Let's see if we can get a few more people to review
> > the
> > > > code.
> > > > > > >> > > > >
> > > > > > >> > > > > > [drlvm][jit][opt] Jitted code can not be executed
> > on
> > > > non-SSE2
> > > > > > >> > > platforms
> > > > > > >> > > > > >
> > > > > > >> > >
> > > > > > >>
> > > >
> > -----------------------------------------------------------------------
> > > > > > >> > > > > >
> > > > > > >> > > > > >                 Key: HARMONY-3246
> > > > > > >> > > > > >                 URL:
> > > > > > >> > > https://issues.apache.org/jira/browse/HARMONY-3246
> > > > > > >> > > > > >             Project: Harmony
> > > > > > >> > > > > >          Issue Type: Improvement
> > > > > > >> > > > > >          Components: DRLVM
> > > > > > >> > > > > >            Reporter: Nikolay Sidelnikov
> > > > > > >> > > > > >         Assigned To: Nathan Beyer
> > > > > > >> > > > > >         Attachments: p5_fixed_commented.patch
> > > > > > >> > > > > >
> > > > > > >> > > > > >
> > > > > > >> > > > > > Jitrino generates code with SSE and SSE2
> > instructions
> > > > which
> > > > > > >> can not
> > > > > > >> > > be
> > > > > > >> > > > > executed on processors older than Pentium 4.
> > > > > > >> > > > >
> > > > > > >> > > > > --
> > > > > > >> > > > > This message is automatically generated by JIRA.
> > > > > > >> > > > > -
> > > > > > >> > > > > You can reply to this email to add a comment to the
> > issue
> > > > > > online.
> > > > > > >> > > > >
> > > > > > >> > > >
> > > > > > >> > > >
> > > > > > >> > > >
> > > > > > >> > > > --
> > > > > > >> > > > Mikhail Fursov
> > > > > > >> > > >
> > > > > > >> > >
> > > > > > >> >
> > > > > > >>
> > > > > > >>
> > > > > > >> --
> > > > > > >> http://xiao-feng.blogspot.com
> > > > > > >>
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Gregory
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Mikhail Fursov
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Mikhail Fursov
> > >
> >
>
>
>
> --
> Mikhail Fursov




-- 
Mikhail Fursov

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Mikhail Fursov <mi...@gmail.com>.
Do you have the same JVMTI errors if you use -Xem:opt option?
I'll try to reproduce your errors by forcing isSSE2Supported() return
'false' for every platform.

On 4/20/07, Nathan Beyer <nd...@apache.org> wrote:
>
> I uploaded a test log that shows some errors from JVMTI tests (I think
> that's what was blowing up). Those seem to be first if you just run
> "./build.sh test".
>
> I'm running "./build.sh smoke.test" and it executing right now, but
> it's very slow.
>
> -Nathan
>
> On 4/19/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > Check new patch, please.
> >
> > On 4/19/07, Nathan Beyer <nd...@apache.org> wrote:
> > >
> > > On 4/18/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > > > It's a good idea.
> > > > I'll do both: add k5 pass to all Jitrino.OPT configs and make EM use
> > > > opt.emconf by default.
> > > > So there will no additional configuration nor command line options!
> > >
> > > I'm not sure what all this means, but if the last line means DRLVM
> > > will run and pass its tests on a P3 straight out of the build, then
> > > that's a +1 from me.
> > >
> > > Are you going to post a new patch to this bug? Just so I know what to
> > > watch for.
> > >
> > > -Nathan
> > >
> > > >
> > > > On 4/19/07, Gregory Shimansky <gs...@gmail.com> wrote:
> > > > >
> > > > > Rana Dasgupta wrote:
> > > > > > Could be a protocol between the EM and the jits, maybe?
> > > > >
> > > > > I also think that EM is the right place to chose the correct
> emconf
> > > file
> > > > > at runtime based on the CPU detection.
> > > > >
> > > > > > On 4/18/07, Xiao-Feng Li <xi...@gmail.com> wrote:
> > > > > >> On 4/18/07, Pavel Ozhdikhin <pa...@gmail.com> wrote:
> > > > > >> > On 4/18/07, Alexey Varlamov <al...@gmail.com>
> wrote:
> > > > > >> > >
> > > > > >> > > 2007/4/18, Mikhail Fursov <mi...@gmail.com>:
> > > > > >> > > > Nathan,
> > > > > >> > > > I checked the patch and it looks OK except a one issue.
> > > > > >> > > >
> > > > > >> > > > I do not really like that we have new p5.emconf in
> codebase
> > > and
> > > > > >> propose
> > > > > >> > > the
> > > > > >> > > > following improvement:
> > > > > >> > > > 1) add p5 pass to all Jitrino.OPT codegen aliases in
> every
> > > > > >> emconf we
> > > > > >> > > have.
> > > > > >> > > > (I can update the patch if agreed)
> > > > > >> > > I suppose you meant all ia32 configs :). This is neccesary
> step
> > > to
> > > > > >> > > CPUID autodetection, so it a must actually.
> > > > > >> > >
> > > > > >> > > >
> > > > > >> > > > 2) a. After the commit: Make it turned off by default and
> use
> > > > > >> additional
> > > > > >> > > > cmd-line -XX:jit.arg.codegen.p5=on when run on PC without
> > > SSE2
> > > > > >> > > >    b. Start discussion: Use CPUID to detect if SSE2 is
> > > available
> > > > > >> and
> > > > > >> > > make
> > > > > >> > > > JIT turn this pass on automatically if needed.
> > > > > >> > > >
> > > > > >> > > > We can implement CPUID check for SSE2 in JIT only (a
> couple
> > > of
> > > > > >> lines of
> > > > > >> > > > assembly for Linux and Windows)
> > > > > >> > > > The question is: would it be better if VM provides such
> > > service
> > > > > for
> > > > > >> > > every
> > > > > >> > > > client? E.g. cpuid_is_sse2_supported()-like methods.
> > > > > >> > > I'm in serious doubt that it is needed. Too IA-centric, it
> > > would
> > > > > have
> > > > > >> > > little sense in general case. So doing it right in Jit is
> the
> > > right
> > > > > >> > > thing IMO.
> > > > > >> >
> > > > > >> >
> > > > > >> >
> > > > > >> > Why do you think this is not needed? We might have several
> JITs
> > > or
> > > > > >> > interpreter that can use and extended set of instructions. It
> > > would
> > > > > >> be good
> > > > > >> > to keep these checks in one place in VM.
> > > > > >>
> > > > > >> This is architecture specific property, hence Alexey may think
> it
> > > > > >> belongs to code generator (here JIT), since otherwise an
> > > interpreter
> > > > > >> in C may not need it. I think Alexey's point is valid. To deal
> with
> > > > > >> multiple JITs, probably we can put it into some JIT-common
> files.
> > > In
> > > > > >> other words, although multiple JITs may query it, it is not
> > > > > >> necessarily VM's duty to respond. (Or if we view the JIT-common
> > > > > >> support as part of VM, then yes, it can be provided by VM.)
> > > > > >>
> > > > > >> Thanks,
> > > > > >> xiaofeng
> > > > > >>
> > > > > >> > Thanks,
> > > > > >> > Pavel
> > > > > >> >
> > > > > >> > >
> > > > > >> > > >
> > > > > >> > > > On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
> > > > > >> > > > >
> > > > > >> > > > > Would anyone else like to review this patch? It's
> somewhat
> > > > > >> > > > > significant. I've tested it on a P4/WinXP and DRLVM
> works
> > > > > >> without any
> > > > > >> > > > > noticeable regressions. I've done some initial tests on
> a
> > > Quad
> > > > > >> > > > > P3/Ubuntu and I can now run a simple Hello World with
> the
> > > > > >> default JIT,
> > > > > >> > > > > which is a huge step.
> > > > > >> > > > >
> > > > > >> > > > > If no one has any issues, I'm going to commit this
> patch.
> > > > > >> > > > >
> > > > > >> > > > > -Nathan
> > > > > >> > > > >
> > > > > >> > > > > ---------- Forwarded message ----------
> > > > > >> > > > > From: Nathan Beyer (JIRA) <ji...@apache.org>
> > > > > >> > > > > Date: Apr 18, 2007 12:49 AM
> > > > > >> > > > > Subject: [jira] Commented: (HARMONY-3246)
> [drlvm][jit][opt]
> > > > > >> Jitted
> > > > > >> > > > > code can not be executed on non-SSE2 platforms
> > > > > >> > > > > To: commits@harmony.apache.org
> > > > > >> > > > >
> > > > > >> > > > >
> > > > > >> > > > >
> > > > > >> > > > >     [
> > > > > >> > > > >
> > > > > >> > >
> > > > > >>
> > > > >
> > >
> https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614
> > > > > >>
> > > > > >> > > > > ]
> > > > > >> > > > >
> > > > > >> > > > > Nathan Beyer commented on HARMONY-3246:
> > > > > >> > > > > ---------------------------------------
> > > > > >> > > > >
> > > > > >> > > > > I've test this on a Linux P3 and it seems to work. I'm
> now
> > > > > >> able to run
> > > > > >> > > > > a simple hello world. Additionally, everything seems to
> > > work
> > > > > >> as it did
> > > > > >> > > > > on a P4/WinXP.
> > > > > >> > > > >
> > > > > >> > > > > Let's see if we can get a few more people to review the
> > > code.
> > > > > >> > > > >
> > > > > >> > > > > > [drlvm][jit][opt] Jitted code can not be executed on
> > > non-SSE2
> > > > > >> > > platforms
> > > > > >> > > > > >
> > > > > >> > >
> > > > > >>
> > >
> -----------------------------------------------------------------------
> > > > > >> > > > > >
> > > > > >> > > > > >                 Key: HARMONY-3246
> > > > > >> > > > > >                 URL:
> > > > > >> > > https://issues.apache.org/jira/browse/HARMONY-3246
> > > > > >> > > > > >             Project: Harmony
> > > > > >> > > > > >          Issue Type: Improvement
> > > > > >> > > > > >          Components: DRLVM
> > > > > >> > > > > >            Reporter: Nikolay Sidelnikov
> > > > > >> > > > > >         Assigned To: Nathan Beyer
> > > > > >> > > > > >         Attachments: p5_fixed_commented.patch
> > > > > >> > > > > >
> > > > > >> > > > > >
> > > > > >> > > > > > Jitrino generates code with SSE and SSE2 instructions
> > > which
> > > > > >> can not
> > > > > >> > > be
> > > > > >> > > > > executed on processors older than Pentium 4.
> > > > > >> > > > >
> > > > > >> > > > > --
> > > > > >> > > > > This message is automatically generated by JIRA.
> > > > > >> > > > > -
> > > > > >> > > > > You can reply to this email to add a comment to the
> issue
> > > > > online.
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > > >
> > > > > >> > > >
> > > > > >> > > > --
> > > > > >> > > > Mikhail Fursov
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > > >>
> > > > > >> --
> > > > > >> http://xiao-feng.blogspot.com
> > > > > >>
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Gregory
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Mikhail Fursov
> > > >
> > >
> >
> >
> >
> > --
> > Mikhail Fursov
> >
>



-- 
Mikhail Fursov

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Nathan Beyer <nd...@apache.org>.
I uploaded a test log that shows some errors from JVMTI tests (I think
that's what was blowing up). Those seem to be first if you just run
"./build.sh test".

I'm running "./build.sh smoke.test" and it executing right now, but
it's very slow.

-Nathan

On 4/19/07, Mikhail Fursov <mi...@gmail.com> wrote:
> Check new patch, please.
>
> On 4/19/07, Nathan Beyer <nd...@apache.org> wrote:
> >
> > On 4/18/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > > It's a good idea.
> > > I'll do both: add k5 pass to all Jitrino.OPT configs and make EM use
> > > opt.emconf by default.
> > > So there will no additional configuration nor command line options!
> >
> > I'm not sure what all this means, but if the last line means DRLVM
> > will run and pass its tests on a P3 straight out of the build, then
> > that's a +1 from me.
> >
> > Are you going to post a new patch to this bug? Just so I know what to
> > watch for.
> >
> > -Nathan
> >
> > >
> > > On 4/19/07, Gregory Shimansky <gs...@gmail.com> wrote:
> > > >
> > > > Rana Dasgupta wrote:
> > > > > Could be a protocol between the EM and the jits, maybe?
> > > >
> > > > I also think that EM is the right place to chose the correct emconf
> > file
> > > > at runtime based on the CPU detection.
> > > >
> > > > > On 4/18/07, Xiao-Feng Li <xi...@gmail.com> wrote:
> > > > >> On 4/18/07, Pavel Ozhdikhin <pa...@gmail.com> wrote:
> > > > >> > On 4/18/07, Alexey Varlamov <al...@gmail.com> wrote:
> > > > >> > >
> > > > >> > > 2007/4/18, Mikhail Fursov <mi...@gmail.com>:
> > > > >> > > > Nathan,
> > > > >> > > > I checked the patch and it looks OK except a one issue.
> > > > >> > > >
> > > > >> > > > I do not really like that we have new p5.emconf in codebase
> > and
> > > > >> propose
> > > > >> > > the
> > > > >> > > > following improvement:
> > > > >> > > > 1) add p5 pass to all Jitrino.OPT codegen aliases in every
> > > > >> emconf we
> > > > >> > > have.
> > > > >> > > > (I can update the patch if agreed)
> > > > >> > > I suppose you meant all ia32 configs :). This is neccesary step
> > to
> > > > >> > > CPUID autodetection, so it a must actually.
> > > > >> > >
> > > > >> > > >
> > > > >> > > > 2) a. After the commit: Make it turned off by default and use
> > > > >> additional
> > > > >> > > > cmd-line -XX:jit.arg.codegen.p5=on when run on PC without
> > SSE2
> > > > >> > > >    b. Start discussion: Use CPUID to detect if SSE2 is
> > available
> > > > >> and
> > > > >> > > make
> > > > >> > > > JIT turn this pass on automatically if needed.
> > > > >> > > >
> > > > >> > > > We can implement CPUID check for SSE2 in JIT only (a couple
> > of
> > > > >> lines of
> > > > >> > > > assembly for Linux and Windows)
> > > > >> > > > The question is: would it be better if VM provides such
> > service
> > > > for
> > > > >> > > every
> > > > >> > > > client? E.g. cpuid_is_sse2_supported()-like methods.
> > > > >> > > I'm in serious doubt that it is needed. Too IA-centric, it
> > would
> > > > have
> > > > >> > > little sense in general case. So doing it right in Jit is the
> > right
> > > > >> > > thing IMO.
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> > Why do you think this is not needed? We might have several JITs
> > or
> > > > >> > interpreter that can use and extended set of instructions. It
> > would
> > > > >> be good
> > > > >> > to keep these checks in one place in VM.
> > > > >>
> > > > >> This is architecture specific property, hence Alexey may think it
> > > > >> belongs to code generator (here JIT), since otherwise an
> > interpreter
> > > > >> in C may not need it. I think Alexey's point is valid. To deal with
> > > > >> multiple JITs, probably we can put it into some JIT-common files.
> > In
> > > > >> other words, although multiple JITs may query it, it is not
> > > > >> necessarily VM's duty to respond. (Or if we view the JIT-common
> > > > >> support as part of VM, then yes, it can be provided by VM.)
> > > > >>
> > > > >> Thanks,
> > > > >> xiaofeng
> > > > >>
> > > > >> > Thanks,
> > > > >> > Pavel
> > > > >> >
> > > > >> > >
> > > > >> > > >
> > > > >> > > > On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
> > > > >> > > > >
> > > > >> > > > > Would anyone else like to review this patch? It's somewhat
> > > > >> > > > > significant. I've tested it on a P4/WinXP and DRLVM works
> > > > >> without any
> > > > >> > > > > noticeable regressions. I've done some initial tests on a
> > Quad
> > > > >> > > > > P3/Ubuntu and I can now run a simple Hello World with the
> > > > >> default JIT,
> > > > >> > > > > which is a huge step.
> > > > >> > > > >
> > > > >> > > > > If no one has any issues, I'm going to commit this patch.
> > > > >> > > > >
> > > > >> > > > > -Nathan
> > > > >> > > > >
> > > > >> > > > > ---------- Forwarded message ----------
> > > > >> > > > > From: Nathan Beyer (JIRA) <ji...@apache.org>
> > > > >> > > > > Date: Apr 18, 2007 12:49 AM
> > > > >> > > > > Subject: [jira] Commented: (HARMONY-3246) [drlvm][jit][opt]
> > > > >> Jitted
> > > > >> > > > > code can not be executed on non-SSE2 platforms
> > > > >> > > > > To: commits@harmony.apache.org
> > > > >> > > > >
> > > > >> > > > >
> > > > >> > > > >
> > > > >> > > > >     [
> > > > >> > > > >
> > > > >> > >
> > > > >>
> > > >
> > https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614
> > > > >>
> > > > >> > > > > ]
> > > > >> > > > >
> > > > >> > > > > Nathan Beyer commented on HARMONY-3246:
> > > > >> > > > > ---------------------------------------
> > > > >> > > > >
> > > > >> > > > > I've test this on a Linux P3 and it seems to work. I'm now
> > > > >> able to run
> > > > >> > > > > a simple hello world. Additionally, everything seems to
> > work
> > > > >> as it did
> > > > >> > > > > on a P4/WinXP.
> > > > >> > > > >
> > > > >> > > > > Let's see if we can get a few more people to review the
> > code.
> > > > >> > > > >
> > > > >> > > > > > [drlvm][jit][opt] Jitted code can not be executed on
> > non-SSE2
> > > > >> > > platforms
> > > > >> > > > > >
> > > > >> > >
> > > > >>
> > -----------------------------------------------------------------------
> > > > >> > > > > >
> > > > >> > > > > >                 Key: HARMONY-3246
> > > > >> > > > > >                 URL:
> > > > >> > > https://issues.apache.org/jira/browse/HARMONY-3246
> > > > >> > > > > >             Project: Harmony
> > > > >> > > > > >          Issue Type: Improvement
> > > > >> > > > > >          Components: DRLVM
> > > > >> > > > > >            Reporter: Nikolay Sidelnikov
> > > > >> > > > > >         Assigned To: Nathan Beyer
> > > > >> > > > > >         Attachments: p5_fixed_commented.patch
> > > > >> > > > > >
> > > > >> > > > > >
> > > > >> > > > > > Jitrino generates code with SSE and SSE2 instructions
> > which
> > > > >> can not
> > > > >> > > be
> > > > >> > > > > executed on processors older than Pentium 4.
> > > > >> > > > >
> > > > >> > > > > --
> > > > >> > > > > This message is automatically generated by JIRA.
> > > > >> > > > > -
> > > > >> > > > > You can reply to this email to add a comment to the issue
> > > > online.
> > > > >> > > > >
> > > > >> > > >
> > > > >> > > >
> > > > >> > > >
> > > > >> > > > --
> > > > >> > > > Mikhail Fursov
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > > >>
> > > > >> --
> > > > >> http://xiao-feng.blogspot.com
> > > > >>
> > > > >
> > > >
> > > >
> > > > --
> > > > Gregory
> > > >
> > > >
> > >
> > >
> > > --
> > > Mikhail Fursov
> > >
> >
>
>
>
> --
> Mikhail Fursov
>

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Mikhail Fursov <mi...@gmail.com>.
Check new patch, please.

On 4/19/07, Nathan Beyer <nd...@apache.org> wrote:
>
> On 4/18/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > It's a good idea.
> > I'll do both: add k5 pass to all Jitrino.OPT configs and make EM use
> > opt.emconf by default.
> > So there will no additional configuration nor command line options!
>
> I'm not sure what all this means, but if the last line means DRLVM
> will run and pass its tests on a P3 straight out of the build, then
> that's a +1 from me.
>
> Are you going to post a new patch to this bug? Just so I know what to
> watch for.
>
> -Nathan
>
> >
> > On 4/19/07, Gregory Shimansky <gs...@gmail.com> wrote:
> > >
> > > Rana Dasgupta wrote:
> > > > Could be a protocol between the EM and the jits, maybe?
> > >
> > > I also think that EM is the right place to chose the correct emconf
> file
> > > at runtime based on the CPU detection.
> > >
> > > > On 4/18/07, Xiao-Feng Li <xi...@gmail.com> wrote:
> > > >> On 4/18/07, Pavel Ozhdikhin <pa...@gmail.com> wrote:
> > > >> > On 4/18/07, Alexey Varlamov <al...@gmail.com> wrote:
> > > >> > >
> > > >> > > 2007/4/18, Mikhail Fursov <mi...@gmail.com>:
> > > >> > > > Nathan,
> > > >> > > > I checked the patch and it looks OK except a one issue.
> > > >> > > >
> > > >> > > > I do not really like that we have new p5.emconf in codebase
> and
> > > >> propose
> > > >> > > the
> > > >> > > > following improvement:
> > > >> > > > 1) add p5 pass to all Jitrino.OPT codegen aliases in every
> > > >> emconf we
> > > >> > > have.
> > > >> > > > (I can update the patch if agreed)
> > > >> > > I suppose you meant all ia32 configs :). This is neccesary step
> to
> > > >> > > CPUID autodetection, so it a must actually.
> > > >> > >
> > > >> > > >
> > > >> > > > 2) a. After the commit: Make it turned off by default and use
> > > >> additional
> > > >> > > > cmd-line -XX:jit.arg.codegen.p5=on when run on PC without
> SSE2
> > > >> > > >    b. Start discussion: Use CPUID to detect if SSE2 is
> available
> > > >> and
> > > >> > > make
> > > >> > > > JIT turn this pass on automatically if needed.
> > > >> > > >
> > > >> > > > We can implement CPUID check for SSE2 in JIT only (a couple
> of
> > > >> lines of
> > > >> > > > assembly for Linux and Windows)
> > > >> > > > The question is: would it be better if VM provides such
> service
> > > for
> > > >> > > every
> > > >> > > > client? E.g. cpuid_is_sse2_supported()-like methods.
> > > >> > > I'm in serious doubt that it is needed. Too IA-centric, it
> would
> > > have
> > > >> > > little sense in general case. So doing it right in Jit is the
> right
> > > >> > > thing IMO.
> > > >> >
> > > >> >
> > > >> >
> > > >> > Why do you think this is not needed? We might have several JITs
> or
> > > >> > interpreter that can use and extended set of instructions. It
> would
> > > >> be good
> > > >> > to keep these checks in one place in VM.
> > > >>
> > > >> This is architecture specific property, hence Alexey may think it
> > > >> belongs to code generator (here JIT), since otherwise an
> interpreter
> > > >> in C may not need it. I think Alexey's point is valid. To deal with
> > > >> multiple JITs, probably we can put it into some JIT-common files.
> In
> > > >> other words, although multiple JITs may query it, it is not
> > > >> necessarily VM's duty to respond. (Or if we view the JIT-common
> > > >> support as part of VM, then yes, it can be provided by VM.)
> > > >>
> > > >> Thanks,
> > > >> xiaofeng
> > > >>
> > > >> > Thanks,
> > > >> > Pavel
> > > >> >
> > > >> > >
> > > >> > > >
> > > >> > > > On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
> > > >> > > > >
> > > >> > > > > Would anyone else like to review this patch? It's somewhat
> > > >> > > > > significant. I've tested it on a P4/WinXP and DRLVM works
> > > >> without any
> > > >> > > > > noticeable regressions. I've done some initial tests on a
> Quad
> > > >> > > > > P3/Ubuntu and I can now run a simple Hello World with the
> > > >> default JIT,
> > > >> > > > > which is a huge step.
> > > >> > > > >
> > > >> > > > > If no one has any issues, I'm going to commit this patch.
> > > >> > > > >
> > > >> > > > > -Nathan
> > > >> > > > >
> > > >> > > > > ---------- Forwarded message ----------
> > > >> > > > > From: Nathan Beyer (JIRA) <ji...@apache.org>
> > > >> > > > > Date: Apr 18, 2007 12:49 AM
> > > >> > > > > Subject: [jira] Commented: (HARMONY-3246) [drlvm][jit][opt]
> > > >> Jitted
> > > >> > > > > code can not be executed on non-SSE2 platforms
> > > >> > > > > To: commits@harmony.apache.org
> > > >> > > > >
> > > >> > > > >
> > > >> > > > >
> > > >> > > > >     [
> > > >> > > > >
> > > >> > >
> > > >>
> > >
> https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614
> > > >>
> > > >> > > > > ]
> > > >> > > > >
> > > >> > > > > Nathan Beyer commented on HARMONY-3246:
> > > >> > > > > ---------------------------------------
> > > >> > > > >
> > > >> > > > > I've test this on a Linux P3 and it seems to work. I'm now
> > > >> able to run
> > > >> > > > > a simple hello world. Additionally, everything seems to
> work
> > > >> as it did
> > > >> > > > > on a P4/WinXP.
> > > >> > > > >
> > > >> > > > > Let's see if we can get a few more people to review the
> code.
> > > >> > > > >
> > > >> > > > > > [drlvm][jit][opt] Jitted code can not be executed on
> non-SSE2
> > > >> > > platforms
> > > >> > > > > >
> > > >> > >
> > > >>
> -----------------------------------------------------------------------
> > > >> > > > > >
> > > >> > > > > >                 Key: HARMONY-3246
> > > >> > > > > >                 URL:
> > > >> > > https://issues.apache.org/jira/browse/HARMONY-3246
> > > >> > > > > >             Project: Harmony
> > > >> > > > > >          Issue Type: Improvement
> > > >> > > > > >          Components: DRLVM
> > > >> > > > > >            Reporter: Nikolay Sidelnikov
> > > >> > > > > >         Assigned To: Nathan Beyer
> > > >> > > > > >         Attachments: p5_fixed_commented.patch
> > > >> > > > > >
> > > >> > > > > >
> > > >> > > > > > Jitrino generates code with SSE and SSE2 instructions
> which
> > > >> can not
> > > >> > > be
> > > >> > > > > executed on processors older than Pentium 4.
> > > >> > > > >
> > > >> > > > > --
> > > >> > > > > This message is automatically generated by JIRA.
> > > >> > > > > -
> > > >> > > > > You can reply to this email to add a comment to the issue
> > > online.
> > > >> > > > >
> > > >> > > >
> > > >> > > >
> > > >> > > >
> > > >> > > > --
> > > >> > > > Mikhail Fursov
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > > >>
> > > >> --
> > > >> http://xiao-feng.blogspot.com
> > > >>
> > > >
> > >
> > >
> > > --
> > > Gregory
> > >
> > >
> >
> >
> > --
> > Mikhail Fursov
> >
>



-- 
Mikhail Fursov

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Nathan Beyer <nd...@apache.org>.
On 4/18/07, Mikhail Fursov <mi...@gmail.com> wrote:
> It's a good idea.
> I'll do both: add k5 pass to all Jitrino.OPT configs and make EM use
> opt.emconf by default.
> So there will no additional configuration nor command line options!

I'm not sure what all this means, but if the last line means DRLVM
will run and pass its tests on a P3 straight out of the build, then
that's a +1 from me.

Are you going to post a new patch to this bug? Just so I know what to watch for.

-Nathan

>
> On 4/19/07, Gregory Shimansky <gs...@gmail.com> wrote:
> >
> > Rana Dasgupta wrote:
> > > Could be a protocol between the EM and the jits, maybe?
> >
> > I also think that EM is the right place to chose the correct emconf file
> > at runtime based on the CPU detection.
> >
> > > On 4/18/07, Xiao-Feng Li <xi...@gmail.com> wrote:
> > >> On 4/18/07, Pavel Ozhdikhin <pa...@gmail.com> wrote:
> > >> > On 4/18/07, Alexey Varlamov <al...@gmail.com> wrote:
> > >> > >
> > >> > > 2007/4/18, Mikhail Fursov <mi...@gmail.com>:
> > >> > > > Nathan,
> > >> > > > I checked the patch and it looks OK except a one issue.
> > >> > > >
> > >> > > > I do not really like that we have new p5.emconf in codebase and
> > >> propose
> > >> > > the
> > >> > > > following improvement:
> > >> > > > 1) add p5 pass to all Jitrino.OPT codegen aliases in every
> > >> emconf we
> > >> > > have.
> > >> > > > (I can update the patch if agreed)
> > >> > > I suppose you meant all ia32 configs :). This is neccesary step to
> > >> > > CPUID autodetection, so it a must actually.
> > >> > >
> > >> > > >
> > >> > > > 2) a. After the commit: Make it turned off by default and use
> > >> additional
> > >> > > > cmd-line -XX:jit.arg.codegen.p5=on when run on PC without SSE2
> > >> > > >    b. Start discussion: Use CPUID to detect if SSE2 is available
> > >> and
> > >> > > make
> > >> > > > JIT turn this pass on automatically if needed.
> > >> > > >
> > >> > > > We can implement CPUID check for SSE2 in JIT only (a couple of
> > >> lines of
> > >> > > > assembly for Linux and Windows)
> > >> > > > The question is: would it be better if VM provides such service
> > for
> > >> > > every
> > >> > > > client? E.g. cpuid_is_sse2_supported()-like methods.
> > >> > > I'm in serious doubt that it is needed. Too IA-centric, it would
> > have
> > >> > > little sense in general case. So doing it right in Jit is the right
> > >> > > thing IMO.
> > >> >
> > >> >
> > >> >
> > >> > Why do you think this is not needed? We might have several JITs or
> > >> > interpreter that can use and extended set of instructions. It would
> > >> be good
> > >> > to keep these checks in one place in VM.
> > >>
> > >> This is architecture specific property, hence Alexey may think it
> > >> belongs to code generator (here JIT), since otherwise an interpreter
> > >> in C may not need it. I think Alexey's point is valid. To deal with
> > >> multiple JITs, probably we can put it into some JIT-common files. In
> > >> other words, although multiple JITs may query it, it is not
> > >> necessarily VM's duty to respond. (Or if we view the JIT-common
> > >> support as part of VM, then yes, it can be provided by VM.)
> > >>
> > >> Thanks,
> > >> xiaofeng
> > >>
> > >> > Thanks,
> > >> > Pavel
> > >> >
> > >> > >
> > >> > > >
> > >> > > > On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
> > >> > > > >
> > >> > > > > Would anyone else like to review this patch? It's somewhat
> > >> > > > > significant. I've tested it on a P4/WinXP and DRLVM works
> > >> without any
> > >> > > > > noticeable regressions. I've done some initial tests on a Quad
> > >> > > > > P3/Ubuntu and I can now run a simple Hello World with the
> > >> default JIT,
> > >> > > > > which is a huge step.
> > >> > > > >
> > >> > > > > If no one has any issues, I'm going to commit this patch.
> > >> > > > >
> > >> > > > > -Nathan
> > >> > > > >
> > >> > > > > ---------- Forwarded message ----------
> > >> > > > > From: Nathan Beyer (JIRA) <ji...@apache.org>
> > >> > > > > Date: Apr 18, 2007 12:49 AM
> > >> > > > > Subject: [jira] Commented: (HARMONY-3246) [drlvm][jit][opt]
> > >> Jitted
> > >> > > > > code can not be executed on non-SSE2 platforms
> > >> > > > > To: commits@harmony.apache.org
> > >> > > > >
> > >> > > > >
> > >> > > > >
> > >> > > > >     [
> > >> > > > >
> > >> > >
> > >>
> > https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614
> > >>
> > >> > > > > ]
> > >> > > > >
> > >> > > > > Nathan Beyer commented on HARMONY-3246:
> > >> > > > > ---------------------------------------
> > >> > > > >
> > >> > > > > I've test this on a Linux P3 and it seems to work. I'm now
> > >> able to run
> > >> > > > > a simple hello world. Additionally, everything seems to work
> > >> as it did
> > >> > > > > on a P4/WinXP.
> > >> > > > >
> > >> > > > > Let's see if we can get a few more people to review the code.
> > >> > > > >
> > >> > > > > > [drlvm][jit][opt] Jitted code can not be executed on non-SSE2
> > >> > > platforms
> > >> > > > > >
> > >> > >
> > >> -----------------------------------------------------------------------
> > >> > > > > >
> > >> > > > > >                 Key: HARMONY-3246
> > >> > > > > >                 URL:
> > >> > > https://issues.apache.org/jira/browse/HARMONY-3246
> > >> > > > > >             Project: Harmony
> > >> > > > > >          Issue Type: Improvement
> > >> > > > > >          Components: DRLVM
> > >> > > > > >            Reporter: Nikolay Sidelnikov
> > >> > > > > >         Assigned To: Nathan Beyer
> > >> > > > > >         Attachments: p5_fixed_commented.patch
> > >> > > > > >
> > >> > > > > >
> > >> > > > > > Jitrino generates code with SSE and SSE2 instructions which
> > >> can not
> > >> > > be
> > >> > > > > executed on processors older than Pentium 4.
> > >> > > > >
> > >> > > > > --
> > >> > > > > This message is automatically generated by JIRA.
> > >> > > > > -
> > >> > > > > You can reply to this email to add a comment to the issue
> > online.
> > >> > > > >
> > >> > > >
> > >> > > >
> > >> > > >
> > >> > > > --
> > >> > > > Mikhail Fursov
> > >> > > >
> > >> > >
> > >> >
> > >>
> > >>
> > >> --
> > >> http://xiao-feng.blogspot.com
> > >>
> > >
> >
> >
> > --
> > Gregory
> >
> >
>
>
> --
> Mikhail Fursov
>

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Mikhail Fursov <mi...@gmail.com>.
It's a good idea.
I'll do both: add k5 pass to all Jitrino.OPT configs and make EM use
opt.emconf by default.
So there will no additional configuration nor command line options!

On 4/19/07, Gregory Shimansky <gs...@gmail.com> wrote:
>
> Rana Dasgupta wrote:
> > Could be a protocol between the EM and the jits, maybe?
>
> I also think that EM is the right place to chose the correct emconf file
> at runtime based on the CPU detection.
>
> > On 4/18/07, Xiao-Feng Li <xi...@gmail.com> wrote:
> >> On 4/18/07, Pavel Ozhdikhin <pa...@gmail.com> wrote:
> >> > On 4/18/07, Alexey Varlamov <al...@gmail.com> wrote:
> >> > >
> >> > > 2007/4/18, Mikhail Fursov <mi...@gmail.com>:
> >> > > > Nathan,
> >> > > > I checked the patch and it looks OK except a one issue.
> >> > > >
> >> > > > I do not really like that we have new p5.emconf in codebase and
> >> propose
> >> > > the
> >> > > > following improvement:
> >> > > > 1) add p5 pass to all Jitrino.OPT codegen aliases in every
> >> emconf we
> >> > > have.
> >> > > > (I can update the patch if agreed)
> >> > > I suppose you meant all ia32 configs :). This is neccesary step to
> >> > > CPUID autodetection, so it a must actually.
> >> > >
> >> > > >
> >> > > > 2) a. After the commit: Make it turned off by default and use
> >> additional
> >> > > > cmd-line -XX:jit.arg.codegen.p5=on when run on PC without SSE2
> >> > > >    b. Start discussion: Use CPUID to detect if SSE2 is available
> >> and
> >> > > make
> >> > > > JIT turn this pass on automatically if needed.
> >> > > >
> >> > > > We can implement CPUID check for SSE2 in JIT only (a couple of
> >> lines of
> >> > > > assembly for Linux and Windows)
> >> > > > The question is: would it be better if VM provides such service
> for
> >> > > every
> >> > > > client? E.g. cpuid_is_sse2_supported()-like methods.
> >> > > I'm in serious doubt that it is needed. Too IA-centric, it would
> have
> >> > > little sense in general case. So doing it right in Jit is the right
> >> > > thing IMO.
> >> >
> >> >
> >> >
> >> > Why do you think this is not needed? We might have several JITs or
> >> > interpreter that can use and extended set of instructions. It would
> >> be good
> >> > to keep these checks in one place in VM.
> >>
> >> This is architecture specific property, hence Alexey may think it
> >> belongs to code generator (here JIT), since otherwise an interpreter
> >> in C may not need it. I think Alexey's point is valid. To deal with
> >> multiple JITs, probably we can put it into some JIT-common files. In
> >> other words, although multiple JITs may query it, it is not
> >> necessarily VM's duty to respond. (Or if we view the JIT-common
> >> support as part of VM, then yes, it can be provided by VM.)
> >>
> >> Thanks,
> >> xiaofeng
> >>
> >> > Thanks,
> >> > Pavel
> >> >
> >> > >
> >> > > >
> >> > > > On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
> >> > > > >
> >> > > > > Would anyone else like to review this patch? It's somewhat
> >> > > > > significant. I've tested it on a P4/WinXP and DRLVM works
> >> without any
> >> > > > > noticeable regressions. I've done some initial tests on a Quad
> >> > > > > P3/Ubuntu and I can now run a simple Hello World with the
> >> default JIT,
> >> > > > > which is a huge step.
> >> > > > >
> >> > > > > If no one has any issues, I'm going to commit this patch.
> >> > > > >
> >> > > > > -Nathan
> >> > > > >
> >> > > > > ---------- Forwarded message ----------
> >> > > > > From: Nathan Beyer (JIRA) <ji...@apache.org>
> >> > > > > Date: Apr 18, 2007 12:49 AM
> >> > > > > Subject: [jira] Commented: (HARMONY-3246) [drlvm][jit][opt]
> >> Jitted
> >> > > > > code can not be executed on non-SSE2 platforms
> >> > > > > To: commits@harmony.apache.org
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > >     [
> >> > > > >
> >> > >
> >>
> https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614
> >>
> >> > > > > ]
> >> > > > >
> >> > > > > Nathan Beyer commented on HARMONY-3246:
> >> > > > > ---------------------------------------
> >> > > > >
> >> > > > > I've test this on a Linux P3 and it seems to work. I'm now
> >> able to run
> >> > > > > a simple hello world. Additionally, everything seems to work
> >> as it did
> >> > > > > on a P4/WinXP.
> >> > > > >
> >> > > > > Let's see if we can get a few more people to review the code.
> >> > > > >
> >> > > > > > [drlvm][jit][opt] Jitted code can not be executed on non-SSE2
> >> > > platforms
> >> > > > > >
> >> > >
> >> -----------------------------------------------------------------------
> >> > > > > >
> >> > > > > >                 Key: HARMONY-3246
> >> > > > > >                 URL:
> >> > > https://issues.apache.org/jira/browse/HARMONY-3246
> >> > > > > >             Project: Harmony
> >> > > > > >          Issue Type: Improvement
> >> > > > > >          Components: DRLVM
> >> > > > > >            Reporter: Nikolay Sidelnikov
> >> > > > > >         Assigned To: Nathan Beyer
> >> > > > > >         Attachments: p5_fixed_commented.patch
> >> > > > > >
> >> > > > > >
> >> > > > > > Jitrino generates code with SSE and SSE2 instructions which
> >> can not
> >> > > be
> >> > > > > executed on processors older than Pentium 4.
> >> > > > >
> >> > > > > --
> >> > > > > This message is automatically generated by JIRA.
> >> > > > > -
> >> > > > > You can reply to this email to add a comment to the issue
> online.
> >> > > > >
> >> > > >
> >> > > >
> >> > > >
> >> > > > --
> >> > > > Mikhail Fursov
> >> > > >
> >> > >
> >> >
> >>
> >>
> >> --
> >> http://xiao-feng.blogspot.com
> >>
> >
>
>
> --
> Gregory
>
>


-- 
Mikhail Fursov

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Gregory Shimansky <gs...@gmail.com>.
Rana Dasgupta wrote:
> Could be a protocol between the EM and the jits, maybe?

I also think that EM is the right place to chose the correct emconf file 
at runtime based on the CPU detection.

> On 4/18/07, Xiao-Feng Li <xi...@gmail.com> wrote:
>> On 4/18/07, Pavel Ozhdikhin <pa...@gmail.com> wrote:
>> > On 4/18/07, Alexey Varlamov <al...@gmail.com> wrote:
>> > >
>> > > 2007/4/18, Mikhail Fursov <mi...@gmail.com>:
>> > > > Nathan,
>> > > > I checked the patch and it looks OK except a one issue.
>> > > >
>> > > > I do not really like that we have new p5.emconf in codebase and 
>> propose
>> > > the
>> > > > following improvement:
>> > > > 1) add p5 pass to all Jitrino.OPT codegen aliases in every 
>> emconf we
>> > > have.
>> > > > (I can update the patch if agreed)
>> > > I suppose you meant all ia32 configs :). This is neccesary step to
>> > > CPUID autodetection, so it a must actually.
>> > >
>> > > >
>> > > > 2) a. After the commit: Make it turned off by default and use 
>> additional
>> > > > cmd-line -XX:jit.arg.codegen.p5=on when run on PC without SSE2
>> > > >    b. Start discussion: Use CPUID to detect if SSE2 is available 
>> and
>> > > make
>> > > > JIT turn this pass on automatically if needed.
>> > > >
>> > > > We can implement CPUID check for SSE2 in JIT only (a couple of 
>> lines of
>> > > > assembly for Linux and Windows)
>> > > > The question is: would it be better if VM provides such service for
>> > > every
>> > > > client? E.g. cpuid_is_sse2_supported()-like methods.
>> > > I'm in serious doubt that it is needed. Too IA-centric, it would have
>> > > little sense in general case. So doing it right in Jit is the right
>> > > thing IMO.
>> >
>> >
>> >
>> > Why do you think this is not needed? We might have several JITs or
>> > interpreter that can use and extended set of instructions. It would 
>> be good
>> > to keep these checks in one place in VM.
>>
>> This is architecture specific property, hence Alexey may think it
>> belongs to code generator (here JIT), since otherwise an interpreter
>> in C may not need it. I think Alexey's point is valid. To deal with
>> multiple JITs, probably we can put it into some JIT-common files. In
>> other words, although multiple JITs may query it, it is not
>> necessarily VM's duty to respond. (Or if we view the JIT-common
>> support as part of VM, then yes, it can be provided by VM.)
>>
>> Thanks,
>> xiaofeng
>>
>> > Thanks,
>> > Pavel
>> >
>> > >
>> > > >
>> > > > On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
>> > > > >
>> > > > > Would anyone else like to review this patch? It's somewhat
>> > > > > significant. I've tested it on a P4/WinXP and DRLVM works 
>> without any
>> > > > > noticeable regressions. I've done some initial tests on a Quad
>> > > > > P3/Ubuntu and I can now run a simple Hello World with the 
>> default JIT,
>> > > > > which is a huge step.
>> > > > >
>> > > > > If no one has any issues, I'm going to commit this patch.
>> > > > >
>> > > > > -Nathan
>> > > > >
>> > > > > ---------- Forwarded message ----------
>> > > > > From: Nathan Beyer (JIRA) <ji...@apache.org>
>> > > > > Date: Apr 18, 2007 12:49 AM
>> > > > > Subject: [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] 
>> Jitted
>> > > > > code can not be executed on non-SSE2 platforms
>> > > > > To: commits@harmony.apache.org
>> > > > >
>> > > > >
>> > > > >
>> > > > >     [
>> > > > >
>> > > 
>> https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614 
>>
>> > > > > ]
>> > > > >
>> > > > > Nathan Beyer commented on HARMONY-3246:
>> > > > > ---------------------------------------
>> > > > >
>> > > > > I've test this on a Linux P3 and it seems to work. I'm now 
>> able to run
>> > > > > a simple hello world. Additionally, everything seems to work 
>> as it did
>> > > > > on a P4/WinXP.
>> > > > >
>> > > > > Let's see if we can get a few more people to review the code.
>> > > > >
>> > > > > > [drlvm][jit][opt] Jitted code can not be executed on non-SSE2
>> > > platforms
>> > > > > >
>> > > 
>> -----------------------------------------------------------------------
>> > > > > >
>> > > > > >                 Key: HARMONY-3246
>> > > > > >                 URL:
>> > > https://issues.apache.org/jira/browse/HARMONY-3246
>> > > > > >             Project: Harmony
>> > > > > >          Issue Type: Improvement
>> > > > > >          Components: DRLVM
>> > > > > >            Reporter: Nikolay Sidelnikov
>> > > > > >         Assigned To: Nathan Beyer
>> > > > > >         Attachments: p5_fixed_commented.patch
>> > > > > >
>> > > > > >
>> > > > > > Jitrino generates code with SSE and SSE2 instructions which 
>> can not
>> > > be
>> > > > > executed on processors older than Pentium 4.
>> > > > >
>> > > > > --
>> > > > > This message is automatically generated by JIRA.
>> > > > > -
>> > > > > You can reply to this email to add a comment to the issue online.
>> > > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > Mikhail Fursov
>> > > >
>> > >
>> >
>>
>>
>> -- 
>> http://xiao-feng.blogspot.com
>>
> 


-- 
Gregory


Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Rana Dasgupta <rd...@gmail.com>.
Could be a protocol between the EM and the jits, maybe?

On 4/18/07, Xiao-Feng Li <xi...@gmail.com> wrote:
> On 4/18/07, Pavel Ozhdikhin <pa...@gmail.com> wrote:
> > On 4/18/07, Alexey Varlamov <al...@gmail.com> wrote:
> > >
> > > 2007/4/18, Mikhail Fursov <mi...@gmail.com>:
> > > > Nathan,
> > > > I checked the patch and it looks OK except a one issue.
> > > >
> > > > I do not really like that we have new p5.emconf in codebase and propose
> > > the
> > > > following improvement:
> > > > 1) add p5 pass to all Jitrino.OPT codegen aliases in every emconf we
> > > have.
> > > > (I can update the patch if agreed)
> > > I suppose you meant all ia32 configs :). This is neccesary step to
> > > CPUID autodetection, so it a must actually.
> > >
> > > >
> > > > 2) a. After the commit: Make it turned off by default and use additional
> > > > cmd-line -XX:jit.arg.codegen.p5=on when run on PC without SSE2
> > > >    b. Start discussion: Use CPUID to detect if SSE2 is available and
> > > make
> > > > JIT turn this pass on automatically if needed.
> > > >
> > > > We can implement CPUID check for SSE2 in JIT only (a couple of lines of
> > > > assembly for Linux and Windows)
> > > > The question is: would it be better if VM provides such service for
> > > every
> > > > client? E.g. cpuid_is_sse2_supported()-like methods.
> > > I'm in serious doubt that it is needed. Too IA-centric, it would have
> > > little sense in general case. So doing it right in Jit is the right
> > > thing IMO.
> >
> >
> >
> > Why do you think this is not needed? We might have several JITs or
> > interpreter that can use and extended set of instructions. It would be good
> > to keep these checks in one place in VM.
>
> This is architecture specific property, hence Alexey may think it
> belongs to code generator (here JIT), since otherwise an interpreter
> in C may not need it. I think Alexey's point is valid. To deal with
> multiple JITs, probably we can put it into some JIT-common files. In
> other words, although multiple JITs may query it, it is not
> necessarily VM's duty to respond. (Or if we view the JIT-common
> support as part of VM, then yes, it can be provided by VM.)
>
> Thanks,
> xiaofeng
>
> > Thanks,
> > Pavel
> >
> > >
> > > >
> > > > On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
> > > > >
> > > > > Would anyone else like to review this patch? It's somewhat
> > > > > significant. I've tested it on a P4/WinXP and DRLVM works without any
> > > > > noticeable regressions. I've done some initial tests on a Quad
> > > > > P3/Ubuntu and I can now run a simple Hello World with the default JIT,
> > > > > which is a huge step.
> > > > >
> > > > > If no one has any issues, I'm going to commit this patch.
> > > > >
> > > > > -Nathan
> > > > >
> > > > > ---------- Forwarded message ----------
> > > > > From: Nathan Beyer (JIRA) <ji...@apache.org>
> > > > > Date: Apr 18, 2007 12:49 AM
> > > > > Subject: [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted
> > > > > code can not be executed on non-SSE2 platforms
> > > > > To: commits@harmony.apache.org
> > > > >
> > > > >
> > > > >
> > > > >     [
> > > > >
> > > https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614
> > > > > ]
> > > > >
> > > > > Nathan Beyer commented on HARMONY-3246:
> > > > > ---------------------------------------
> > > > >
> > > > > I've test this on a Linux P3 and it seems to work. I'm now able to run
> > > > > a simple hello world. Additionally, everything seems to work as it did
> > > > > on a P4/WinXP.
> > > > >
> > > > > Let's see if we can get a few more people to review the code.
> > > > >
> > > > > > [drlvm][jit][opt] Jitted code can not be executed on non-SSE2
> > > platforms
> > > > > >
> > > -----------------------------------------------------------------------
> > > > > >
> > > > > >                 Key: HARMONY-3246
> > > > > >                 URL:
> > > https://issues.apache.org/jira/browse/HARMONY-3246
> > > > > >             Project: Harmony
> > > > > >          Issue Type: Improvement
> > > > > >          Components: DRLVM
> > > > > >            Reporter: Nikolay Sidelnikov
> > > > > >         Assigned To: Nathan Beyer
> > > > > >         Attachments: p5_fixed_commented.patch
> > > > > >
> > > > > >
> > > > > > Jitrino generates code with SSE and SSE2 instructions which can not
> > > be
> > > > > executed on processors older than Pentium 4.
> > > > >
> > > > > --
> > > > > This message is automatically generated by JIRA.
> > > > > -
> > > > > You can reply to this email to add a comment to the issue online.
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Mikhail Fursov
> > > >
> > >
> >
>
>
> --
> http://xiao-feng.blogspot.com
>

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Pavel Ozhdikhin <pa...@gmail.com>.
I think that would be nice.

thanks,
Pavel


On 4/18/07, Mikhail Fursov <mi...@gmail.com> wrote:
>
> Have we agreed that I rework this patch and add cpuid functionality to
> JIT?
> (I think I can do it tomorrow)
>
> On 4/18/07, Xiao-Feng Li <xi...@gmail.com> wrote:
> >
> > On 4/18/07, Pavel Ozhdikhin <pa...@gmail.com> wrote:
> > > On 4/18/07, Alexey Varlamov <al...@gmail.com> wrote:
> > > >
> > > > 2007/4/18, Mikhail Fursov <mi...@gmail.com>:
> > > > > Nathan,
> > > > > I checked the patch and it looks OK except a one issue.
> > > > >
> > > > > I do not really like that we have new p5.emconf in codebase and
> > propose
> > > > the
> > > > > following improvement:
> > > > > 1) add p5 pass to all Jitrino.OPT codegen aliases in every emconf
> we
> > > > have.
> > > > > (I can update the patch if agreed)
> > > > I suppose you meant all ia32 configs :). This is neccesary step to
> > > > CPUID autodetection, so it a must actually.
> > > >
> > > > >
> > > > > 2) a. After the commit: Make it turned off by default and use
> > additional
> > > > > cmd-line -XX:jit.arg.codegen.p5=on when run on PC without SSE2
> > > > >    b. Start discussion: Use CPUID to detect if SSE2 is available
> and
> > > > make
> > > > > JIT turn this pass on automatically if needed.
> > > > >
> > > > > We can implement CPUID check for SSE2 in JIT only (a couple of
> lines
> > of
> > > > > assembly for Linux and Windows)
> > > > > The question is: would it be better if VM provides such service
> for
> > > > every
> > > > > client? E.g. cpuid_is_sse2_supported()-like methods.
> > > > I'm in serious doubt that it is needed. Too IA-centric, it would
> have
> > > > little sense in general case. So doing it right in Jit is the right
> > > > thing IMO.
> > >
> > >
> > >
> > > Why do you think this is not needed? We might have several JITs or
> > > interpreter that can use and extended set of instructions. It would be
> > good
> > > to keep these checks in one place in VM.
> >
> > This is architecture specific property, hence Alexey may think it
> > belongs to code generator (here JIT), since otherwise an interpreter
> > in C may not need it. I think Alexey's point is valid. To deal with
> > multiple JITs, probably we can put it into some JIT-common files. In
> > other words, although multiple JITs may query it, it is not
> > necessarily VM's duty to respond. (Or if we view the JIT-common
> > support as part of VM, then yes, it can be provided by VM.)
> >
> > Thanks,
> > xiaofeng
> >
> > > Thanks,
> > > Pavel
> > >
> > > >
> > > > >
> > > > > On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
> > > > > >
> > > > > > Would anyone else like to review this patch? It's somewhat
> > > > > > significant. I've tested it on a P4/WinXP and DRLVM works
> without
> > any
> > > > > > noticeable regressions. I've done some initial tests on a Quad
> > > > > > P3/Ubuntu and I can now run a simple Hello World with the
> default
> > JIT,
> > > > > > which is a huge step.
> > > > > >
> > > > > > If no one has any issues, I'm going to commit this patch.
> > > > > >
> > > > > > -Nathan
> > > > > >
> > > > > > ---------- Forwarded message ----------
> > > > > > From: Nathan Beyer (JIRA) <ji...@apache.org>
> > > > > > Date: Apr 18, 2007 12:49 AM
> > > > > > Subject: [jira] Commented: (HARMONY-3246) [drlvm][jit][opt]
> Jitted
> > > > > > code can not be executed on non-SSE2 platforms
> > > > > > To: commits@harmony.apache.org
> > > > > >
> > > > > >
> > > > > >
> > > > > >     [
> > > > > >
> > > >
> >
> https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614
> > > > > > ]
> > > > > >
> > > > > > Nathan Beyer commented on HARMONY-3246:
> > > > > > ---------------------------------------
> > > > > >
> > > > > > I've test this on a Linux P3 and it seems to work. I'm now able
> to
> > run
> > > > > > a simple hello world. Additionally, everything seems to work as
> it
> > did
> > > > > > on a P4/WinXP.
> > > > > >
> > > > > > Let's see if we can get a few more people to review the code.
> > > > > >
> > > > > > > [drlvm][jit][opt] Jitted code can not be executed on non-SSE2
> > > > platforms
> > > > > > >
> > > >
> > -----------------------------------------------------------------------
> > > > > > >
> > > > > > >                 Key: HARMONY-3246
> > > > > > >                 URL:
> > > > https://issues.apache.org/jira/browse/HARMONY-3246
> > > > > > >             Project: Harmony
> > > > > > >          Issue Type: Improvement
> > > > > > >          Components: DRLVM
> > > > > > >            Reporter: Nikolay Sidelnikov
> > > > > > >         Assigned To: Nathan Beyer
> > > > > > >         Attachments: p5_fixed_commented.patch
> > > > > > >
> > > > > > >
> > > > > > > Jitrino generates code with SSE and SSE2 instructions which
> can
> > not
> > > > be
> > > > > > executed on processors older than Pentium 4.
> > > > > >
> > > > > > --
> > > > > > This message is automatically generated by JIRA.
> > > > > > -
> > > > > > You can reply to this email to add a comment to the issue
> online.
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Mikhail Fursov
> > > > >
> > > >
> > >
> >
> >
> > --
> > http://xiao-feng.blogspot.com
> >
>
>
>
> --
> Mikhail Fursov
>

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Mikhail Fursov <mi...@gmail.com>.
Have we agreed that I rework this patch and add cpuid functionality to JIT?
(I think I can do it tomorrow)

On 4/18/07, Xiao-Feng Li <xi...@gmail.com> wrote:
>
> On 4/18/07, Pavel Ozhdikhin <pa...@gmail.com> wrote:
> > On 4/18/07, Alexey Varlamov <al...@gmail.com> wrote:
> > >
> > > 2007/4/18, Mikhail Fursov <mi...@gmail.com>:
> > > > Nathan,
> > > > I checked the patch and it looks OK except a one issue.
> > > >
> > > > I do not really like that we have new p5.emconf in codebase and
> propose
> > > the
> > > > following improvement:
> > > > 1) add p5 pass to all Jitrino.OPT codegen aliases in every emconf we
> > > have.
> > > > (I can update the patch if agreed)
> > > I suppose you meant all ia32 configs :). This is neccesary step to
> > > CPUID autodetection, so it a must actually.
> > >
> > > >
> > > > 2) a. After the commit: Make it turned off by default and use
> additional
> > > > cmd-line -XX:jit.arg.codegen.p5=on when run on PC without SSE2
> > > >    b. Start discussion: Use CPUID to detect if SSE2 is available and
> > > make
> > > > JIT turn this pass on automatically if needed.
> > > >
> > > > We can implement CPUID check for SSE2 in JIT only (a couple of lines
> of
> > > > assembly for Linux and Windows)
> > > > The question is: would it be better if VM provides such service for
> > > every
> > > > client? E.g. cpuid_is_sse2_supported()-like methods.
> > > I'm in serious doubt that it is needed. Too IA-centric, it would have
> > > little sense in general case. So doing it right in Jit is the right
> > > thing IMO.
> >
> >
> >
> > Why do you think this is not needed? We might have several JITs or
> > interpreter that can use and extended set of instructions. It would be
> good
> > to keep these checks in one place in VM.
>
> This is architecture specific property, hence Alexey may think it
> belongs to code generator (here JIT), since otherwise an interpreter
> in C may not need it. I think Alexey's point is valid. To deal with
> multiple JITs, probably we can put it into some JIT-common files. In
> other words, although multiple JITs may query it, it is not
> necessarily VM's duty to respond. (Or if we view the JIT-common
> support as part of VM, then yes, it can be provided by VM.)
>
> Thanks,
> xiaofeng
>
> > Thanks,
> > Pavel
> >
> > >
> > > >
> > > > On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
> > > > >
> > > > > Would anyone else like to review this patch? It's somewhat
> > > > > significant. I've tested it on a P4/WinXP and DRLVM works without
> any
> > > > > noticeable regressions. I've done some initial tests on a Quad
> > > > > P3/Ubuntu and I can now run a simple Hello World with the default
> JIT,
> > > > > which is a huge step.
> > > > >
> > > > > If no one has any issues, I'm going to commit this patch.
> > > > >
> > > > > -Nathan
> > > > >
> > > > > ---------- Forwarded message ----------
> > > > > From: Nathan Beyer (JIRA) <ji...@apache.org>
> > > > > Date: Apr 18, 2007 12:49 AM
> > > > > Subject: [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted
> > > > > code can not be executed on non-SSE2 platforms
> > > > > To: commits@harmony.apache.org
> > > > >
> > > > >
> > > > >
> > > > >     [
> > > > >
> > >
> https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614
> > > > > ]
> > > > >
> > > > > Nathan Beyer commented on HARMONY-3246:
> > > > > ---------------------------------------
> > > > >
> > > > > I've test this on a Linux P3 and it seems to work. I'm now able to
> run
> > > > > a simple hello world. Additionally, everything seems to work as it
> did
> > > > > on a P4/WinXP.
> > > > >
> > > > > Let's see if we can get a few more people to review the code.
> > > > >
> > > > > > [drlvm][jit][opt] Jitted code can not be executed on non-SSE2
> > > platforms
> > > > > >
> > >
> -----------------------------------------------------------------------
> > > > > >
> > > > > >                 Key: HARMONY-3246
> > > > > >                 URL:
> > > https://issues.apache.org/jira/browse/HARMONY-3246
> > > > > >             Project: Harmony
> > > > > >          Issue Type: Improvement
> > > > > >          Components: DRLVM
> > > > > >            Reporter: Nikolay Sidelnikov
> > > > > >         Assigned To: Nathan Beyer
> > > > > >         Attachments: p5_fixed_commented.patch
> > > > > >
> > > > > >
> > > > > > Jitrino generates code with SSE and SSE2 instructions which can
> not
> > > be
> > > > > executed on processors older than Pentium 4.
> > > > >
> > > > > --
> > > > > This message is automatically generated by JIRA.
> > > > > -
> > > > > You can reply to this email to add a comment to the issue online.
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Mikhail Fursov
> > > >
> > >
> >
>
>
> --
> http://xiao-feng.blogspot.com
>



-- 
Mikhail Fursov

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Xiao-Feng Li <xi...@gmail.com>.
On 4/18/07, Pavel Ozhdikhin <pa...@gmail.com> wrote:
> On 4/18/07, Alexey Varlamov <al...@gmail.com> wrote:
> >
> > 2007/4/18, Mikhail Fursov <mi...@gmail.com>:
> > > Nathan,
> > > I checked the patch and it looks OK except a one issue.
> > >
> > > I do not really like that we have new p5.emconf in codebase and propose
> > the
> > > following improvement:
> > > 1) add p5 pass to all Jitrino.OPT codegen aliases in every emconf we
> > have.
> > > (I can update the patch if agreed)
> > I suppose you meant all ia32 configs :). This is neccesary step to
> > CPUID autodetection, so it a must actually.
> >
> > >
> > > 2) a. After the commit: Make it turned off by default and use additional
> > > cmd-line -XX:jit.arg.codegen.p5=on when run on PC without SSE2
> > >    b. Start discussion: Use CPUID to detect if SSE2 is available and
> > make
> > > JIT turn this pass on automatically if needed.
> > >
> > > We can implement CPUID check for SSE2 in JIT only (a couple of lines of
> > > assembly for Linux and Windows)
> > > The question is: would it be better if VM provides such service for
> > every
> > > client? E.g. cpuid_is_sse2_supported()-like methods.
> > I'm in serious doubt that it is needed. Too IA-centric, it would have
> > little sense in general case. So doing it right in Jit is the right
> > thing IMO.
>
>
>
> Why do you think this is not needed? We might have several JITs or
> interpreter that can use and extended set of instructions. It would be good
> to keep these checks in one place in VM.

This is architecture specific property, hence Alexey may think it
belongs to code generator (here JIT), since otherwise an interpreter
in C may not need it. I think Alexey's point is valid. To deal with
multiple JITs, probably we can put it into some JIT-common files. In
other words, although multiple JITs may query it, it is not
necessarily VM's duty to respond. (Or if we view the JIT-common
support as part of VM, then yes, it can be provided by VM.)

Thanks,
xiaofeng

> Thanks,
> Pavel
>
> >
> > >
> > > On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
> > > >
> > > > Would anyone else like to review this patch? It's somewhat
> > > > significant. I've tested it on a P4/WinXP and DRLVM works without any
> > > > noticeable regressions. I've done some initial tests on a Quad
> > > > P3/Ubuntu and I can now run a simple Hello World with the default JIT,
> > > > which is a huge step.
> > > >
> > > > If no one has any issues, I'm going to commit this patch.
> > > >
> > > > -Nathan
> > > >
> > > > ---------- Forwarded message ----------
> > > > From: Nathan Beyer (JIRA) <ji...@apache.org>
> > > > Date: Apr 18, 2007 12:49 AM
> > > > Subject: [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted
> > > > code can not be executed on non-SSE2 platforms
> > > > To: commits@harmony.apache.org
> > > >
> > > >
> > > >
> > > >     [
> > > >
> > https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614
> > > > ]
> > > >
> > > > Nathan Beyer commented on HARMONY-3246:
> > > > ---------------------------------------
> > > >
> > > > I've test this on a Linux P3 and it seems to work. I'm now able to run
> > > > a simple hello world. Additionally, everything seems to work as it did
> > > > on a P4/WinXP.
> > > >
> > > > Let's see if we can get a few more people to review the code.
> > > >
> > > > > [drlvm][jit][opt] Jitted code can not be executed on non-SSE2
> > platforms
> > > > >
> > -----------------------------------------------------------------------
> > > > >
> > > > >                 Key: HARMONY-3246
> > > > >                 URL:
> > https://issues.apache.org/jira/browse/HARMONY-3246
> > > > >             Project: Harmony
> > > > >          Issue Type: Improvement
> > > > >          Components: DRLVM
> > > > >            Reporter: Nikolay Sidelnikov
> > > > >         Assigned To: Nathan Beyer
> > > > >         Attachments: p5_fixed_commented.patch
> > > > >
> > > > >
> > > > > Jitrino generates code with SSE and SSE2 instructions which can not
> > be
> > > > executed on processors older than Pentium 4.
> > > >
> > > > --
> > > > This message is automatically generated by JIRA.
> > > > -
> > > > You can reply to this email to add a comment to the issue online.
> > > >
> > >
> > >
> > >
> > > --
> > > Mikhail Fursov
> > >
> >
>


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

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Pavel Ozhdikhin <pa...@gmail.com>.
On 4/18/07, Alexey Varlamov <al...@gmail.com> wrote:
>
> 2007/4/18, Mikhail Fursov <mi...@gmail.com>:
> > Nathan,
> > I checked the patch and it looks OK except a one issue.
> >
> > I do not really like that we have new p5.emconf in codebase and propose
> the
> > following improvement:
> > 1) add p5 pass to all Jitrino.OPT codegen aliases in every emconf we
> have.
> > (I can update the patch if agreed)
> I suppose you meant all ia32 configs :). This is neccesary step to
> CPUID autodetection, so it a must actually.
>
> >
> > 2) a. After the commit: Make it turned off by default and use additional
> > cmd-line -XX:jit.arg.codegen.p5=on when run on PC without SSE2
> >    b. Start discussion: Use CPUID to detect if SSE2 is available and
> make
> > JIT turn this pass on automatically if needed.
> >
> > We can implement CPUID check for SSE2 in JIT only (a couple of lines of
> > assembly for Linux and Windows)
> > The question is: would it be better if VM provides such service for
> every
> > client? E.g. cpuid_is_sse2_supported()-like methods.
> I'm in serious doubt that it is needed. Too IA-centric, it would have
> little sense in general case. So doing it right in Jit is the right
> thing IMO.



Why do you think this is not needed? We might have several JITs or
interpreter that can use and extended set of instructions. It would be good
to keep these checks in one place in VM.

Thanks,
Pavel

>
> >
> > On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
> > >
> > > Would anyone else like to review this patch? It's somewhat
> > > significant. I've tested it on a P4/WinXP and DRLVM works without any
> > > noticeable regressions. I've done some initial tests on a Quad
> > > P3/Ubuntu and I can now run a simple Hello World with the default JIT,
> > > which is a huge step.
> > >
> > > If no one has any issues, I'm going to commit this patch.
> > >
> > > -Nathan
> > >
> > > ---------- Forwarded message ----------
> > > From: Nathan Beyer (JIRA) <ji...@apache.org>
> > > Date: Apr 18, 2007 12:49 AM
> > > Subject: [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted
> > > code can not be executed on non-SSE2 platforms
> > > To: commits@harmony.apache.org
> > >
> > >
> > >
> > >     [
> > >
> https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614
> > > ]
> > >
> > > Nathan Beyer commented on HARMONY-3246:
> > > ---------------------------------------
> > >
> > > I've test this on a Linux P3 and it seems to work. I'm now able to run
> > > a simple hello world. Additionally, everything seems to work as it did
> > > on a P4/WinXP.
> > >
> > > Let's see if we can get a few more people to review the code.
> > >
> > > > [drlvm][jit][opt] Jitted code can not be executed on non-SSE2
> platforms
> > > >
> -----------------------------------------------------------------------
> > > >
> > > >                 Key: HARMONY-3246
> > > >                 URL:
> https://issues.apache.org/jira/browse/HARMONY-3246
> > > >             Project: Harmony
> > > >          Issue Type: Improvement
> > > >          Components: DRLVM
> > > >            Reporter: Nikolay Sidelnikov
> > > >         Assigned To: Nathan Beyer
> > > >         Attachments: p5_fixed_commented.patch
> > > >
> > > >
> > > > Jitrino generates code with SSE and SSE2 instructions which can not
> be
> > > executed on processors older than Pentium 4.
> > >
> > > --
> > > This message is automatically generated by JIRA.
> > > -
> > > You can reply to this email to add a comment to the issue online.
> > >
> >
> >
> >
> > --
> > Mikhail Fursov
> >
>

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Alexey Varlamov <al...@gmail.com>.
2007/4/18, Mikhail Fursov <mi...@gmail.com>:
> Nathan,
> I checked the patch and it looks OK except a one issue.
>
> I do not really like that we have new p5.emconf in codebase and propose the
> following improvement:
> 1) add p5 pass to all Jitrino.OPT codegen aliases in every emconf we have.
> (I can update the patch if agreed)
I suppose you meant all ia32 configs :). This is neccesary step to
CPUID autodetection, so it a must actually.

>
> 2) a. After the commit: Make it turned off by default and use additional
> cmd-line -XX:jit.arg.codegen.p5=on when run on PC without SSE2
>    b. Start discussion: Use CPUID to detect if SSE2 is available and make
> JIT turn this pass on automatically if needed.
>
> We can implement CPUID check for SSE2 in JIT only (a couple of lines of
> assembly for Linux and Windows)
> The question is: would it be better if VM provides such service for every
> client? E.g. cpuid_is_sse2_supported()-like methods.
I'm in serious doubt that it is needed. Too IA-centric, it would have
little sense in general case. So doing it right in Jit is the right
thing IMO.

>
>
> On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
> >
> > Would anyone else like to review this patch? It's somewhat
> > significant. I've tested it on a P4/WinXP and DRLVM works without any
> > noticeable regressions. I've done some initial tests on a Quad
> > P3/Ubuntu and I can now run a simple Hello World with the default JIT,
> > which is a huge step.
> >
> > If no one has any issues, I'm going to commit this patch.
> >
> > -Nathan
> >
> > ---------- Forwarded message ----------
> > From: Nathan Beyer (JIRA) <ji...@apache.org>
> > Date: Apr 18, 2007 12:49 AM
> > Subject: [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted
> > code can not be executed on non-SSE2 platforms
> > To: commits@harmony.apache.org
> >
> >
> >
> >     [
> > https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614
> > ]
> >
> > Nathan Beyer commented on HARMONY-3246:
> > ---------------------------------------
> >
> > I've test this on a Linux P3 and it seems to work. I'm now able to run
> > a simple hello world. Additionally, everything seems to work as it did
> > on a P4/WinXP.
> >
> > Let's see if we can get a few more people to review the code.
> >
> > > [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms
> > > -----------------------------------------------------------------------
> > >
> > >                 Key: HARMONY-3246
> > >                 URL: https://issues.apache.org/jira/browse/HARMONY-3246
> > >             Project: Harmony
> > >          Issue Type: Improvement
> > >          Components: DRLVM
> > >            Reporter: Nikolay Sidelnikov
> > >         Assigned To: Nathan Beyer
> > >         Attachments: p5_fixed_commented.patch
> > >
> > >
> > > Jitrino generates code with SSE and SSE2 instructions which can not be
> > executed on processors older than Pentium 4.
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
>
>
>
> --
> Mikhail Fursov
>

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Mikhail Fursov <mi...@gmail.com>.
Nathan,
Instead of working on intermediate 2.a item we discussed 2.b
"b. Start discussion: Use CPUID to detect if SSE2 is available and make JIT
turn this pass on automatically if needed. "
I'm preparing e a patch to make EM/JIT ready to work on old hardware without
any additional options specified.

Bad news is that with the patch applied only OPT compiler will be ready to
work with x87 instructions. The unavailability of JET won't affect
performance but will hit client applications startup time.

On 4/19/07, Nathan Beyer <nd...@apache.org> wrote:
>
> On 4/18/07, Rana Dasgupta <rd...@gmail.com> wrote:
> > On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
> > >
> > > No, no no! We need to be able to run on a non-SSE2 CPU without special
> > > command-line properties.
> > >
> >
> > That is what I heard Mikhail say...add a p5 pass to every jit
> > configuration  ( default off ) and switch it on automatically only if
> > the jit detects a non SSE2 cpu. No additional command line properties
> > needed.
> >
>
> Then what does this mean?
>
> > 2) a. After the commit: Make it turned off by default and use
> > additional cmd-line -XX:jit.arg.codegen.p5=on when run on PC without
> SSE2
>
> Did I read that wrong?
>
> I feel like you guys are speaking in a different language here. Maybe
> I'm just behind on a few things, but I got lost in all of the EM, OPT,
> JET, conf, k5, p5 references. Is there lexicon reference somewhere, so
> I can match this stuff up to the DRLVM documentation on the web site?
> Is the web site the most up-to-date reference for this [1]?
>
> -Nathan
>
> [1] http://harmony.apache.org/subcomponents/drlvm/
>



-- 
Mikhail Fursov

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Mikhail Fursov <mi...@gmail.com>.
Yes this was the easiest way to add i586 support: lower P4 instructions in a
separate pass.

On 4/20/07, Nathan Beyer <nd...@apache.org> wrote:
>
> So the Jitrino isn't generating i586 (Pentium) instructions directly,
> it's generating P4 instructions and the optimizer is translating them
> down? Is that the design?
>
> On 4/19/07, Mikhail Fursov <mi...@gmail.com> wrote:
> > On 4/19/07, Pavel Ozhdikhin <pa...@gmail.com> wrote:
> > >
> > > p5 - optimization pass for Jitrino.OPT JIT compiler which substitutes
> SSE
> > > instructions with non-SSE (introduced in HARMONY-3246)
> > > k5 - I think Mikhail meant p5 here. :)
> > >
> > > Yes I was confused by its name. Can we rename it sse2tox87 ? It what
> it
> > really does.
> >
> > --
> > Mikhail Fursov
> >
>



-- 
Mikhail Fursov

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Nathan Beyer <nd...@apache.org>.
So the Jitrino isn't generating i586 (Pentium) instructions directly,
it's generating P4 instructions and the optimizer is translating them
down? Is that the design?

On 4/19/07, Mikhail Fursov <mi...@gmail.com> wrote:
> On 4/19/07, Pavel Ozhdikhin <pa...@gmail.com> wrote:
> >
> > p5 - optimization pass for Jitrino.OPT JIT compiler which substitutes SSE
> > instructions with non-SSE (introduced in HARMONY-3246)
> > k5 - I think Mikhail meant p5 here. :)
> >
> > Yes I was confused by its name. Can we rename it sse2tox87 ? It what it
> really does.
>
> --
> Mikhail Fursov
>

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Mikhail Fursov <mi...@gmail.com>.
On 4/19/07, Pavel Ozhdikhin <pa...@gmail.com> wrote:
>
> p5 - optimization pass for Jitrino.OPT JIT compiler which substitutes SSE
> instructions with non-SSE (introduced in HARMONY-3246)
> k5 - I think Mikhail meant p5 here. :)
>
> Yes I was confused by its name. Can we rename it sse2tox87 ? It what it
really does.

-- 
Mikhail Fursov

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Nathan Beyer <nd...@apache.org>.
Thanks, that helps a lot.

On 4/18/07, Pavel Ozhdikhin <pa...@gmail.com> wrote:
> On 4/19/07, Nathan Beyer <nd...@apache.org> wrote:
> >
> > On 4/18/07, Rana Dasgupta <rd...@gmail.com> wrote:
> > > On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
> > > >
> > > > No, no no! We need to be able to run on a non-SSE2 CPU without special
> > > > command-line properties.
> > > >
> > >
> > > That is what I heard Mikhail say...add a p5 pass to every jit
> > > configuration  ( default off ) and switch it on automatically only if
> > > the jit detects a non SSE2 cpu. No additional command line properties
> > > needed.
> > >
> >
> > Then what does this mean?
> >
> > > 2) a. After the commit: Make it turned off by default and use
> > > additional cmd-line -XX:jit.arg.codegen.p5=on when run on PC without
> > SSE2
> >
> > Did I read that wrong?
> >
> > I feel like you guys are speaking in a different language here. Maybe
> > I'm just behind on a few things, but I got lost in all of the EM, OPT,
> > JET, conf, k5, p5 references. Is there lexicon reference somewhere, so
> > I can match this stuff up to the DRLVM documentation on the web site?
> > Is the web site the most up-to-date reference for this [1]?
> >
> > -Nathan
> >
> > [1] http://harmony.apache.org/subcomponents/drlvm/
> >
>
> Nathan,
>
> The doc reference you mentioned will give you most of the details. I'll try
> to interpret some of the terms:
> EM - Execution Manager, the component which chooses right JIT configuration
> at VM startup
> OPT - Jitrino.OPT optimizing JIT compiler
> JET - Jitrino.JET baseline JIT compiler
> conf - config file for JIT configurations. There are several such config
> files in bin/default directory. EM chooses one at VM startup.
> client.emconfis the default,
> server.emconf is agressive optimizing config for server apps, jet.emconf -
> uses Jitrino.JET only, opt.emconf - uses Jitrino.OPT only.
> p5 - optimization pass for Jitrino.OPT JIT compiler which substitutes SSE
> instructions with non-SSE (introduced in HARMONY-3246)
> k5 - I think Mikhail meant p5 here. :)
>
> thanks,
> Pavel
>

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Pavel Ozhdikhin <pa...@gmail.com>.
On 4/19/07, Nathan Beyer <nd...@apache.org> wrote:
>
> On 4/18/07, Rana Dasgupta <rd...@gmail.com> wrote:
> > On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
> > >
> > > No, no no! We need to be able to run on a non-SSE2 CPU without special
> > > command-line properties.
> > >
> >
> > That is what I heard Mikhail say...add a p5 pass to every jit
> > configuration  ( default off ) and switch it on automatically only if
> > the jit detects a non SSE2 cpu. No additional command line properties
> > needed.
> >
>
> Then what does this mean?
>
> > 2) a. After the commit: Make it turned off by default and use
> > additional cmd-line -XX:jit.arg.codegen.p5=on when run on PC without
> SSE2
>
> Did I read that wrong?
>
> I feel like you guys are speaking in a different language here. Maybe
> I'm just behind on a few things, but I got lost in all of the EM, OPT,
> JET, conf, k5, p5 references. Is there lexicon reference somewhere, so
> I can match this stuff up to the DRLVM documentation on the web site?
> Is the web site the most up-to-date reference for this [1]?
>
> -Nathan
>
> [1] http://harmony.apache.org/subcomponents/drlvm/
>

Nathan,

The doc reference you mentioned will give you most of the details. I'll try
to interpret some of the terms:
EM - Execution Manager, the component which chooses right JIT configuration
at VM startup
OPT - Jitrino.OPT optimizing JIT compiler
JET - Jitrino.JET baseline JIT compiler
conf - config file for JIT configurations. There are several such config
files in bin/default directory. EM chooses one at VM startup.
client.emconfis the default,
server.emconf is agressive optimizing config for server apps, jet.emconf -
uses Jitrino.JET only, opt.emconf - uses Jitrino.OPT only.
p5 - optimization pass for Jitrino.OPT JIT compiler which substitutes SSE
instructions with non-SSE (introduced in HARMONY-3246)
k5 - I think Mikhail meant p5 here. :)

thanks,
Pavel

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Nathan Beyer <nd...@apache.org>.
On 4/18/07, Rana Dasgupta <rd...@gmail.com> wrote:
> On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
> >
> > No, no no! We need to be able to run on a non-SSE2 CPU without special
> > command-line properties.
> >
>
> That is what I heard Mikhail say...add a p5 pass to every jit
> configuration  ( default off ) and switch it on automatically only if
> the jit detects a non SSE2 cpu. No additional command line properties
> needed.
>

Then what does this mean?

> 2) a. After the commit: Make it turned off by default and use
> additional cmd-line -XX:jit.arg.codegen.p5=on when run on PC without SSE2

Did I read that wrong?

I feel like you guys are speaking in a different language here. Maybe
I'm just behind on a few things, but I got lost in all of the EM, OPT,
JET, conf, k5, p5 references. Is there lexicon reference somewhere, so
I can match this stuff up to the DRLVM documentation on the web site?
Is the web site the most up-to-date reference for this [1]?

-Nathan

[1] http://harmony.apache.org/subcomponents/drlvm/

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Rana Dasgupta <rd...@gmail.com>.
On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
>
> No, no no! We need to be able to run on a non-SSE2 CPU without special
> command-line properties.
>

That is what I heard Mikhail say...add a p5 pass to every jit
configuration  ( default off ) and switch it on automatically only if
the jit detects a non SSE2 cpu. No additional command line properties
needed.

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Nathan Beyer <nd...@apache.org>.
On 4/18/07, Mikhail Fursov <mi...@gmail.com> wrote:
> Nathan,
> I checked the patch and it looks OK except a one issue.
>
> I do not really like that we have new p5.emconf in codebase and propose the
> following improvement:
> 1) add p5 pass to all Jitrino.OPT codegen aliases in every emconf we have.
> (I can update the patch if agreed)
>
> 2) a. After the commit: Make it turned off by default and use additional
> cmd-line -XX:jit.arg.codegen.p5=on when run on PC without SSE2
>     b. Start discussion: Use CPUID to detect if SSE2 is available and make
> JIT turn this pass on automatically if needed.

No, no no! We need to be able to run on a non-SSE2 CPU without special
command-line properties.

>
> We can implement CPUID check for SSE2 in JIT only (a couple of lines of
> assembly for Linux and Windows)
> The question is: would it be better if VM provides such service for every
> client? E.g. cpuid_is_sse2_supported()-like methods.
>
>
> On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
> >
> > Would anyone else like to review this patch? It's somewhat
> > significant. I've tested it on a P4/WinXP and DRLVM works without any
> > noticeable regressions. I've done some initial tests on a Quad
> > P3/Ubuntu and I can now run a simple Hello World with the default JIT,
> > which is a huge step.
> >
> > If no one has any issues, I'm going to commit this patch.
> >
> > -Nathan
> >
> > ---------- Forwarded message ----------
> > From: Nathan Beyer (JIRA) <ji...@apache.org>
> > Date: Apr 18, 2007 12:49 AM
> > Subject: [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted
> > code can not be executed on non-SSE2 platforms
> > To: commits@harmony.apache.org
> >
> >
> >
> >     [
> > https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614
> > ]
> >
> > Nathan Beyer commented on HARMONY-3246:
> > ---------------------------------------
> >
> > I've test this on a Linux P3 and it seems to work. I'm now able to run
> > a simple hello world. Additionally, everything seems to work as it did
> > on a P4/WinXP.
> >
> > Let's see if we can get a few more people to review the code.
> >
> > > [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms
> > > -----------------------------------------------------------------------
> > >
> > >                 Key: HARMONY-3246
> > >                 URL: https://issues.apache.org/jira/browse/HARMONY-3246
> > >             Project: Harmony
> > >          Issue Type: Improvement
> > >          Components: DRLVM
> > >            Reporter: Nikolay Sidelnikov
> > >         Assigned To: Nathan Beyer
> > >         Attachments: p5_fixed_commented.patch
> > >
> > >
> > > Jitrino generates code with SSE and SSE2 instructions which can not be
> > executed on processors older than Pentium 4.
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
>
>
>
> --
> Mikhail Fursov
>

Re: [drlvm][jit] Code review of the following issue - [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms

Posted by Mikhail Fursov <mi...@gmail.com>.
Nathan,
I checked the patch and it looks OK except a one issue.

I do not really like that we have new p5.emconf in codebase and propose the
following improvement:
1) add p5 pass to all Jitrino.OPT codegen aliases in every emconf we have.
(I can update the patch if agreed)

2) a. After the commit: Make it turned off by default and use additional
cmd-line -XX:jit.arg.codegen.p5=on when run on PC without SSE2
    b. Start discussion: Use CPUID to detect if SSE2 is available and make
JIT turn this pass on automatically if needed.

We can implement CPUID check for SSE2 in JIT only (a couple of lines of
assembly for Linux and Windows)
The question is: would it be better if VM provides such service for every
client? E.g. cpuid_is_sse2_supported()-like methods.


On 4/18/07, Nathan Beyer <nd...@apache.org> wrote:
>
> Would anyone else like to review this patch? It's somewhat
> significant. I've tested it on a P4/WinXP and DRLVM works without any
> noticeable regressions. I've done some initial tests on a Quad
> P3/Ubuntu and I can now run a simple Hello World with the default JIT,
> which is a huge step.
>
> If no one has any issues, I'm going to commit this patch.
>
> -Nathan
>
> ---------- Forwarded message ----------
> From: Nathan Beyer (JIRA) <ji...@apache.org>
> Date: Apr 18, 2007 12:49 AM
> Subject: [jira] Commented: (HARMONY-3246) [drlvm][jit][opt] Jitted
> code can not be executed on non-SSE2 platforms
> To: commits@harmony.apache.org
>
>
>
>     [
> https://issues.apache.org/jira/browse/HARMONY-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489614
> ]
>
> Nathan Beyer commented on HARMONY-3246:
> ---------------------------------------
>
> I've test this on a Linux P3 and it seems to work. I'm now able to run
> a simple hello world. Additionally, everything seems to work as it did
> on a P4/WinXP.
>
> Let's see if we can get a few more people to review the code.
>
> > [drlvm][jit][opt] Jitted code can not be executed on non-SSE2 platforms
> > -----------------------------------------------------------------------
> >
> >                 Key: HARMONY-3246
> >                 URL: https://issues.apache.org/jira/browse/HARMONY-3246
> >             Project: Harmony
> >          Issue Type: Improvement
> >          Components: DRLVM
> >            Reporter: Nikolay Sidelnikov
> >         Assigned To: Nathan Beyer
> >         Attachments: p5_fixed_commented.patch
> >
> >
> > Jitrino generates code with SSE and SSE2 instructions which can not be
> executed on processors older than Pentium 4.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>



-- 
Mikhail Fursov