You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Gregory Shimansky <gs...@gmail.com> on 2007/04/04 19:14:18 UTC

Re: [drlvm] tests failing on Win2000 PIII

On Friday 02 March 2007 21:56 Geir Magnusson Jr. wrote:
> I thought it used to work.  Also, I thought that someone had shown
> that Win2k was still widely deployed.  maybe that's win2k+3?  (I can
> never keep the windows platform family straight anymore...)

Resurrecting this old thread about w2k, Nathan, what happens if you just 
comment out the line with AddVectoredExceptionHandler? In this case you'll 
lose a handler registration, so you will not have hardware NPEs (I am not 
sure about the JIT status for ia32, are hardware NPEs enabled for this 
architecture?), you won't have JVMTI breakpoints in JIT mode, so debugging 
won't work. But the rest of VM should work on w2k with the exception of the 
code which uses P4 specific instructions.

If this helps to at least start running the VM, I think it could be possible 
to move from vectored exceptions to older structured ones on w2k and make it 
a supported platform.

If you get illegal instruction like mfence on w2k as well, probably the 
modifications which Evgueni Brevnov is going to offer for P3 backport on 
Linux could help you running at least something...

I am asking because I don't have either w2k or P3 processor, so all I can do 
to help right now is give some suggestions.

> geir
>
> On Feb 26, 2007, at 8:31 PM, Nathan Beyer wrote:
> > Thanks for details.
> >
> > So I guess I'll ask the question again, is there a desire for Win2K
> > support? I'm not sure I really have an opinion one way or the other.
> > In relation to the previous discussion, I do think we should maintain
> > a single code base, so I guess this means either coding to the
> > lowest-common spec, some sort of test-and-branch or C macros (?).
> >
> > I do think it would be helpful to spit out a "OS not supported" error
> > condition in these cases.
> >
> > -Nathan
> >
> > On 2/26/07, Alex Astapchuk <al...@gmail.com> wrote:
> >> Btw, the w2k issue has been raised before. Start of the tread is
> >> here:
> >>
> >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> >> 3c44D36A45.802@pobox.com%3e
> >>
> >> then it turns into 'platform support':
> >>
> >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> >> 3c44D9A4C7.1010607@gmail.com%3e
> >>
> >> and HARMONY-1145 was filed against the issue.
> >>
> >> --
> >> Thanks,
> >>    Alex
> >>
> >> Alex Astapchuk wrote:
> >> > Hi Nathan,
> >> >
> >> >  > Failed to open JVM DLL:
> >> >
> >> > C:\bt-trunk\cc\projects\drlvm\trunk\build\win_ia32_msvc_debug
> >>
> >> \deploy\jdk\jre\bin\default\harmonyvm
> >>
> >> > DRLVM can not be run on Win2000: it uses 'vectored exception
> >> > handler' [1] (instead of old-fashion structured exception handler),
> >> > and this feature requires at least WinXP/Win2k3 [2].
> >> >
> >> > There may be more XP-specific functions I'm not aware about, but
> >> > at least this one will make the loading fail because the loader
> >> > can not find AddVectoredExceptionHandler export in kernel32.dll.
> >> >
> >> > [1] vm\vmcore\src\util\win\nt_platform_utils.cpp
> >> >      grep for AddVectoredExceptionHandler around the line 63.
> >> >
> >> > [2] http://msdn2.microsoft.com/en-us/library/ms679274.aspx
> >> >
> >> > Requirements
> >> > Client Requires Windows Vista or Windows XP.
> >> > Server Requires Windows Server "Longhorn" or Windows Server 2003.
> >> > Header Declared in Winbase.h; include Windows.h.
> >> > Library Use Kernel32.lib.
> >> > DLL Requires Kernel32.dll.

-- 
Gregory

Re: [drlvm] tests failing on Win2000 PIII

Posted by Mikhail Fursov <mi...@gmail.com>.
Jitrino uses hardware NPE on 32-bit platform. It's easy to disable it, but
there is no such cmd-line option available today.
So, before using Jitrino its better to  test VM with interpreter.

-- 
Mikhail Fursov

Re: [drlvm] tests failing on Win2000 PIII

Posted by Gregory Shimansky <gs...@gmail.com>.
On Wednesday 04 April 2007 21:51 Rana Dasgupta wrote:
> On 4/4/07, Gregory Shimansky <gs...@gmail.com> wrote:
> > On Friday 02 March 2007 21:56 Geir Magnusson Jr. wrote:
> > > I thought it used to work.  Also, I thought that someone had shown
> > > that Win2k was still widely deployed.  maybe that's win2k+3?  (I can
> > > never keep the windows platform family straight anymore...)
> >
> > Resurrecting this old thread about w2k, Nathan, what happens if you just
> > comment out the line with AddVectoredExceptionHandler? In this case
> > you'll lose a handler registration, so you will not have hardware NPEs (I
> > am not sure about the JIT status for ia32, are hardware NPEs enabled for
> > this architecture?),
>
> Also SOE, unless the implementation has changed...?

Yes of course. I was thinking about simple applications which don't normally 
cause SOE.

> >you won't have JVMTI breakpoints in JIT mode, so debugging
> > won't work. But the rest of VM should work on w2k with the exception of
> > the code which uses P4 specific instructions.
> >
> > If this helps to at least start running the VM, I think it could be
> > possible to move from vectored exceptions to older structured ones on w2k
> > and make it a supported platform.
> >
> > If you get illegal instruction like mfence on w2k as well, probably the
> > modifications which Evgueni Brevnov is going to offer for P3 backport on
> > Linux could help you running at least something...
> >
> > I am asking because I don't have either w2k or P3 processor, so all I can
> > do to help right now is give some suggestions.
> >
> > Gregory

-- 
Gregory

Re: [drlvm] tests failing on Win2000 PIII

Posted by Rana Dasgupta <rd...@gmail.com>.
On 4/4/07, Gregory Shimansky <gs...@gmail.com> wrote:
> On Friday 02 March 2007 21:56 Geir Magnusson Jr. wrote:
> > I thought it used to work.  Also, I thought that someone had shown
> > that Win2k was still widely deployed.  maybe that's win2k+3?  (I can
> > never keep the windows platform family straight anymore...)
>
> Resurrecting this old thread about w2k, Nathan, what happens if you just
> comment out the line with AddVectoredExceptionHandler? In this case you'll
> lose a handler registration, so you will not have hardware NPEs (I am not
> sure about the JIT status for ia32, are hardware NPEs enabled for this
> architecture?),

Also SOE, unless the implementation has changed...?

>you won't have JVMTI breakpoints in JIT mode, so debugging
> won't work. But the rest of VM should work on w2k with the exception of the
> code which uses P4 specific instructions.
>
> If this helps to at least start running the VM, I think it could be possible
> to move from vectored exceptions to older structured ones on w2k and make it
> a supported platform.
>
> If you get illegal instruction like mfence on w2k as well, probably the
> modifications which Evgueni Brevnov is going to offer for P3 backport on
> Linux could help you running at least something...
>
> I am asking because I don't have either w2k or P3 processor, so all I can do
> to help right now is give some suggestions.
>
> Gregory
>

Re: [drlvm] tests failing on Win2000 PIII

Posted by Nathan Beyer <nd...@apache.org>.
On 4/5/07, Rana Dasgupta <rd...@gmail.com> wrote:
> On 4/5/07, Ilya Berezhniuk <il...@gmail.com> wrote:
> > I think it's not enough to wrap JNI functions with SEH, we should wrap every
> > newly created thread with SEH, for example in thread_start_proc() function.
> > I'm not sure that all features provided by VEH are provided by SEH, but I'll
> > try this approach soon.
> >
>
> Yes, I have some unknowns about this too. VEH is more functional than
> SEH and this may end up being a non trivial port. I am  much more keen
> about supporting PIII  than about W2K which is now a really old OS.
>
> > AFAIK, a method to serialize load/store operations should be used in any
> > multiprocessor/multicore/hyperthreading system, especially with separate
> > cache (like in multiprocessor system). So for multiprocessor P3 machines we
> > should find a way to serialize without mfence.
> >
>
> I think the bus snooping semantics take care of preserving the strong
> ordered model with muti procs as well, at least on genuine Intel, but
> experiments will tell and I am not sure about Intel compatibles etc.

This is the impression I have as well. I found this article about
locking in the HotSpot VM [1] and this comment stuck out to me.

"Lock:cmpxchg is serializing, providing bidirectional
mfence-equivalent semantics. (Fence or barrier instructions are never
needed for uniprocessors) This fact might also have contributed to the
myth that CAS is more expensive on MP systems."

-Nathan

[1] http://blogs.sun.com/dave/entry/biased_locking_in_hotspot

