# harmony-dev mailing list archives

##### Site index · List index
Message view
Top
From Gregory Shimansky <gshiman...@gmail.com>
Subject Re: [drlvm] tests failing on Win2000 PIII
Date Thu, 05 Apr 2007 19:37:27 GMT
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 <ndbeyer@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 <ndbeyer@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 <gshimansky@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 <alex.astapchuk@gmail.com>
wrote:
> > > > > >> Btw, the w2k issue has been raised before. Start of the
> > > > > >> 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
> > > > > >> > 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

Mime
View raw message