Trying to compile HotSpot on 4.7-STABLE

Trying to compile HotSpot on 4.7-STABLE

Post by Georg-W. Kolterman » Sat, 23 Nov 2002 17:13:01



Thank you all who helped with their advice.  I've built hotspot on
4.7-STABLE now and it seems to work.  I ran jedit for a while in the
hotspot engine, and it did not crash.  It was only very noisy,
complaining about keys that were not found and yellow/red zoning not
working.  I think this behaviour is expected.

Unfortunately the hotspot engine would not run Together.  It hung during
startup.  Well... I couldn't really hope that it would work.

I'll attach my patch. It does the following things:

* Changes the build files so that both the classic VM (including the
native threads part) and the hotspot VM are built with GCC32.  I didn't
bother to mark the port to depend on GCC32 as a build dependency, I just
changed the build process.

* Changes the .java_wrapper so that it no longer activates native
threading in the classic VM.  It would do that as soon as it found the
hotspot library on disk, and would fail (in the classic VM) rather
quickly.

* Fixes a compilation error in the hotspot part which is due to some
recent changes in libc_r.  This is based on recent discussion on this
list, it just removes (#ifdefs out) the problem code.

You can drop the patch into your jdk13/files and it will apply during
the build.  Note, however, that a) you have to build the classic part
with "make WITH_NATIVE_THREADS=1", and then build the hotspot part by
hand as discussed in
http://www.freebsd.org/cgi/getmsg.cgi?fetch=63624+0+/usr/local/www/db... (only now you use GCC 3.2 instead of 3.1).

--
Regards,
Georg.


with "unsubscribe freebsd-java" in the body of the message

 
 
 

Trying to compile HotSpot on 4.7-STABLE

Post by Nick Johns » Sat, 23 Nov 2002 17:33:17



Quote:> Unfortunately the hotspot engine would not run Together.  It hung during
> startup.  Well... I couldn't really hope that it would work.

Are you sure it hung?  Even on my windows box and solaris box it takes
TogetherJ like 5 minutes (literally) to get started...

   Nick

--
"The aptly-named morons.org is an obscenity-laced screed..."
        -- Robert P. Lockwood, Catholic League director of research
Nick Johnson, version 2.0                     http://www.spatula.net/


with "unsubscribe freebsd-java" in the body of the message

 
 
 

Trying to compile HotSpot on 4.7-STABLE