>
> > --
> > Ilya
> >
> >
> > 2007/4/5, Alexey Varlamov <al...@gmail.com>:
> > >
> > > 2007/4/5, Nathan Beyer <nd...@apache.org>:
> > > > Commenting out the AddVectoredExceptionHandler helped a bit. Here's
> > > > what else (diff below) I had to remove from DRLVM to get "java
> > > > -version" to work. I still can't get a simple HelloWorld class to run,
> > > > even with just the interpreter. I wouldn't be surprised that my little
> > > > hack isn't completely correct.
> > >
> > > Nathan, I guess those you needed to remove are for _compiling_ on w2k,
> > > not for simple running pre-build binaries?
> > > At least for the stack_dump.cpp changes, referenced dbghelp.dll is
> > > freely(?) redistributable and you can try run DRLVM with this dll
> > > downloaded or taken from WinXP. If it works, we may need to update
> > > build scripts to include this dll to snapshots as we do with
> > > msvcr71.dll.
> > >
> > > >
> > > > Index: port/src/vmem/win/port_vmem.c
> > > > ===================================================================
> > > > --- port/src/vmem/win/port_vmem.c       (revision 525583)
> > > > +++ port/src/vmem/win/port_vmem.c       (working copy)
> > > > @@ -236,12 +236,12 @@
> > > >  }
> > > >
> > > >  APR_DECLARE(size_t) port_vmem_max_size(){
> > > > -    PERFORMANCE_INFORMATION pi;
> > > > -    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
> > > > -        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
> > > > port_vmem_committed_size();
> > > > -    } else {
> > > > +//    PERFORMANCE_INFORMATION pi;
> > > > +//    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
> > > > +//        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
> > > > port_vmem_committed_size();
> > > > +//    } else {
> > > >         return (size_t)0;
> > > > -    }
> > > > +//    }
> > > >  }
> > > >
> > > >  #ifdef __cplusplus
> > > > Index: vmcore/src/stack/stack_dump.cpp
> > > > ===================================================================
> > > > --- vmcore/src/stack/stack_dump.cpp     (revision 525583)
> > > > +++ vmcore/src/stack/stack_dump.cpp     (working copy)
> > > > @@ -85,11 +85,11 @@
> > > >     PSYMBOL_INFO pSymb = (PSYMBOL_INFO)smBuf;
> > > >     pSymb->SizeOfStruct = sizeof(smBuf);
> > > >     pSymb->MaxNameLen = 2048;
> > > > -    DWORD64 funcDispl;
> > > > -    if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl,
> > > pSymb)) {
> > > > -        info->method_name = (char*) STD_MALLOC(strlen(pSymb->Name) +
> > > 1);
> > > > -        strcpy(info->method_name, pSymb->Name);
> > > > -    }
> > > > +    //DWORD64 funcDispl;
> > > > +    //if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl,
> > > pSymb)) {
> > > > +    //    info->method_name = (char*) STD_MALLOC(strlen(pSymb->Name) +
> > > 1);
> > > > +    //    strcpy(info->method_name, pSymb->Name);
> > > > +    //}
> > > >     DWORD lineOffset;
> > > >     IMAGEHLP_LINE lineInfo;
> > > >     if (SymGetLineFromAddr(GetCurrentProcess(), (DWORD)ip,
> > > > &lineOffset, &lineInfo)) {
> > > > Index: vmcore/src/util/win/nt_platform_utils.cpp
> > > > ===================================================================
> > > > --- vmcore/src/util/win/nt_platform_utils.cpp   (revision 525583)
> > > > +++ vmcore/src/util/win/nt_platform_utils.cpp   (working copy)
> > > > @@ -60,16 +60,16 @@
> > > >     assert(ok);
> > > >
> > > >     // add VEH to catch NPE's from bytecode
> > > > -    TRACE2("signals", "Adding vectored exception handler...");
> > > > -    veh = AddVectoredExceptionHandler(0, vectored_exception_handler);
> > > > -    assert(veh);
> > > > +    // TRACE2("signals", "Adding vectored exception handler...");
> > > > +    // veh = AddVectoredExceptionHandler(0,
> > > vectored_exception_handler);
> > > > +    // assert(veh);
> > > >  }
> > > >
> > > >  void shutdown_signals() {
> > > > -    TRACE2("signals", "Removing vectored exception handler...");
> > > > -    ULONG res;
> > > > -    res = RemoveVectoredExceptionHandler(veh);
> > > > -    assert(res);
> > > > +    // TRACE2("signals", "Removing vectored exception handler...");
> > > > +    // ULONG res;
> > > > +    // res = RemoveVectoredExceptionHandler(veh);
> > > > +    // assert(res);
> > > >  } //shutdown_signals
> > > >
> > > >  //The following is for socket error handling
> > > >
> > > >
> > > > -Nathan
> > > >
> > > > On 4/4/07, Gregory Shimansky <gs...@gmail.com> wrote:
> > > > > On Friday 02 March 2007 21:56 Geir Magnusson Jr. wrote:
> > > > > > I thought it used to work.  Also, I thought that someone had shown
> > > > > > that Win2k was still widely deployed.  maybe that's win2k+3?  (I can
> > > > > > never keep the windows platform family straight anymore...)
> > > > >
> > > > > Resurrecting this old thread about w2k, Nathan, what happens if you
> > > just
> > > > > comment out the line with AddVectoredExceptionHandler? In this case
> > > you'll
> > > > > lose a handler registration, so you will not have hardware NPEs (I am
> > > not
> > > > > sure about the JIT status for ia32, are hardware NPEs enabled for this
> > > > > architecture?), you won't have JVMTI breakpoints in JIT mode, so
> > > debugging
> > > > > won't work. But the rest of VM should work on w2k with the exception
> > > of the
> > > > > code which uses P4 specific instructions.
> > > > >
> > > > > If this helps to at least start running the VM, I think it could be
> > > possible
> > > > > to move from vectored exceptions to older structured ones on w2k and
> > > make it
> > > > > a supported platform.
> > > > >
> > > > > If you get illegal instruction like mfence on w2k as well, probably
> > > the
> > > > > modifications which Evgueni Brevnov is going to offer for P3 backport
> > > on
> > > > > Linux could help you running at least something...
> > > > >
> > > > > I am asking because I don't have either w2k or P3 processor, so all I
> > > can do
> > > > > to help right now is give some suggestions.
> > > > >
> > > > > > geir
> > > > > >
> > > > > > On Feb 26, 2007, at 8:31 PM, Nathan Beyer wrote:
> > > > > > > Thanks for details.
> > > > > > >
> > > > > > > So I guess I'll ask the question again, is there a desire for
> > > Win2K
> > > > > > > support? I'm not sure I really have an opinion one way or the
> > > other.
> > > > > > > In relation to the previous discussion, I do think we should
> > > maintain
> > > > > > > a single code base, so I guess this means either coding to the
> > > > > > > lowest-common spec, some sort of test-and-branch or C macros (?).
> > > > > > >
> > > > > > > I do think it would be helpful to spit out a "OS not supported"
> > > error
> > > > > > > condition in these cases.
> > > > > > >
> > > > > > > -Nathan
> > > > > > >
> > > > > > > On 2/26/07, Alex Astapchuk <al...@gmail.com> wrote:
> > > > > > >> Btw, the w2k issue has been raised before. Start of the tread is
> > > > > > >> here:
> > > > > > >>
> > > > > > >>
> > > http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > > > > > >> 3c44D36A45.802@pobox.com%3e
> > > > > > >>
> > > > > > >> then it turns into 'platform support':
> > > > > > >>
> > > > > > >>
> > > http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > > > > > >> 3c44D9A4C7.1010607@gmail.com%3e
> > > > > > >>
> > > > > > >> and HARMONY-1145 was filed against the issue.
> > > > > > >>
> > > > > > >> --
> > > > > > >> Thanks,
> > > > > > >>    Alex
> > > > > > >>
> > > > > > >> Alex Astapchuk wrote:
> > > > > > >> > Hi Nathan,
> > > > > > >> >
> > > > > > >> >  > Failed to open JVM DLL:
> > > > > > >> >
> > > > > > >> > C:\bt-trunk\cc\projects\drlvm\trunk\build\win_ia32_msvc_debug
> > > > > > >>
> > > > > > >> \deploy\jdk\jre\bin\default\harmonyvm
> > > > > > >>
> > > > > > >> > DRLVM can not be run on Win2000: it uses 'vectored exception
> > > > > > >> > handler' [1] (instead of old-fashion structured exception
> > > handler),
> > > > > > >> > and this feature requires at least WinXP/Win2k3 [2].
> > > > > > >> >
> > > > > > >> > There may be more XP-specific functions I'm not aware about,
> > > but
> > > > > > >> > at least this one will make the loading fail because the loader
> > > > > > >> > can not find AddVectoredExceptionHandler export in kernel32.dll
> > > .
> > > > > > >> >
> > > > > > >> > [1] vm\vmcore\src\util\win\nt_platform_utils.cpp
> > > > > > >> >      grep for AddVectoredExceptionHandler around the line 63.
> > > > > > >> >
> > > > > > >> > [2] http://msdn2.microsoft.com/en-us/library/ms679274.aspx
> > > > > > >> >
> > > > > > >> > Requirements
> > > > > > >> > Client Requires Windows Vista or Windows XP.
> > > > > > >> > Server Requires Windows Server "Longhorn" or Windows Server
> > > 2003.
> > > > > > >> > Header Declared in Winbase.h; include Windows.h.
> > > > > > >> > Library Use Kernel32.lib.
> > > > > > >> > DLL Requires Kernel32.dll.
> > > > >
> > > > > --
> > > > > Gregory
> > > > >
> > > >
> > >
> >
>

Re: [drlvm] tests failing on Win2000 PIII

Posted by Rana Dasgupta <rd...@gmail.com>.
On 4/5/07, Ilya Berezhniuk <il...@gmail.com> wrote:
> I think it's not enough to wrap JNI functions with SEH, we should wrap every
> newly created thread with SEH, for example in thread_start_proc() function.
> I'm not sure that all features provided by VEH are provided by SEH, but I'll
> try this approach soon.
>

Yes, I have some unknowns about this too. VEH is more functional than
SEH and this may end up being a non trivial port. I am  much more keen
about supporting PIII  than about W2K which is now a really old OS.

> AFAIK, a method to serialize load/store operations should be used in any
> multiprocessor/multicore/hyperthreading system, especially with separate
> cache (like in multiprocessor system). So for multiprocessor P3 machines we
> should find a way to serialize without mfence.
>

I think the bus snooping semantics take care of preserving the strong
ordered model with muti procs as well, at least on genuine Intel, but
experiments will tell and I am not sure about Intel compatibles etc.

> --
> Ilya
>
>
> 2007/4/5, Alexey Varlamov <al...@gmail.com>:
> >
> > 2007/4/5, Nathan Beyer <nd...@apache.org>:
> > > Commenting out the AddVectoredExceptionHandler helped a bit. Here's
> > > what else (diff below) I had to remove from DRLVM to get "java
> > > -version" to work. I still can't get a simple HelloWorld class to run,
> > > even with just the interpreter. I wouldn't be surprised that my little
> > > hack isn't completely correct.
> >
> > Nathan, I guess those you needed to remove are for _compiling_ on w2k,
> > not for simple running pre-build binaries?
> > At least for the stack_dump.cpp changes, referenced dbghelp.dll is
> > freely(?) redistributable and you can try run DRLVM with this dll
> > downloaded or taken from WinXP. If it works, we may need to update
> > build scripts to include this dll to snapshots as we do with
> > msvcr71.dll.
> >
> > >
> > > Index: port/src/vmem/win/port_vmem.c
> > > ===================================================================
> > > --- port/src/vmem/win/port_vmem.c       (revision 525583)
> > > +++ port/src/vmem/win/port_vmem.c       (working copy)
> > > @@ -236,12 +236,12 @@
> > >  }
> > >
> > >  APR_DECLARE(size_t) port_vmem_max_size(){
> > > -    PERFORMANCE_INFORMATION pi;
> > > -    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
> > > -        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
> > > port_vmem_committed_size();
> > > -    } else {
> > > +//    PERFORMANCE_INFORMATION pi;
> > > +//    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
> > > +//        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
> > > port_vmem_committed_size();
> > > +//    } else {
> > >         return (size_t)0;
> > > -    }
> > > +//    }
> > >  }
> > >
> > >  #ifdef __cplusplus
> > > Index: vmcore/src/stack/stack_dump.cpp
> > > ===================================================================
> > > --- vmcore/src/stack/stack_dump.cpp     (revision 525583)
> > > +++ vmcore/src/stack/stack_dump.cpp     (working copy)
> > > @@ -85,11 +85,11 @@
> > >     PSYMBOL_INFO pSymb = (PSYMBOL_INFO)smBuf;
> > >     pSymb->SizeOfStruct = sizeof(smBuf);
> > >     pSymb->MaxNameLen = 2048;
> > > -    DWORD64 funcDispl;
> > > -    if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl,
> > pSymb)) {
> > > -        info->method_name = (char*) STD_MALLOC(strlen(pSymb->Name) +
> > 1);
> > > -        strcpy(info->method_name, pSymb->Name);
> > > -    }
> > > +    //DWORD64 funcDispl;
> > > +    //if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl,
> > pSymb)) {
> > > +    //    info->method_name = (char*) STD_MALLOC(strlen(pSymb->Name) +
> > 1);
> > > +    //    strcpy(info->method_name, pSymb->Name);
> > > +    //}
> > >     DWORD lineOffset;
> > >     IMAGEHLP_LINE lineInfo;
> > >     if (SymGetLineFromAddr(GetCurrentProcess(), (DWORD)ip,
> > > &lineOffset, &lineInfo)) {
> > > Index: vmcore/src/util/win/nt_platform_utils.cpp
> > > ===================================================================
> > > --- vmcore/src/util/win/nt_platform_utils.cpp   (revision 525583)
> > > +++ vmcore/src/util/win/nt_platform_utils.cpp   (working copy)
> > > @@ -60,16 +60,16 @@
> > >     assert(ok);
> > >
> > >     // add VEH to catch NPE's from bytecode
> > > -    TRACE2("signals", "Adding vectored exception handler...");
> > > -    veh = AddVectoredExceptionHandler(0, vectored_exception_handler);
> > > -    assert(veh);
> > > +    // TRACE2("signals", "Adding vectored exception handler...");
> > > +    // veh = AddVectoredExceptionHandler(0,
> > vectored_exception_handler);
> > > +    // assert(veh);
> > >  }
> > >
> > >  void shutdown_signals() {
> > > -    TRACE2("signals", "Removing vectored exception handler...");
> > > -    ULONG res;
> > > -    res = RemoveVectoredExceptionHandler(veh);
> > > -    assert(res);
> > > +    // TRACE2("signals", "Removing vectored exception handler...");
> > > +    // ULONG res;
> > > +    // res = RemoveVectoredExceptionHandler(veh);
> > > +    // assert(res);
> > >  } //shutdown_signals
> > >
> > >  //The following is for socket error handling
> > >
> > >
> > > -Nathan
> > >
> > > On 4/4/07, Gregory Shimansky <gs...@gmail.com> wrote:
> > > > On Friday 02 March 2007 21:56 Geir Magnusson Jr. wrote:
> > > > > I thought it used to work.  Also, I thought that someone had shown
> > > > > that Win2k was still widely deployed.  maybe that's win2k+3?  (I can
> > > > > never keep the windows platform family straight anymore...)
> > > >
> > > > Resurrecting this old thread about w2k, Nathan, what happens if you
> > just
> > > > comment out the line with AddVectoredExceptionHandler? In this case
> > you'll
> > > > lose a handler registration, so you will not have hardware NPEs (I am
> > not
> > > > sure about the JIT status for ia32, are hardware NPEs enabled for this
> > > > architecture?), you won't have JVMTI breakpoints in JIT mode, so
> > debugging
> > > > won't work. But the rest of VM should work on w2k with the exception
> > of the
> > > > code which uses P4 specific instructions.
> > > >
> > > > If this helps to at least start running the VM, I think it could be
> > possible
> > > > to move from vectored exceptions to older structured ones on w2k and
> > make it
> > > > a supported platform.
> > > >
> > > > If you get illegal instruction like mfence on w2k as well, probably
> > the
> > > > modifications which Evgueni Brevnov is going to offer for P3 backport
> > on
> > > > Linux could help you running at least something...
> > > >
> > > > I am asking because I don't have either w2k or P3 processor, so all I
> > can do
> > > > to help right now is give some suggestions.
> > > >
> > > > > geir
> > > > >
> > > > > On Feb 26, 2007, at 8:31 PM, Nathan Beyer wrote:
> > > > > > Thanks for details.
> > > > > >
> > > > > > So I guess I'll ask the question again, is there a desire for
> > Win2K
> > > > > > support? I'm not sure I really have an opinion one way or the
> > other.
> > > > > > In relation to the previous discussion, I do think we should
> > maintain
> > > > > > a single code base, so I guess this means either coding to the
> > > > > > lowest-common spec, some sort of test-and-branch or C macros (?).
> > > > > >
> > > > > > I do think it would be helpful to spit out a "OS not supported"
> > error
> > > > > > condition in these cases.
> > > > > >
> > > > > > -Nathan
> > > > > >
> > > > > > On 2/26/07, Alex Astapchuk <al...@gmail.com> wrote:
> > > > > >> Btw, the w2k issue has been raised before. Start of the tread is
> > > > > >> here:
> > > > > >>
> > > > > >>
> > http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > > > > >> 3c44D36A45.802@pobox.com%3e
> > > > > >>
> > > > > >> then it turns into 'platform support':
> > > > > >>
> > > > > >>
> > http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > > > > >> 3c44D9A4C7.1010607@gmail.com%3e
> > > > > >>
> > > > > >> and HARMONY-1145 was filed against the issue.
> > > > > >>
> > > > > >> --
> > > > > >> Thanks,
> > > > > >>    Alex
> > > > > >>
> > > > > >> Alex Astapchuk wrote:
> > > > > >> > Hi Nathan,
> > > > > >> >
> > > > > >> >  > Failed to open JVM DLL:
> > > > > >> >
> > > > > >> > C:\bt-trunk\cc\projects\drlvm\trunk\build\win_ia32_msvc_debug
> > > > > >>
> > > > > >> \deploy\jdk\jre\bin\default\harmonyvm
> > > > > >>
> > > > > >> > DRLVM can not be run on Win2000: it uses 'vectored exception
> > > > > >> > handler' [1] (instead of old-fashion structured exception
> > handler),
> > > > > >> > and this feature requires at least WinXP/Win2k3 [2].
> > > > > >> >
> > > > > >> > There may be more XP-specific functions I'm not aware about,
> > but
> > > > > >> > at least this one will make the loading fail because the loader
> > > > > >> > can not find AddVectoredExceptionHandler export in kernel32.dll
> > .
> > > > > >> >
> > > > > >> > [1] vm\vmcore\src\util\win\nt_platform_utils.cpp
> > > > > >> >      grep for AddVectoredExceptionHandler around the line 63.
> > > > > >> >
> > > > > >> > [2] http://msdn2.microsoft.com/en-us/library/ms679274.aspx
> > > > > >> >
> > > > > >> > Requirements
> > > > > >> > Client Requires Windows Vista or Windows XP.
> > > > > >> > Server Requires Windows Server "Longhorn" or Windows Server
> > 2003.
> > > > > >> > Header Declared in Winbase.h; include Windows.h.
> > > > > >> > Library Use Kernel32.lib.
> > > > > >> > DLL Requires Kernel32.dll.
> > > >
> > > > --
> > > > Gregory
> > > >
> > >
> >
>

