harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Fursov" <mike.fur...@gmail.com>
Subject 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
Date Fri, 20 Apr 2007 05:36:48 GMT
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 <ndbeyer@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 <mike.fursov@gmail.com> wrote:
> > And one more question: did these JVMTI tests passed with original patch?
> >
> > On 4/20/07, Mikhail Fursov <mike.fursov@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 <ndbeyer@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 <mike.fursov@gmail.com> wrote:
> > > > > Check new patch, please.
> > > > >
> > > > > On 4/19/07, Nathan Beyer <ndbeyer@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 <xiaofeng.li@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 <mike.fursov@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)
<jira@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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message