Post by Bill Huey (H » Sat, 23 Nov 2002 18:25:03



> Thank you all who helped with their advice.  I've built hotspot on
> 4.7-STABLE now and it seems to work.  I ran jedit for a while in the
> hotspot engine, and it did not crash.  It was only very noisy,
> complaining about keys that were not found and yellow/red zoning not
> working.  I think this behaviour is expected.

Good.

That's just the debug code, it should be delete now that I know that
portion of the code is working correctly. It's delete in our CVS.

Quote:> Unfortunately the hotspot engine would not run Together.  It hung during
> startup.  Well... I couldn't really hope that it would work.

Damn, I've been idle with doing HotSpot work since I've been dorking
around with other things (being a bored loser) and have just now gotten
back into it so that the VM safepointing stuff get the correct register
values for GC and roll-forward operations.

Quote:> I'll attach my patch. It does the following things:

> * Changes the build files so that both the classic VM (including the
> native threads part) and the hotspot VM are built with GCC32.  I didn't
> bother to mark the port to depend on GCC32 as a build dependency, I just
> changed the build process.

That's done in our tree. The lag between patch releases is annoying and you
were a victim of it.

Quote:> * Changes the .java_wrapper so that it no longer activates native
> threading in the classic VM.  It would do that as soon as it found the
> hotspot library on disk, and would fail (in the classic VM) rather
> quickly.

Sure, -classic is dead. I'm going to deprecated it under 1.3.1 since
it's useless.

Quote:> * Fixes a compilation error in the hotspot part which is due to some
> recent changes in libc_r.  This is based on recent discussion on this
> list, it just removes (#ifdefs out) the problem code.

Yes, same reason as above with -classic being turned off. It's just a
hpi/ library that serves as a useless marker.

Quote:> You can drop the patch into your jdk13/files and it will apply during
> the build.  Note, however, that a) you have to build the classic part
> with "make WITH_NATIVE_THREADS=1", and then build the hotspot part by
> hand as discussed in
> http://www.freebsd.org/cgi/getmsg.cgi?fetch=63624+0+/usr/local/www/db... (only now you use GCC 3.2 instead of 3.1).

bill


with "unsubscribe freebsd-java" in the body of the message

 
 
 

Trying to compile HotSpot on 4.7-STABLE

Post by Georg-W. Kolterman » Sat, 23 Nov 2002 19:12:05


Am Fr, 2002-11-22 um 09.33 schrieb Nick Johnson:


> > Unfortunately the hotspot engine would not run Together.  It hung during
> > startup.  Well... I couldn't really hope that it would work.

> Are you sure it hung?  Even on my windows box and solaris box it takes
> TogetherJ like 5 minutes (literally) to get started...

>    Nick

You are right, it doesn't completely hang.  I noticed that about 30
minutes ago when I tried again.

It pops up the splash screen after about 10 seconds, and then it hangs.
If you hide and expose the splash screen, it does not get updated.  The
java process consumes hardly any cpu.

Then after 10 *MINUTES* or so, it suddenly updates the splash screen,
moving the progress bar further.  Then it pauses again as above.  The
same repeats after another 10 minutes.

I'll let it continue in the background and see what happens.

--
Regards,
Georg.


with "unsubscribe freebsd-java" in the body of the message

 
 
 

Trying to compile HotSpot on 4.7-STABLE

Post by Bill Huey (H » Sat, 23 Nov 2002 19:18:56



> You are right, it doesn't completely hang.  I noticed that about 30
> minutes ago when I tried again.

> It pops up the splash screen after about 10 seconds, and then it hangs.
> If you hide and expose the splash screen, it does not get updated.  The
> java process consumes hardly any cpu.

> Then after 10 *MINUTES* or so, it suddenly updates the splash screen,
> moving the progress bar further.  Then it pauses again as above.  The
> same repeats after another 10 minutes.

> I'll let it continue in the background and see what happens.

There's section that deals with sleeping and signal. Enable that stuff
in os_linux.cpp and try it again.

bill


with "unsubscribe freebsd-java" in the body of the message

 
 
 

Trying to compile HotSpot on 4.7-STABLE

Post by Georg-W. Kolterman » Sat, 23 Nov 2002 22:33:00


--=-SCZY3kGorDBugjJYsETd
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Am Fr, 2002-11-22 um 11.17 schrieb Bill Huey:

Quote:> > ...
> > Then after 10 *MINUTES* or so, it suddenly updates the splash screen,
> > moving the progress bar further.  Then it pauses again as above.  The
> > same repeats after another 10 minutes.

> > I'll let it continue in the background and see what happens.

> There's section that deals with sleeping and signal. Enable that stuff
> in os_linux.cpp and try it again.

> bill

I'm not sure if I understood you correctly.  See attached patch for what
I did.

It didn't help :-(

--
Regards,
Georg.

--=-SCZY3kGorDBugjJYsETd
Content-Disposition: inline; filename=gwk.patch
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; name=gwk.patch; charset=ISO-8859-15

--- os_linux.cpp~       Fri Nov 22 11:28:44 2002

 int os::sleep(Thread* thread, jlong millis, bool interruptible) {
   assert(thread =3D=3D Thread::current(),  "thread consistency check");
=20
-#if 0
+// gwk #if 0
   // On Solaris machines (especially 2.5.1) we found that sometimes the VM=
 gets into a live lock
   // situation with a JavaThread being starved out of a lwp. The kernel do=
esn't seem to generate
   // a SIGWAITING signal which would enable the threads library to create =

     Threads_lock->lock_without_safepoint_check();
     Threads_lock->unlock();=20
   }
-#endif
+// gwk #endif
=20
   if (millis <=3D 0) {
-#if 0
+//gwk #if 0
     // NOTE: workaround for bug 4338139
     if (thread->is_Java_thread()) {

       pthread_yield();
       return 0;
     }
-#endif
+// gwk #endif
=20
     pthread_yield();
=20

--=-SCZY3kGorDBugjJYsETd--


with "unsubscribe freebsd-java" in the body of the message

 
 
 

Trying to compile HotSpot on 4.7-STABLE

Post by Bill Huey (H » Sun, 24 Nov 2002 04:30:27



> I'm not sure if I understood you correctly.  See attached patch for what
> I did.

> It didn't help :-(

Sorry, to be vague. It's a line that's commented out involving
INTERUPT* macro around nanosleep I believe. I talked about it on
the list a while back. My dev machine isn't on so I can't tell you
the specific function name. I'll get back to you on this latter on...

bill


with "unsubscribe freebsd-java" in the body of the message