Re: [drlvm] tests failing on Win2000 PIII

Posted by Ilya Berezhniuk <il...@gmail.com>.
I think it's not enough to wrap JNI functions with SEH, we should wrap every
newly created thread with SEH, for example in thread_start_proc() function.
I'm not sure that all features provided by VEH are provided by SEH, but I'll
try this approach soon.

AFAIK, a method to serialize load/store operations should be used in any
multiprocessor/multicore/hyperthreading system, especially with separate
cache (like in multiprocessor system). So for multiprocessor P3 machines we
should find a way to serialize without mfence.

-- 
Ilya


2007/4/5, Alexey Varlamov <al...@gmail.com>:
>
> 2007/4/5, Nathan Beyer <nd...@apache.org>:
> > Commenting out the AddVectoredExceptionHandler helped a bit. Here's
> > what else (diff below) I had to remove from DRLVM to get "java
> > -version" to work. I still can't get a simple HelloWorld class to run,
> > even with just the interpreter. I wouldn't be surprised that my little
> > hack isn't completely correct.
>
> Nathan, I guess those you needed to remove are for _compiling_ on w2k,
> not for simple running pre-build binaries?
> At least for the stack_dump.cpp changes, referenced dbghelp.dll is
> freely(?) redistributable and you can try run DRLVM with this dll
> downloaded or taken from WinXP. If it works, we may need to update
> build scripts to include this dll to snapshots as we do with
> msvcr71.dll.
>
> >
> > Index: port/src/vmem/win/port_vmem.c
> > ===================================================================
> > --- port/src/vmem/win/port_vmem.c       (revision 525583)
> > +++ port/src/vmem/win/port_vmem.c       (working copy)
> > @@ -236,12 +236,12 @@
> >  }
> >
> >  APR_DECLARE(size_t) port_vmem_max_size(){
> > -    PERFORMANCE_INFORMATION pi;
> > -    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
> > -        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
> > port_vmem_committed_size();
> > -    } else {
> > +//    PERFORMANCE_INFORMATION pi;
> > +//    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
> > +//        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
> > port_vmem_committed_size();
> > +//    } else {
> >         return (size_t)0;
> > -    }
> > +//    }
> >  }
> >
> >  #ifdef __cplusplus
> > Index: vmcore/src/stack/stack_dump.cpp
> > ===================================================================
> > --- vmcore/src/stack/stack_dump.cpp     (revision 525583)
> > +++ vmcore/src/stack/stack_dump.cpp     (working copy)
> > @@ -85,11 +85,11 @@
> >     PSYMBOL_INFO pSymb = (PSYMBOL_INFO)smBuf;
> >     pSymb->SizeOfStruct = sizeof(smBuf);
> >     pSymb->MaxNameLen = 2048;
> > -    DWORD64 funcDispl;
> > -    if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl,
> pSymb)) {
> > -        info->method_name = (char*) STD_MALLOC(strlen(pSymb->Name) +
> 1);
> > -        strcpy(info->method_name, pSymb->Name);
> > -    }
> > +    //DWORD64 funcDispl;
> > +    //if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl,
> pSymb)) {
> > +    //    info->method_name = (char*) STD_MALLOC(strlen(pSymb->Name) +
> 1);
> > +    //    strcpy(info->method_name, pSymb->Name);
> > +    //}
> >     DWORD lineOffset;
> >     IMAGEHLP_LINE lineInfo;
> >     if (SymGetLineFromAddr(GetCurrentProcess(), (DWORD)ip,
> > &lineOffset, &lineInfo)) {
> > Index: vmcore/src/util/win/nt_platform_utils.cpp
> > ===================================================================
> > --- vmcore/src/util/win/nt_platform_utils.cpp   (revision 525583)
> > +++ vmcore/src/util/win/nt_platform_utils.cpp   (working copy)
> > @@ -60,16 +60,16 @@
> >     assert(ok);
> >
> >     // add VEH to catch NPE's from bytecode
> > -    TRACE2("signals", "Adding vectored exception handler...");
> > -    veh = AddVectoredExceptionHandler(0, vectored_exception_handler);
> > -    assert(veh);
> > +    // TRACE2("signals", "Adding vectored exception handler...");
> > +    // veh = AddVectoredExceptionHandler(0,
> vectored_exception_handler);
> > +    // assert(veh);
> >  }
> >
> >  void shutdown_signals() {
> > -    TRACE2("signals", "Removing vectored exception handler...");
> > -    ULONG res;
> > -    res = RemoveVectoredExceptionHandler(veh);
> > -    assert(res);
> > +    // TRACE2("signals", "Removing vectored exception handler...");
> > +    // ULONG res;
> > +    // res = RemoveVectoredExceptionHandler(veh);
> > +    // assert(res);
> >  } //shutdown_signals
> >
> >  //The following is for socket error handling
> >
> >
> > -Nathan
> >
> > On 4/4/07, Gregory Shimansky <gs...@gmail.com> wrote:
> > > On Friday 02 March 2007 21:56 Geir Magnusson Jr. wrote:
> > > > I thought it used to work.  Also, I thought that someone had shown
> > > > that Win2k was still widely deployed.  maybe that's win2k+3?  (I can
> > > > never keep the windows platform family straight anymore...)
> > >
> > > Resurrecting this old thread about w2k, Nathan, what happens if you
> just
> > > comment out the line with AddVectoredExceptionHandler? In this case
> you'll
> > > lose a handler registration, so you will not have hardware NPEs (I am
> not
> > > sure about the JIT status for ia32, are hardware NPEs enabled for this
> > > architecture?), you won't have JVMTI breakpoints in JIT mode, so
> debugging
> > > won't work. But the rest of VM should work on w2k with the exception
> of the
> > > code which uses P4 specific instructions.
> > >
> > > If this helps to at least start running the VM, I think it could be
> possible
> > > to move from vectored exceptions to older structured ones on w2k and
> make it
> > > a supported platform.
> > >
> > > If you get illegal instruction like mfence on w2k as well, probably
> the
> > > modifications which Evgueni Brevnov is going to offer for P3 backport
> on
> > > Linux could help you running at least something...
> > >
> > > I am asking because I don't have either w2k or P3 processor, so all I
> can do
> > > to help right now is give some suggestions.
> > >
> > > > geir
> > > >
> > > > On Feb 26, 2007, at 8:31 PM, Nathan Beyer wrote:
> > > > > Thanks for details.
> > > > >
> > > > > So I guess I'll ask the question again, is there a desire for
> Win2K
> > > > > support? I'm not sure I really have an opinion one way or the
> other.
> > > > > In relation to the previous discussion, I do think we should
> maintain
> > > > > a single code base, so I guess this means either coding to the
> > > > > lowest-common spec, some sort of test-and-branch or C macros (?).
> > > > >
> > > > > I do think it would be helpful to spit out a "OS not supported"
> error
> > > > > condition in these cases.
> > > > >
> > > > > -Nathan
> > > > >
> > > > > On 2/26/07, Alex Astapchuk <al...@gmail.com> wrote:
> > > > >> Btw, the w2k issue has been raised before. Start of the tread is
> > > > >> here:
> > > > >>
> > > > >>
> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > > > >> 3c44D36A45.802@pobox.com%3e
> > > > >>
> > > > >> then it turns into 'platform support':
> > > > >>
> > > > >>
> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > > > >> 3c44D9A4C7.1010607@gmail.com%3e
> > > > >>
> > > > >> and HARMONY-1145 was filed against the issue.
> > > > >>
> > > > >> --
> > > > >> Thanks,
> > > > >>    Alex
> > > > >>
> > > > >> Alex Astapchuk wrote:
> > > > >> > Hi Nathan,
> > > > >> >
> > > > >> >  > Failed to open JVM DLL:
> > > > >> >
> > > > >> > C:\bt-trunk\cc\projects\drlvm\trunk\build\win_ia32_msvc_debug
> > > > >>
> > > > >> \deploy\jdk\jre\bin\default\harmonyvm
> > > > >>
> > > > >> > DRLVM can not be run on Win2000: it uses 'vectored exception
> > > > >> > handler' [1] (instead of old-fashion structured exception
> handler),
> > > > >> > and this feature requires at least WinXP/Win2k3 [2].
> > > > >> >
> > > > >> > There may be more XP-specific functions I'm not aware about,
> but
> > > > >> > at least this one will make the loading fail because the loader
> > > > >> > can not find AddVectoredExceptionHandler export in kernel32.dll
> .
> > > > >> >
> > > > >> > [1] vm\vmcore\src\util\win\nt_platform_utils.cpp
> > > > >> >      grep for AddVectoredExceptionHandler around the line 63.
> > > > >> >
> > > > >> > [2] http://msdn2.microsoft.com/en-us/library/ms679274.aspx
> > > > >> >
> > > > >> > Requirements
> > > > >> > Client Requires Windows Vista or Windows XP.
> > > > >> > Server Requires Windows Server "Longhorn" or Windows Server
> 2003.
> > > > >> > Header Declared in Winbase.h; include Windows.h.
> > > > >> > Library Use Kernel32.lib.
> > > > >> > DLL Requires Kernel32.dll.
> > >
> > > --
> > > Gregory
> > >
> >
>

Re: [drlvm] tests failing on Win2000 PIII

Posted by Alexey Varlamov <al...@gmail.com>.
2007/4/5, Nathan Beyer <nd...@apache.org>:
> Commenting out the AddVectoredExceptionHandler helped a bit. Here's
> what else (diff below) I had to remove from DRLVM to get "java
> -version" to work. I still can't get a simple HelloWorld class to run,
> even with just the interpreter. I wouldn't be surprised that my little
> hack isn't completely correct.

Nathan, I guess those you needed to remove are for _compiling_ on w2k,
not for simple running pre-build binaries?
At least for the stack_dump.cpp changes, referenced dbghelp.dll is
freely(?) redistributable and you can try run DRLVM with this dll
downloaded or taken from WinXP. If it works, we may need to update
build scripts to include this dll to snapshots as we do with
msvcr71.dll.

>
> Index: port/src/vmem/win/port_vmem.c
> ===================================================================
> --- port/src/vmem/win/port_vmem.c       (revision 525583)
> +++ port/src/vmem/win/port_vmem.c       (working copy)
> @@ -236,12 +236,12 @@
>  }
>
>  APR_DECLARE(size_t) port_vmem_max_size(){
> -    PERFORMANCE_INFORMATION pi;
> -    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
> -        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
> port_vmem_committed_size();
> -    } else {
> +//    PERFORMANCE_INFORMATION pi;
> +//    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
> +//        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
> port_vmem_committed_size();
> +//    } else {
>         return (size_t)0;
> -    }
> +//    }
>  }
>
>  #ifdef __cplusplus
> Index: vmcore/src/stack/stack_dump.cpp
> ===================================================================
> --- vmcore/src/stack/stack_dump.cpp     (revision 525583)
> +++ vmcore/src/stack/stack_dump.cpp     (working copy)
> @@ -85,11 +85,11 @@
>     PSYMBOL_INFO pSymb = (PSYMBOL_INFO)smBuf;
>     pSymb->SizeOfStruct = sizeof(smBuf);
>     pSymb->MaxNameLen = 2048;
> -    DWORD64 funcDispl;
> -    if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl, pSymb)) {
> -        info->method_name = (char*) STD_MALLOC(strlen(pSymb->Name) + 1);
> -        strcpy(info->method_name, pSymb->Name);
> -    }
> +    //DWORD64 funcDispl;
> +    //if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl, pSymb)) {
> +    //    info->method_name = (char*) STD_MALLOC(strlen(pSymb->Name) + 1);
> +    //    strcpy(info->method_name, pSymb->Name);
> +    //}
>     DWORD lineOffset;
>     IMAGEHLP_LINE lineInfo;
>     if (SymGetLineFromAddr(GetCurrentProcess(), (DWORD)ip,
> &lineOffset, &lineInfo)) {
> Index: vmcore/src/util/win/nt_platform_utils.cpp
> ===================================================================
> --- vmcore/src/util/win/nt_platform_utils.cpp   (revision 525583)
> +++ vmcore/src/util/win/nt_platform_utils.cpp   (working copy)
> @@ -60,16 +60,16 @@
>     assert(ok);
>
>     // add VEH to catch NPE's from bytecode
> -    TRACE2("signals", "Adding vectored exception handler...");
> -    veh = AddVectoredExceptionHandler(0, vectored_exception_handler);
> -    assert(veh);
> +    // TRACE2("signals", "Adding vectored exception handler...");
> +    // veh = AddVectoredExceptionHandler(0, vectored_exception_handler);
> +    // assert(veh);
>  }
>
>  void shutdown_signals() {
> -    TRACE2("signals", "Removing vectored exception handler...");
> -    ULONG res;
> -    res = RemoveVectoredExceptionHandler(veh);
> -    assert(res);
> +    // TRACE2("signals", "Removing vectored exception handler...");
> +    // ULONG res;
> +    // res = RemoveVectoredExceptionHandler(veh);
> +    // assert(res);
>  } //shutdown_signals
>
>  //The following is for socket error handling
>
>
> -Nathan
>
> On 4/4/07, Gregory Shimansky <gs...@gmail.com> wrote:
> > On Friday 02 March 2007 21:56 Geir Magnusson Jr. wrote:
> > > I thought it used to work.  Also, I thought that someone had shown
> > > that Win2k was still widely deployed.  maybe that's win2k+3?  (I can
> > > never keep the windows platform family straight anymore...)
> >
> > Resurrecting this old thread about w2k, Nathan, what happens if you just
> > comment out the line with AddVectoredExceptionHandler? In this case you'll
> > lose a handler registration, so you will not have hardware NPEs (I am not
> > sure about the JIT status for ia32, are hardware NPEs enabled for this
> > architecture?), you won't have JVMTI breakpoints in JIT mode, so debugging
> > won't work. But the rest of VM should work on w2k with the exception of the
> > code which uses P4 specific instructions.
> >
> > If this helps to at least start running the VM, I think it could be possible
> > to move from vectored exceptions to older structured ones on w2k and make it
> > a supported platform.
> >
> > If you get illegal instruction like mfence on w2k as well, probably the
> > modifications which Evgueni Brevnov is going to offer for P3 backport on
> > Linux could help you running at least something...
> >
> > I am asking because I don't have either w2k or P3 processor, so all I can do
> > to help right now is give some suggestions.
> >
> > > geir
> > >
> > > On Feb 26, 2007, at 8:31 PM, Nathan Beyer wrote:
> > > > Thanks for details.
> > > >
> > > > So I guess I'll ask the question again, is there a desire for Win2K
> > > > support? I'm not sure I really have an opinion one way or the other.
> > > > In relation to the previous discussion, I do think we should maintain
> > > > a single code base, so I guess this means either coding to the
> > > > lowest-common spec, some sort of test-and-branch or C macros (?).
> > > >
> > > > I do think it would be helpful to spit out a "OS not supported" error
> > > > condition in these cases.
> > > >
> > > > -Nathan
> > > >
> > > > On 2/26/07, Alex Astapchuk <al...@gmail.com> wrote:
> > > >> Btw, the w2k issue has been raised before. Start of the tread is
> > > >> here:
> > > >>
> > > >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > > >> 3c44D36A45.802@pobox.com%3e
> > > >>
> > > >> then it turns into 'platform support':
> > > >>
> > > >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > > >> 3c44D9A4C7.1010607@gmail.com%3e
> > > >>
> > > >> and HARMONY-1145 was filed against the issue.
> > > >>
> > > >> --
> > > >> Thanks,
> > > >>    Alex
> > > >>
> > > >> Alex Astapchuk wrote:
> > > >> > Hi Nathan,
> > > >> >
> > > >> >  > Failed to open JVM DLL:
> > > >> >
> > > >> > C:\bt-trunk\cc\projects\drlvm\trunk\build\win_ia32_msvc_debug
> > > >>
> > > >> \deploy\jdk\jre\bin\default\harmonyvm
> > > >>
> > > >> > DRLVM can not be run on Win2000: it uses 'vectored exception
> > > >> > handler' [1] (instead of old-fashion structured exception handler),
> > > >> > and this feature requires at least WinXP/Win2k3 [2].
> > > >> >
> > > >> > There may be more XP-specific functions I'm not aware about, but
> > > >> > at least this one will make the loading fail because the loader
> > > >> > can not find AddVectoredExceptionHandler export in kernel32.dll.
> > > >> >
> > > >> > [1] vm\vmcore\src\util\win\nt_platform_utils.cpp
> > > >> >      grep for AddVectoredExceptionHandler around the line 63.
> > > >> >
> > > >> > [2] http://msdn2.microsoft.com/en-us/library/ms679274.aspx
> > > >> >
> > > >> > Requirements
> > > >> > Client Requires Windows Vista or Windows XP.
> > > >> > Server Requires Windows Server "Longhorn" or Windows Server 2003.
> > > >> > Header Declared in Winbase.h; include Windows.h.
> > > >> > Library Use Kernel32.lib.
> > > >> > DLL Requires Kernel32.dll.
> >
> > --
> > Gregory
> >
>

Re: [drlvm] tests failing on Win2000 PIII

Posted by Gregory Shimansky <gs...@gmail.com>.
On Thursday 05 April 2007 08:02 Nathan Beyer wrote:
> Is there any sort of macro that's available for testing for SSE2? I
> see we have a macro for a rw barrier for IPF and some other macros for
> EM64T and others.

I don't think we need SSE2 flag for compilation time. It should really be 
detected at runtime as we all agreed in another thread (see What platforms we 
support).

> From what I've read, the mfence and other fence operations are only
> necessary for hyper-threading and multiple cores, so is the
> mfence-equivalent even needed on single threaded ia32 cpus?
>
> -Nathan
>
> On 4/4/07, Nathan Beyer <nd...@apache.org> wrote:
> > I'm running into the 'mfence' in apr_thread_ext.c in the
> > apr_memory_rw_barrier method.
> >
> > -Nathan
> >
> > On 4/4/07, Nathan Beyer <nd...@apache.org> wrote:
> > > Commenting out the AddVectoredExceptionHandler helped a bit. Here's
> > > what else (diff below) I had to remove from DRLVM to get "java
> > > -version" to work. I still can't get a simple HelloWorld class to run,
> > > even with just the interpreter. I wouldn't be surprised that my little
> > > hack isn't completely correct.
> > >
> > > Index: port/src/vmem/win/port_vmem.c
> > > ===================================================================
> > > --- port/src/vmem/win/port_vmem.c       (revision 525583)
> > > +++ port/src/vmem/win/port_vmem.c       (working copy)
> > > @@ -236,12 +236,12 @@
> > >  }
> > >
> > >  APR_DECLARE(size_t) port_vmem_max_size(){
> > > -    PERFORMANCE_INFORMATION pi;
> > > -    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
> > > -        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
> > > port_vmem_committed_size();
> > > -    } else {
> > > +//    PERFORMANCE_INFORMATION pi;
> > > +//    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
> > > +//        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
> > > port_vmem_committed_size();
> > > +//    } else {
> > >          return (size_t)0;
> > > -    }
> > > +//    }
> > >  }
> > >
> > >  #ifdef __cplusplus
> > > Index: vmcore/src/stack/stack_dump.cpp
> > > ===================================================================
> > > --- vmcore/src/stack/stack_dump.cpp     (revision 525583)
> > > +++ vmcore/src/stack/stack_dump.cpp     (working copy)
> > > @@ -85,11 +85,11 @@
> > >      PSYMBOL_INFO pSymb = (PSYMBOL_INFO)smBuf;
> > >      pSymb->SizeOfStruct = sizeof(smBuf);
> > >      pSymb->MaxNameLen = 2048;
> > > -    DWORD64 funcDispl;
> > > -    if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl,
> > > pSymb)) { -        info->method_name = (char*)
> > > STD_MALLOC(strlen(pSymb->Name) + 1); -        strcpy(info->method_name,
> > > pSymb->Name);
> > > -    }
> > > +    //DWORD64 funcDispl;
> > > +    //if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl,
> > > pSymb)) { +    //    info->method_name = (char*)
> > > STD_MALLOC(strlen(pSymb->Name) + 1); +    //   
> > > strcpy(info->method_name, pSymb->Name);
> > > +    //}
> > >      DWORD lineOffset;
> > >      IMAGEHLP_LINE lineInfo;
> > >      if (SymGetLineFromAddr(GetCurrentProcess(), (DWORD)ip,
> > > &lineOffset, &lineInfo)) {
> > > Index: vmcore/src/util/win/nt_platform_utils.cpp
> > > ===================================================================
> > > --- vmcore/src/util/win/nt_platform_utils.cpp   (revision 525583)
> > > +++ vmcore/src/util/win/nt_platform_utils.cpp   (working copy)
> > > @@ -60,16 +60,16 @@
> > >      assert(ok);
> > >
> > >      // add VEH to catch NPE's from bytecode
> > > -    TRACE2("signals", "Adding vectored exception handler...");
> > > -    veh = AddVectoredExceptionHandler(0, vectored_exception_handler);
> > > -    assert(veh);
> > > +    // TRACE2("signals", "Adding vectored exception handler...");
> > > +    // veh = AddVectoredExceptionHandler(0,
> > > vectored_exception_handler); +    // assert(veh);
> > >  }
> > >
> > >  void shutdown_signals() {
> > > -    TRACE2("signals", "Removing vectored exception handler...");
> > > -    ULONG res;
> > > -    res = RemoveVectoredExceptionHandler(veh);
> > > -    assert(res);
> > > +    // TRACE2("signals", "Removing vectored exception handler...");
> > > +    // ULONG res;
> > > +    // res = RemoveVectoredExceptionHandler(veh);
> > > +    // assert(res);
> > >  } //shutdown_signals
> > >
> > >  //The following is for socket error handling
> > >
> > >
> > > -Nathan
> > >
> > > On 4/4/07, Gregory Shimansky <gs...@gmail.com> wrote:
> > > > On Friday 02 March 2007 21:56 Geir Magnusson Jr. wrote:
> > > > > I thought it used to work.  Also, I thought that someone had shown
> > > > > that Win2k was still widely deployed.  maybe that's win2k+3?  (I
> > > > > can never keep the windows platform family straight anymore...)
> > > >
> > > > Resurrecting this old thread about w2k, Nathan, what happens if you
> > > > just comment out the line with AddVectoredExceptionHandler? In this
> > > > case you'll lose a handler registration, so you will not have
> > > > hardware NPEs (I am not sure about the JIT status for ia32, are
> > > > hardware NPEs enabled for this architecture?), you won't have JVMTI
> > > > breakpoints in JIT mode, so debugging won't work. But the rest of VM
> > > > should work on w2k with the exception of the code which uses P4
> > > > specific instructions.
> > > >
> > > > If this helps to at least start running the VM, I think it could be
> > > > possible to move from vectored exceptions to older structured ones on
> > > > w2k and make it a supported platform.
> > > >
> > > > If you get illegal instruction like mfence on w2k as well, probably
> > > > the modifications which Evgueni Brevnov is going to offer for P3
> > > > backport on Linux could help you running at least something...
> > > >
> > > > I am asking because I don't have either w2k or P3 processor, so all I
> > > > can do to help right now is give some suggestions.
> > > >
> > > > > geir
> > > > >
> > > > > On Feb 26, 2007, at 8:31 PM, Nathan Beyer wrote:
> > > > > > Thanks for details.
> > > > > >
> > > > > > So I guess I'll ask the question again, is there a desire for
> > > > > > Win2K support? I'm not sure I really have an opinion one way or
> > > > > > the other. In relation to the previous discussion, I do think we
> > > > > > should maintain a single code base, so I guess this means either
> > > > > > coding to the lowest-common spec, some sort of test-and-branch or
> > > > > > C macros (?).
> > > > > >
> > > > > > I do think it would be helpful to spit out a "OS not supported"
> > > > > > error condition in these cases.
> > > > > >
> > > > > > -Nathan
> > > > > >
> > > > > > On 2/26/07, Alex Astapchuk <al...@gmail.com> wrote:
> > > > > >> Btw, the w2k issue has been raised before. Start of the tread is
> > > > > >> here:
> > > > > >>
> > > > > >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox
> > > > > >>/% 3c44D36A45.802@pobox.com%3e
> > > > > >>
> > > > > >> then it turns into 'platform support':
> > > > > >>
> > > > > >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox
> > > > > >>/% 3c44D9A4C7.1010607@gmail.com%3e
> > > > > >>
> > > > > >> and HARMONY-1145 was filed against the issue.
> > > > > >>
> > > > > >> --
> > > > > >> Thanks,
> > > > > >>    Alex
> > > > > >>
> > > > > >> Alex Astapchuk wrote:
> > > > > >> > Hi Nathan,
> > > > > >> >
> > > > > >> >  > Failed to open JVM DLL:
> > > > > >> >
> > > > > >> > C:\bt-trunk\cc\projects\drlvm\trunk\build\win_ia32_msvc_debug
> > > > > >>
> > > > > >> \deploy\jdk\jre\bin\default\harmonyvm
> > > > > >>
> > > > > >> > DRLVM can not be run on Win2000: it uses 'vectored exception
> > > > > >> > handler' [1] (instead of old-fashion structured exception
> > > > > >> > handler), and this feature requires at least WinXP/Win2k3 [2].
> > > > > >> >
> > > > > >> > There may be more XP-specific functions I'm not aware about,
> > > > > >> > but at least this one will make the loading fail because the
> > > > > >> > loader can not find AddVectoredExceptionHandler export in
> > > > > >> > kernel32.dll.
> > > > > >> >
> > > > > >> > [1] vm\vmcore\src\util\win\nt_platform_utils.cpp
> > > > > >> >      grep for AddVectoredExceptionHandler around the line 63.
> > > > > >> >
> > > > > >> > [2] http://msdn2.microsoft.com/en-us/library/ms679274.aspx
> > > > > >> >
> > > > > >> > Requirements
> > > > > >> > Client Requires Windows Vista or Windows XP.
> > > > > >> > Server Requires Windows Server "Longhorn" or Windows Server
> > > > > >> > 2003. Header Declared in Winbase.h; include Windows.h.
> > > > > >> > Library Use Kernel32.lib.
> > > > > >> > DLL Requires Kernel32.dll.
> > > >
> > > > --
> > > > Gregory

-- 
Gregory

Re: [drlvm] tests failing on Win2000 PIII

Posted by Nathan Beyer <nd...@apache.org>.
I removed the 'mfence' references in DRLVM and ran a simple HelloWorld
using just the interpreter and it world perfectly. Success -- I ran a
simple Java program on Win2K on a Pentium III.

-Nathan

On 4/4/07, Nathan Beyer <nd...@apache.org> wrote:
> Is there any sort of macro that's available for testing for SSE2? I
> see we have a macro for a rw barrier for IPF and some other macros for
> EM64T and others.
>
> From what I've read, the mfence and other fence operations are only
> necessary for hyper-threading and multiple cores, so is the
> mfence-equivalent even needed on single threaded ia32 cpus?
>
> -Nathan
>
> On 4/4/07, Nathan Beyer <nd...@apache.org> wrote:
> > I'm running into the 'mfence' in apr_thread_ext.c in the
> > apr_memory_rw_barrier method.
> >
> > -Nathan
> >
> > On 4/4/07, Nathan Beyer <nd...@apache.org> wrote:
> > > Commenting out the AddVectoredExceptionHandler helped a bit. Here's
> > > what else (diff below) I had to remove from DRLVM to get "java
> > > -version" to work. I still can't get a simple HelloWorld class to run,
> > > even with just the interpreter. I wouldn't be surprised that my little
> > > hack isn't completely correct.
> > >
> > > Index: port/src/vmem/win/port_vmem.c
> > > ===================================================================
> > > --- port/src/vmem/win/port_vmem.c       (revision 525583)
> > > +++ port/src/vmem/win/port_vmem.c       (working copy)
> > > @@ -236,12 +236,12 @@
> > >  }
> > >
> > >  APR_DECLARE(size_t) port_vmem_max_size(){
> > > -    PERFORMANCE_INFORMATION pi;
> > > -    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
> > > -        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
> > > port_vmem_committed_size();
> > > -    } else {
> > > +//    PERFORMANCE_INFORMATION pi;
> > > +//    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
> > > +//        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
> > > port_vmem_committed_size();
> > > +//    } else {
> > >          return (size_t)0;
> > > -    }
> > > +//    }
> > >  }
> > >
> > >  #ifdef __cplusplus
> > > Index: vmcore/src/stack/stack_dump.cpp
> > > ===================================================================
> > > --- vmcore/src/stack/stack_dump.cpp     (revision 525583)
> > > +++ vmcore/src/stack/stack_dump.cpp     (working copy)
> > > @@ -85,11 +85,11 @@
> > >      PSYMBOL_INFO pSymb = (PSYMBOL_INFO)smBuf;
> > >      pSymb->SizeOfStruct = sizeof(smBuf);
> > >      pSymb->MaxNameLen = 2048;
> > > -    DWORD64 funcDispl;
> > > -    if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl, pSymb)) {
> > > -        info->method_name = (char*) STD_MALLOC(strlen(pSymb->Name) + 1);
> > > -        strcpy(info->method_name, pSymb->Name);
> > > -    }
> > > +    //DWORD64 funcDispl;
> > > +    //if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl, pSymb)) {
> > > +    //    info->method_name = (char*) STD_MALLOC(strlen(pSymb->Name) + 1);
> > > +    //    strcpy(info->method_name, pSymb->Name);
> > > +    //}
> > >      DWORD lineOffset;
> > >      IMAGEHLP_LINE lineInfo;
> > >      if (SymGetLineFromAddr(GetCurrentProcess(), (DWORD)ip,
> > > &lineOffset, &lineInfo)) {
> > > Index: vmcore/src/util/win/nt_platform_utils.cpp
> > > ===================================================================
> > > --- vmcore/src/util/win/nt_platform_utils.cpp   (revision 525583)
> > > +++ vmcore/src/util/win/nt_platform_utils.cpp   (working copy)
> > > @@ -60,16 +60,16 @@
> > >      assert(ok);
> > >
> > >      // add VEH to catch NPE's from bytecode
> > > -    TRACE2("signals", "Adding vectored exception handler...");
> > > -    veh = AddVectoredExceptionHandler(0, vectored_exception_handler);
> > > -    assert(veh);
> > > +    // TRACE2("signals", "Adding vectored exception handler...");
> > > +    // veh = AddVectoredExceptionHandler(0, vectored_exception_handler);
> > > +    // assert(veh);
> > >  }
> > >
> > >  void shutdown_signals() {
> > > -    TRACE2("signals", "Removing vectored exception handler...");
> > > -    ULONG res;
> > > -    res = RemoveVectoredExceptionHandler(veh);
> > > -    assert(res);
> > > +    // TRACE2("signals", "Removing vectored exception handler...");
> > > +    // ULONG res;
> > > +    // res = RemoveVectoredExceptionHandler(veh);
> > > +    // assert(res);
> > >  } //shutdown_signals
> > >
> > >  //The following is for socket error handling
> > >
> > >
> > > -Nathan
> > >
> > > On 4/4/07, Gregory Shimansky <gs...@gmail.com> wrote:
> > > > On Friday 02 March 2007 21:56 Geir Magnusson Jr. wrote:
> > > > > I thought it used to work.  Also, I thought that someone had shown
> > > > > that Win2k was still widely deployed.  maybe that's win2k+3?  (I can
> > > > > never keep the windows platform family straight anymore...)
> > > >
> > > > Resurrecting this old thread about w2k, Nathan, what happens if you just
> > > > comment out the line with AddVectoredExceptionHandler? In this case you'll
> > > > lose a handler registration, so you will not have hardware NPEs (I am not
> > > > sure about the JIT status for ia32, are hardware NPEs enabled for this
> > > > architecture?), you won't have JVMTI breakpoints in JIT mode, so debugging
> > > > won't work. But the rest of VM should work on w2k with the exception of the
> > > > code which uses P4 specific instructions.
> > > >
> > > > If this helps to at least start running the VM, I think it could be possible
> > > > to move from vectored exceptions to older structured ones on w2k and make it
> > > > a supported platform.
> > > >
> > > > If you get illegal instruction like mfence on w2k as well, probably the
> > > > modifications which Evgueni Brevnov is going to offer for P3 backport on
> > > > Linux could help you running at least something...
> > > >
> > > > I am asking because I don't have either w2k or P3 processor, so all I can do
> > > > to help right now is give some suggestions.
> > > >
> > > > > geir
> > > > >
> > > > > On Feb 26, 2007, at 8:31 PM, Nathan Beyer wrote:
> > > > > > Thanks for details.
> > > > > >
> > > > > > So I guess I'll ask the question again, is there a desire for Win2K
> > > > > > support? I'm not sure I really have an opinion one way or the other.
> > > > > > In relation to the previous discussion, I do think we should maintain
> > > > > > a single code base, so I guess this means either coding to the
> > > > > > lowest-common spec, some sort of test-and-branch or C macros (?).
> > > > > >
> > > > > > I do think it would be helpful to spit out a "OS not supported" error
> > > > > > condition in these cases.
> > > > > >
> > > > > > -Nathan
> > > > > >
> > > > > > On 2/26/07, Alex Astapchuk <al...@gmail.com> wrote:
> > > > > >> Btw, the w2k issue has been raised before. Start of the tread is
> > > > > >> here:
> > > > > >>
> > > > > >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > > > > >> 3c44D36A45.802@pobox.com%3e
> > > > > >>
> > > > > >> then it turns into 'platform support':
> > > > > >>
> > > > > >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > > > > >> 3c44D9A4C7.1010607@gmail.com%3e
> > > > > >>
> > > > > >> and HARMONY-1145 was filed against the issue.
> > > > > >>
> > > > > >> --
> > > > > >> Thanks,
> > > > > >>    Alex
> > > > > >>
> > > > > >> Alex Astapchuk wrote:
> > > > > >> > Hi Nathan,
> > > > > >> >
> > > > > >> >  > Failed to open JVM DLL:
> > > > > >> >
> > > > > >> > C:\bt-trunk\cc\projects\drlvm\trunk\build\win_ia32_msvc_debug
> > > > > >>
> > > > > >> \deploy\jdk\jre\bin\default\harmonyvm
> > > > > >>
> > > > > >> > DRLVM can not be run on Win2000: it uses 'vectored exception
> > > > > >> > handler' [1] (instead of old-fashion structured exception handler),
> > > > > >> > and this feature requires at least WinXP/Win2k3 [2].
> > > > > >> >
> > > > > >> > There may be more XP-specific functions I'm not aware about, but
> > > > > >> > at least this one will make the loading fail because the loader
> > > > > >> > can not find AddVectoredExceptionHandler export in kernel32.dll.
> > > > > >> >
> > > > > >> > [1] vm\vmcore\src\util\win\nt_platform_utils.cpp
> > > > > >> >      grep for AddVectoredExceptionHandler around the line 63.
> > > > > >> >
> > > > > >> > [2] http://msdn2.microsoft.com/en-us/library/ms679274.aspx
> > > > > >> >
> > > > > >> > Requirements
> > > > > >> > Client Requires Windows Vista or Windows XP.
> > > > > >> > Server Requires Windows Server "Longhorn" or Windows Server 2003.
> > > > > >> > Header Declared in Winbase.h; include Windows.h.
> > > > > >> > Library Use Kernel32.lib.
> > > > > >> > DLL Requires Kernel32.dll.
> > > >
> > > > --
> > > > Gregory
> > > >
> > >
> >
>

Re: [drlvm] tests failing on Win2000 PIII

Posted by Nathan Beyer <nd...@apache.org>.
Is there any sort of macro that's available for testing for SSE2? I
see we have a macro for a rw barrier for IPF and some other macros for
EM64T and others.

>From what I've read, the mfence and other fence operations are only
necessary for hyper-threading and multiple cores, so is the
mfence-equivalent even needed on single threaded ia32 cpus?

-Nathan

On 4/4/07, Nathan Beyer <nd...@apache.org> wrote:
> I'm running into the 'mfence' in apr_thread_ext.c in the
> apr_memory_rw_barrier method.
>
> -Nathan
>
> On 4/4/07, Nathan Beyer <nd...@apache.org> wrote:
> > Commenting out the AddVectoredExceptionHandler helped a bit. Here's
> > what else (diff below) I had to remove from DRLVM to get "java
> > -version" to work. I still can't get a simple HelloWorld class to run,
> > even with just the interpreter. I wouldn't be surprised that my little
> > hack isn't completely correct.
> >
> > Index: port/src/vmem/win/port_vmem.c
> > ===================================================================
> > --- port/src/vmem/win/port_vmem.c       (revision 525583)
> > +++ port/src/vmem/win/port_vmem.c       (working copy)
> > @@ -236,12 +236,12 @@
> >  }
> >
> >  APR_DECLARE(size_t) port_vmem_max_size(){
> > -    PERFORMANCE_INFORMATION pi;
> > -    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
> > -        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
> > port_vmem_committed_size();
> > -    } else {
> > +//    PERFORMANCE_INFORMATION pi;
> > +//    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
> > +//        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
> > port_vmem_committed_size();
> > +//    } else {
> >          return (size_t)0;
> > -    }
> > +//    }
> >  }
> >
> >  #ifdef __cplusplus
> > Index: vmcore/src/stack/stack_dump.cpp
> > ===================================================================
> > --- vmcore/src/stack/stack_dump.cpp     (revision 525583)
> > +++ vmcore/src/stack/stack_dump.cpp     (working copy)
> > @@ -85,11 +85,11 @@
> >      PSYMBOL_INFO pSymb = (PSYMBOL_INFO)smBuf;
> >      pSymb->SizeOfStruct = sizeof(smBuf);
> >      pSymb->MaxNameLen = 2048;
> > -    DWORD64 funcDispl;
> > -    if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl, pSymb)) {
> > -        info->method_name = (char*) STD_MALLOC(strlen(pSymb->Name) + 1);
> > -        strcpy(info->method_name, pSymb->Name);
> > -    }
> > +    //DWORD64 funcDispl;
> > +    //if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl, pSymb)) {
> > +    //    info->method_name = (char*) STD_MALLOC(strlen(pSymb->Name) + 1);
> > +    //    strcpy(info->method_name, pSymb->Name);
> > +    //}
> >      DWORD lineOffset;
> >      IMAGEHLP_LINE lineInfo;
> >      if (SymGetLineFromAddr(GetCurrentProcess(), (DWORD)ip,
> > &lineOffset, &lineInfo)) {
> > Index: vmcore/src/util/win/nt_platform_utils.cpp
> > ===================================================================
> > --- vmcore/src/util/win/nt_platform_utils.cpp   (revision 525583)
> > +++ vmcore/src/util/win/nt_platform_utils.cpp   (working copy)
> > @@ -60,16 +60,16 @@
> >      assert(ok);
> >
> >      // add VEH to catch NPE's from bytecode
> > -    TRACE2("signals", "Adding vectored exception handler...");
> > -    veh = AddVectoredExceptionHandler(0, vectored_exception_handler);
> > -    assert(veh);
> > +    // TRACE2("signals", "Adding vectored exception handler...");
> > +    // veh = AddVectoredExceptionHandler(0, vectored_exception_handler);
> > +    // assert(veh);
> >  }
> >
> >  void shutdown_signals() {
> > -    TRACE2("signals", "Removing vectored exception handler...");
> > -    ULONG res;
> > -    res = RemoveVectoredExceptionHandler(veh);
> > -    assert(res);
> > +    // TRACE2("signals", "Removing vectored exception handler...");
> > +    // ULONG res;
> > +    // res = RemoveVectoredExceptionHandler(veh);
> > +    // assert(res);
> >  } //shutdown_signals
> >
> >  //The following is for socket error handling
> >
> >
> > -Nathan
> >
> > On 4/4/07, Gregory Shimansky <gs...@gmail.com> wrote:
> > > On Friday 02 March 2007 21:56 Geir Magnusson Jr. wrote:
> > > > I thought it used to work.  Also, I thought that someone had shown
> > > > that Win2k was still widely deployed.  maybe that's win2k+3?  (I can
> > > > never keep the windows platform family straight anymore...)
> > >
> > > Resurrecting this old thread about w2k, Nathan, what happens if you just
> > > comment out the line with AddVectoredExceptionHandler? In this case you'll
> > > lose a handler registration, so you will not have hardware NPEs (I am not
> > > sure about the JIT status for ia32, are hardware NPEs enabled for this
> > > architecture?), you won't have JVMTI breakpoints in JIT mode, so debugging
> > > won't work. But the rest of VM should work on w2k with the exception of the
> > > code which uses P4 specific instructions.
> > >
> > > If this helps to at least start running the VM, I think it could be possible
> > > to move from vectored exceptions to older structured ones on w2k and make it
> > > a supported platform.
> > >
> > > If you get illegal instruction like mfence on w2k as well, probably the
> > > modifications which Evgueni Brevnov is going to offer for P3 backport on
> > > Linux could help you running at least something...
> > >
> > > I am asking because I don't have either w2k or P3 processor, so all I can do
> > > to help right now is give some suggestions.
> > >
> > > > geir
> > > >
> > > > On Feb 26, 2007, at 8:31 PM, Nathan Beyer wrote:
> > > > > Thanks for details.
> > > > >
> > > > > So I guess I'll ask the question again, is there a desire for Win2K
> > > > > support? I'm not sure I really have an opinion one way or the other.
> > > > > In relation to the previous discussion, I do think we should maintain
> > > > > a single code base, so I guess this means either coding to the
> > > > > lowest-common spec, some sort of test-and-branch or C macros (?).
> > > > >
> > > > > I do think it would be helpful to spit out a "OS not supported" error
> > > > > condition in these cases.
> > > > >
> > > > > -Nathan
> > > > >
> > > > > On 2/26/07, Alex Astapchuk <al...@gmail.com> wrote:
> > > > >> Btw, the w2k issue has been raised before. Start of the tread is
> > > > >> here:
> > > > >>
> > > > >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > > > >> 3c44D36A45.802@pobox.com%3e
> > > > >>
> > > > >> then it turns into 'platform support':
> > > > >>
> > > > >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > > > >> 3c44D9A4C7.1010607@gmail.com%3e
> > > > >>
> > > > >> and HARMONY-1145 was filed against the issue.
> > > > >>
> > > > >> --
> > > > >> Thanks,
> > > > >>    Alex
> > > > >>
> > > > >> Alex Astapchuk wrote:
> > > > >> > Hi Nathan,
> > > > >> >
> > > > >> >  > Failed to open JVM DLL:
> > > > >> >
> > > > >> > C:\bt-trunk\cc\projects\drlvm\trunk\build\win_ia32_msvc_debug
> > > > >>
> > > > >> \deploy\jdk\jre\bin\default\harmonyvm
> > > > >>
> > > > >> > DRLVM can not be run on Win2000: it uses 'vectored exception
> > > > >> > handler' [1] (instead of old-fashion structured exception handler),
> > > > >> > and this feature requires at least WinXP/Win2k3 [2].
> > > > >> >
> > > > >> > There may be more XP-specific functions I'm not aware about, but
> > > > >> > at least this one will make the loading fail because the loader
> > > > >> > can not find AddVectoredExceptionHandler export in kernel32.dll.
> > > > >> >
> > > > >> > [1] vm\vmcore\src\util\win\nt_platform_utils.cpp
> > > > >> >      grep for AddVectoredExceptionHandler around the line 63.
> > > > >> >
> > > > >> > [2] http://msdn2.microsoft.com/en-us/library/ms679274.aspx
> > > > >> >
> > > > >> > Requirements
> > > > >> > Client Requires Windows Vista or Windows XP.
> > > > >> > Server Requires Windows Server "Longhorn" or Windows Server 2003.
> > > > >> > Header Declared in Winbase.h; include Windows.h.
> > > > >> > Library Use Kernel32.lib.
> > > > >> > DLL Requires Kernel32.dll.
> > >
> > > --
> > > Gregory
> > >
> >
>

Re: [drlvm] tests failing on Win2000 PIII

Posted by Nathan Beyer <nd...@apache.org>.
I'm running into the 'mfence' in apr_thread_ext.c in the
apr_memory_rw_barrier method.

-Nathan

On 4/4/07, Nathan Beyer <nd...@apache.org> wrote:
> Commenting out the AddVectoredExceptionHandler helped a bit. Here's
> what else (diff below) I had to remove from DRLVM to get "java
> -version" to work. I still can't get a simple HelloWorld class to run,
> even with just the interpreter. I wouldn't be surprised that my little
> hack isn't completely correct.
>
> Index: port/src/vmem/win/port_vmem.c
> ===================================================================
> --- port/src/vmem/win/port_vmem.c       (revision 525583)
> +++ port/src/vmem/win/port_vmem.c       (working copy)
> @@ -236,12 +236,12 @@
>  }
>
>  APR_DECLARE(size_t) port_vmem_max_size(){
> -    PERFORMANCE_INFORMATION pi;
> -    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
> -        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
> port_vmem_committed_size();
> -    } else {
> +//    PERFORMANCE_INFORMATION pi;
> +//    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
> +//        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
> port_vmem_committed_size();
> +//    } else {
>          return (size_t)0;
> -    }
> +//    }
>  }
>
>  #ifdef __cplusplus
> Index: vmcore/src/stack/stack_dump.cpp
> ===================================================================
> --- vmcore/src/stack/stack_dump.cpp     (revision 525583)
> +++ vmcore/src/stack/stack_dump.cpp     (working copy)
> @@ -85,11 +85,11 @@
>      PSYMBOL_INFO pSymb = (PSYMBOL_INFO)smBuf;
>      pSymb->SizeOfStruct = sizeof(smBuf);
>      pSymb->MaxNameLen = 2048;
> -    DWORD64 funcDispl;
> -    if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl, pSymb)) {
> -        info->method_name = (char*) STD_MALLOC(strlen(pSymb->Name) + 1);
> -        strcpy(info->method_name, pSymb->Name);
> -    }
> +    //DWORD64 funcDispl;
> +    //if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl, pSymb)) {
> +    //    info->method_name = (char*) STD_MALLOC(strlen(pSymb->Name) + 1);
> +    //    strcpy(info->method_name, pSymb->Name);
> +    //}
>      DWORD lineOffset;
>      IMAGEHLP_LINE lineInfo;
>      if (SymGetLineFromAddr(GetCurrentProcess(), (DWORD)ip,
> &lineOffset, &lineInfo)) {
> Index: vmcore/src/util/win/nt_platform_utils.cpp
> ===================================================================
> --- vmcore/src/util/win/nt_platform_utils.cpp   (revision 525583)
> +++ vmcore/src/util/win/nt_platform_utils.cpp   (working copy)
> @@ -60,16 +60,16 @@
>      assert(ok);
>
>      // add VEH to catch NPE's from bytecode
> -    TRACE2("signals", "Adding vectored exception handler...");
> -    veh = AddVectoredExceptionHandler(0, vectored_exception_handler);
> -    assert(veh);
> +    // TRACE2("signals", "Adding vectored exception handler...");
> +    // veh = AddVectoredExceptionHandler(0, vectored_exception_handler);
> +    // assert(veh);
>  }
>
>  void shutdown_signals() {
> -    TRACE2("signals", "Removing vectored exception handler...");
> -    ULONG res;
> -    res = RemoveVectoredExceptionHandler(veh);
> -    assert(res);
> +    // TRACE2("signals", "Removing vectored exception handler...");
> +    // ULONG res;
> +    // res = RemoveVectoredExceptionHandler(veh);
> +    // assert(res);
>  } //shutdown_signals
>
>  //The following is for socket error handling
>
>
> -Nathan
>
> On 4/4/07, Gregory Shimansky <gs...@gmail.com> wrote:
> > On Friday 02 March 2007 21:56 Geir Magnusson Jr. wrote:
> > > I thought it used to work.  Also, I thought that someone had shown
> > > that Win2k was still widely deployed.  maybe that's win2k+3?  (I can
> > > never keep the windows platform family straight anymore...)
> >
> > Resurrecting this old thread about w2k, Nathan, what happens if you just
> > comment out the line with AddVectoredExceptionHandler? In this case you'll
> > lose a handler registration, so you will not have hardware NPEs (I am not
> > sure about the JIT status for ia32, are hardware NPEs enabled for this
> > architecture?), you won't have JVMTI breakpoints in JIT mode, so debugging
> > won't work. But the rest of VM should work on w2k with the exception of the
> > code which uses P4 specific instructions.
> >
> > If this helps to at least start running the VM, I think it could be possible
> > to move from vectored exceptions to older structured ones on w2k and make it
> > a supported platform.
> >
> > If you get illegal instruction like mfence on w2k as well, probably the
> > modifications which Evgueni Brevnov is going to offer for P3 backport on
> > Linux could help you running at least something...
> >
> > I am asking because I don't have either w2k or P3 processor, so all I can do
> > to help right now is give some suggestions.
> >
> > > geir
> > >
> > > On Feb 26, 2007, at 8:31 PM, Nathan Beyer wrote:
> > > > Thanks for details.
> > > >
> > > > So I guess I'll ask the question again, is there a desire for Win2K
> > > > support? I'm not sure I really have an opinion one way or the other.
> > > > In relation to the previous discussion, I do think we should maintain
> > > > a single code base, so I guess this means either coding to the
> > > > lowest-common spec, some sort of test-and-branch or C macros (?).
> > > >
> > > > I do think it would be helpful to spit out a "OS not supported" error
> > > > condition in these cases.
> > > >
> > > > -Nathan
> > > >
> > > > On 2/26/07, Alex Astapchuk <al...@gmail.com> wrote:
> > > >> Btw, the w2k issue has been raised before. Start of the tread is
> > > >> here:
> > > >>
> > > >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > > >> 3c44D36A45.802@pobox.com%3e
> > > >>
> > > >> then it turns into 'platform support':
> > > >>
> > > >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > > >> 3c44D9A4C7.1010607@gmail.com%3e
> > > >>
> > > >> and HARMONY-1145 was filed against the issue.
> > > >>
> > > >> --
> > > >> Thanks,
> > > >>    Alex
> > > >>
> > > >> Alex Astapchuk wrote:
> > > >> > Hi Nathan,
> > > >> >
> > > >> >  > Failed to open JVM DLL:
> > > >> >
> > > >> > C:\bt-trunk\cc\projects\drlvm\trunk\build\win_ia32_msvc_debug
> > > >>
> > > >> \deploy\jdk\jre\bin\default\harmonyvm
> > > >>
> > > >> > DRLVM can not be run on Win2000: it uses 'vectored exception
> > > >> > handler' [1] (instead of old-fashion structured exception handler),
> > > >> > and this feature requires at least WinXP/Win2k3 [2].
> > > >> >
> > > >> > There may be more XP-specific functions I'm not aware about, but
> > > >> > at least this one will make the loading fail because the loader
> > > >> > can not find AddVectoredExceptionHandler export in kernel32.dll.
> > > >> >
> > > >> > [1] vm\vmcore\src\util\win\nt_platform_utils.cpp
> > > >> >      grep for AddVectoredExceptionHandler around the line 63.
> > > >> >
> > > >> > [2] http://msdn2.microsoft.com/en-us/library/ms679274.aspx
> > > >> >
> > > >> > Requirements
> > > >> > Client Requires Windows Vista or Windows XP.
> > > >> > Server Requires Windows Server "Longhorn" or Windows Server 2003.
> > > >> > Header Declared in Winbase.h; include Windows.h.
> > > >> > Library Use Kernel32.lib.
> > > >> > DLL Requires Kernel32.dll.
> >
> > --
> > Gregory
> >
>

Re: [drlvm] tests failing on Win2000 PIII

Posted by Nathan Beyer <nd...@apache.org>.
Commenting out the AddVectoredExceptionHandler helped a bit. Here's
what else (diff below) I had to remove from DRLVM to get "java
-version" to work. I still can't get a simple HelloWorld class to run,
even with just the interpreter. I wouldn't be surprised that my little
hack isn't completely correct.

Index: port/src/vmem/win/port_vmem.c
===================================================================
--- port/src/vmem/win/port_vmem.c	(revision 525583)
+++ port/src/vmem/win/port_vmem.c	(working copy)
@@ -236,12 +236,12 @@
 }

 APR_DECLARE(size_t) port_vmem_max_size(){
-    PERFORMANCE_INFORMATION pi;
-    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
-        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
port_vmem_committed_size();
-    } else {
+//    PERFORMANCE_INFORMATION pi;
+//    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
+//        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
port_vmem_committed_size();
+//    } else {
         return (size_t)0;
-    }
+//    }
 }

 #ifdef __cplusplus
Index: vmcore/src/stack/stack_dump.cpp
===================================================================
--- vmcore/src/stack/stack_dump.cpp	(revision 525583)
+++ vmcore/src/stack/stack_dump.cpp	(working copy)
@@ -85,11 +85,11 @@
     PSYMBOL_INFO pSymb = (PSYMBOL_INFO)smBuf;
     pSymb->SizeOfStruct = sizeof(smBuf);
     pSymb->MaxNameLen = 2048;
-    DWORD64 funcDispl;
-    if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl, pSymb)) {
-        info->method_name = (char*) STD_MALLOC(strlen(pSymb->Name) + 1);
-        strcpy(info->method_name, pSymb->Name);
-    }
+    //DWORD64 funcDispl;
+    //if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl, pSymb)) {
+    //    info->method_name = (char*) STD_MALLOC(strlen(pSymb->Name) + 1);
+    //    strcpy(info->method_name, pSymb->Name);
+    //}
     DWORD lineOffset;
     IMAGEHLP_LINE lineInfo;
     if (SymGetLineFromAddr(GetCurrentProcess(), (DWORD)ip,
&lineOffset, &lineInfo)) {
Index: vmcore/src/util/win/nt_platform_utils.cpp
===================================================================
--- vmcore/src/util/win/nt_platform_utils.cpp	(revision 525583)
+++ vmcore/src/util/win/nt_platform_utils.cpp	(working copy)
@@ -60,16 +60,16 @@
     assert(ok);

     // add VEH to catch NPE's from bytecode
-    TRACE2("signals", "Adding vectored exception handler...");
-    veh = AddVectoredExceptionHandler(0, vectored_exception_handler);
-    assert(veh);
+    // TRACE2("signals", "Adding vectored exception handler...");
+    // veh = AddVectoredExceptionHandler(0, vectored_exception_handler);
+    // assert(veh);
 }

 void shutdown_signals() {
-    TRACE2("signals", "Removing vectored exception handler...");
-    ULONG res;
-    res = RemoveVectoredExceptionHandler(veh);
-    assert(res);
+    // TRACE2("signals", "Removing vectored exception handler...");
+    // ULONG res;
+    // res = RemoveVectoredExceptionHandler(veh);
+    // assert(res);
 } //shutdown_signals

 //The following is for socket error handling


-Nathan

On 4/4/07, Gregory Shimansky <gs...@gmail.com> wrote:
> On Friday 02 March 2007 21:56 Geir Magnusson Jr. wrote:
> > I thought it used to work.  Also, I thought that someone had shown
> > that Win2k was still widely deployed.  maybe that's win2k+3?  (I can
> > never keep the windows platform family straight anymore...)
>
> Resurrecting this old thread about w2k, Nathan, what happens if you just
> comment out the line with AddVectoredExceptionHandler? In this case you'll
> lose a handler registration, so you will not have hardware NPEs (I am not
> sure about the JIT status for ia32, are hardware NPEs enabled for this
> architecture?), you won't have JVMTI breakpoints in JIT mode, so debugging
> won't work. But the rest of VM should work on w2k with the exception of the
> code which uses P4 specific instructions.
>
> If this helps to at least start running the VM, I think it could be possible
> to move from vectored exceptions to older structured ones on w2k and make it
> a supported platform.
>
> If you get illegal instruction like mfence on w2k as well, probably the
> modifications which Evgueni Brevnov is going to offer for P3 backport on
> Linux could help you running at least something...
>
> I am asking because I don't have either w2k or P3 processor, so all I can do
> to help right now is give some suggestions.
>
> > geir
> >
> > On Feb 26, 2007, at 8:31 PM, Nathan Beyer wrote:
> > > Thanks for details.
> > >
> > > So I guess I'll ask the question again, is there a desire for Win2K
> > > support? I'm not sure I really have an opinion one way or the other.
> > > In relation to the previous discussion, I do think we should maintain
> > > a single code base, so I guess this means either coding to the
> > > lowest-common spec, some sort of test-and-branch or C macros (?).
> > >
> > > I do think it would be helpful to spit out a "OS not supported" error
> > > condition in these cases.
> > >
> > > -Nathan
> > >
> > > On 2/26/07, Alex Astapchuk <al...@gmail.com> wrote:
> > >> Btw, the w2k issue has been raised before. Start of the tread is
> > >> here:
> > >>
> > >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > >> 3c44D36A45.802@pobox.com%3e
> > >>
> > >> then it turns into 'platform support':
> > >>
> > >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > >> 3c44D9A4C7.1010607@gmail.com%3e
> > >>
> > >> and HARMONY-1145 was filed against the issue.
> > >>
> > >> --
> > >> Thanks,
> > >>    Alex
> > >>
> > >> Alex Astapchuk wrote:
> > >> > Hi Nathan,
> > >> >
> > >> >  > Failed to open JVM DLL:
> > >> >
> > >> > C:\bt-trunk\cc\projects\drlvm\trunk\build\win_ia32_msvc_debug
> > >>
> > >> \deploy\jdk\jre\bin\default\harmonyvm
> > >>
> > >> > DRLVM can not be run on Win2000: it uses 'vectored exception
> > >> > handler' [1] (instead of old-fashion structured exception handler),
> > >> > and this feature requires at least WinXP/Win2k3 [2].
> > >> >
> > >> > There may be more XP-specific functions I'm not aware about, but
> > >> > at least this one will make the loading fail because the loader
> > >> > can not find AddVectoredExceptionHandler export in kernel32.dll.
> > >> >
> > >> > [1] vm\vmcore\src\util\win\nt_platform_utils.cpp
> > >> >      grep for AddVectoredExceptionHandler around the line 63.
> > >> >
> > >> > [2] http://msdn2.microsoft.com/en-us/library/ms679274.aspx
> > >> >
> > >> > Requirements
> > >> > Client Requires Windows Vista or Windows XP.
> > >> > Server Requires Windows Server "Longhorn" or Windows Server 2003.
> > >> > Header Declared in Winbase.h; include Windows.h.
> > >> > Library Use Kernel32.lib.
> > >> > DLL Requires Kernel32.dll.
>
> --
> Gregory
>

Re: [drlvm] tests failing on Win2000 PIII

Posted by Gregory Shimansky <gs...@gmail.com>.
Alexey Varlamov wrote:
> 2007/4/5, Gregory Shimansky <gs...@gmail.com>:
>> On Friday 02 March 2007 21:56 Geir Magnusson Jr. wrote:
>> > I thought it used to work.  Also, I thought that someone had shown
>> > that Win2k was still widely deployed.  maybe that's win2k+3?  (I can
>> > never keep the windows platform family straight anymore...)
>>
>> Resurrecting this old thread about w2k, Nathan, what happens if you just
>> comment out the line with AddVectoredExceptionHandler? In this case 
>> you'll
>> lose a handler registration, so you will not have hardware NPEs (I am not
>> sure about the JIT status for ia32, are hardware NPEs enabled for this
>> architecture?), you won't have JVMTI breakpoints in JIT mode, so 
>> debugging
>> won't work. But the rest of VM should work on w2k with the exception 
>> of the
>> code which uses P4 specific instructions.
>>
>> If this helps to at least start running the VM, I think it could be 
>> possible
>> to move from vectored exceptions to older structured ones on w2k and 
>> make it
>> a supported platform.
> 
> I'd also suggest straightforward solution: test Windows version at
> startup and either setup VEH on modern OSes or export special JNI
> table of SEH-wrapped functions on w2k. This way we'll have the same
> feature set on all flavours of Windows and no compromise to
> performance.

This is a good idea except that not all VM functions are called through 
JNI. The invocation API functions JNI_GetDefaultJavaVMInitArgs, 
JNI_GetCreatedJavaVMs and JNI_CreateJavaVM are exported by harmonyvm.dll 
directly. At least JNI_CreateJavaVM should execute Java code (classlib 
startup) with SEH/VEH protection to catch hardware NPEs and other 
possible exceptions in managed code.

>>
>> If you get illegal instruction like mfence on w2k as well, probably the
>> modifications which Evgueni Brevnov is going to offer for P3 backport on
>> Linux could help you running at least something...
>>
>> I am asking because I don't have either w2k or P3 processor, so all I 
>> can do
>> to help right now is give some suggestions.
>>
>> > geir
>> >
>> > On Feb 26, 2007, at 8:31 PM, Nathan Beyer wrote:
>> > > Thanks for details.
>> > >
>> > > So I guess I'll ask the question again, is there a desire for Win2K
>> > > support? I'm not sure I really have an opinion one way or the other.
>> > > In relation to the previous discussion, I do think we should maintain
>> > > a single code base, so I guess this means either coding to the
>> > > lowest-common spec, some sort of test-and-branch or C macros (?).
>> > >
>> > > I do think it would be helpful to spit out a "OS not supported" error
>> > > condition in these cases.
>> > >
>> > > -Nathan
>> > >
>> > > On 2/26/07, Alex Astapchuk <al...@gmail.com> wrote:
>> > >> Btw, the w2k issue has been raised before. Start of the tread is
>> > >> here:
>> > >>
>> > >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
>> > >> 3c44D36A45.802@pobox.com%3e
>> > >>
>> > >> then it turns into 'platform support':
>> > >>
>> > >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
>> > >> 3c44D9A4C7.1010607@gmail.com%3e
>> > >>
>> > >> and HARMONY-1145 was filed against the issue.
>> > >>
>> > >> --
>> > >> Thanks,
>> > >>    Alex
>> > >>
>> > >> Alex Astapchuk wrote:
>> > >> > Hi Nathan,
>> > >> >
>> > >> >  > Failed to open JVM DLL:
>> > >> >
>> > >> > C:\bt-trunk\cc\projects\drlvm\trunk\build\win_ia32_msvc_debug
>> > >>
>> > >> \deploy\jdk\jre\bin\default\harmonyvm
>> > >>
>> > >> > DRLVM can not be run on Win2000: it uses 'vectored exception
>> > >> > handler' [1] (instead of old-fashion structured exception 
>> handler),
>> > >> > and this feature requires at least WinXP/Win2k3 [2].
>> > >> >
>> > >> > There may be more XP-specific functions I'm not aware about, but
>> > >> > at least this one will make the loading fail because the loader
>> > >> > can not find AddVectoredExceptionHandler export in kernel32.dll.
>> > >> >
>> > >> > [1] vm\vmcore\src\util\win\nt_platform_utils.cpp
>> > >> >      grep for AddVectoredExceptionHandler around the line 63.
>> > >> >
>> > >> > [2] http://msdn2.microsoft.com/en-us/library/ms679274.aspx
>> > >> >
>> > >> > Requirements
>> > >> > Client Requires Windows Vista or Windows XP.
>> > >> > Server Requires Windows Server "Longhorn" or Windows Server 2003.
>> > >> > Header Declared in Winbase.h; include Windows.h.
>> > >> > Library Use Kernel32.lib.
>> > >> > DLL Requires Kernel32.dll.
>>
>> -- 
>> Gregory
>>
> 


-- 
Gregory


Re: [drlvm] tests failing on Win2000 PIII

Posted by Alexey Varlamov <al...@gmail.com>.
2007/4/5, Gregory Shimansky <gs...@gmail.com>:
> On Friday 02 March 2007 21:56 Geir Magnusson Jr. wrote:
> > I thought it used to work.  Also, I thought that someone had shown
> > that Win2k was still widely deployed.  maybe that's win2k+3?  (I can
> > never keep the windows platform family straight anymore...)
>
> Resurrecting this old thread about w2k, Nathan, what happens if you just
> comment out the line with AddVectoredExceptionHandler? In this case you'll
> lose a handler registration, so you will not have hardware NPEs (I am not
> sure about the JIT status for ia32, are hardware NPEs enabled for this
> architecture?), you won't have JVMTI breakpoints in JIT mode, so debugging
> won't work. But the rest of VM should work on w2k with the exception of the
> code which uses P4 specific instructions.
>
> If this helps to at least start running the VM, I think it could be possible
> to move from vectored exceptions to older structured ones on w2k and make it
> a supported platform.

I'd also suggest straightforward solution: test Windows version at
startup and either setup VEH on modern OSes or export special JNI
table of SEH-wrapped functions on w2k. This way we'll have the same
feature set on all flavours of Windows and no compromise to
performance.

>
> If you get illegal instruction like mfence on w2k as well, probably the
> modifications which Evgueni Brevnov is going to offer for P3 backport on
> Linux could help you running at least something...
>
> I am asking because I don't have either w2k or P3 processor, so all I can do
> to help right now is give some suggestions.
>
> > geir
> >
> > On Feb 26, 2007, at 8:31 PM, Nathan Beyer wrote:
> > > Thanks for details.
> > >
> > > So I guess I'll ask the question again, is there a desire for Win2K
> > > support? I'm not sure I really have an opinion one way or the other.
> > > In relation to the previous discussion, I do think we should maintain
> > > a single code base, so I guess this means either coding to the
> > > lowest-common spec, some sort of test-and-branch or C macros (?).
> > >
> > > I do think it would be helpful to spit out a "OS not supported" error
> > > condition in these cases.
> > >
> > > -Nathan
> > >
> > > On 2/26/07, Alex Astapchuk <al...@gmail.com> wrote:
> > >> Btw, the w2k issue has been raised before. Start of the tread is
> > >> here:
> > >>
> > >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > >> 3c44D36A45.802@pobox.com%3e
> > >>
> > >> then it turns into 'platform support':
> > >>
> > >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > >> 3c44D9A4C7.1010607@gmail.com%3e
> > >>
> > >> and HARMONY-1145 was filed against the issue.
> > >>
> > >> --
> > >> Thanks,
> > >>    Alex
> > >>
> > >> Alex Astapchuk wrote:
> > >> > Hi Nathan,
> > >> >
> > >> >  > Failed to open JVM DLL:
> > >> >
> > >> > C:\bt-trunk\cc\projects\drlvm\trunk\build\win_ia32_msvc_debug
> > >>
> > >> \deploy\jdk\jre\bin\default\harmonyvm
> > >>
> > >> > DRLVM can not be run on Win2000: it uses 'vectored exception
> > >> > handler' [1] (instead of old-fashion structured exception handler),
> > >> > and this feature requires at least WinXP/Win2k3 [2].
> > >> >
> > >> > There may be more XP-specific functions I'm not aware about, but
> > >> > at least this one will make the loading fail because the loader
> > >> > can not find AddVectoredExceptionHandler export in kernel32.dll.
> > >> >
> > >> > [1] vm\vmcore\src\util\win\nt_platform_utils.cpp
> > >> >      grep for AddVectoredExceptionHandler around the line 63.
> > >> >
> > >> > [2] http://msdn2.microsoft.com/en-us/library/ms679274.aspx
> > >> >
> > >> > Requirements
> > >> > Client Requires Windows Vista or Windows XP.
> > >> > Server Requires Windows Server "Longhorn" or Windows Server 2003.
> > >> > Header Declared in Winbase.h; include Windows.h.
> > >> > Library Use Kernel32.lib.
> > >> > DLL Requires Kernel32.dll.
>
> --
> Gregory
>