精華區beta FreeBSD 關於我們 聯絡資訊
1. 先update你的-stable source到今天的,需包括所有uthread的MFC 2. 請在ports/java/jdk13/works下apply這個patch --- ./hotspot1.3.1/build/linux/makefiles/compiler2.make Fri Jul 26 22:06:52 2002 +++ ./hotspot1.3.1/build/linux/makefiles/compiler2.make Fri Jul 26 19:53:42 2002 @@ -2,4 +2,4 @@ TYPE=COMPILER2 -CFLAGS += -DCOMPILER2 +CFLAGS += -DCOMPILER2 -D__FreeBSD__ --- ./hotspot1.3.1/build/linux/makefiles/adlc.make Fri Jul 26 22:07:16 2002 +++ ./hotspot1.3.1/build/linux/makefiles/adlc.make Fri Jul 26 19:54:32 2002 @@ -53,7 +53,7 @@ # /usr/dist/share/devpro/5.x-sparc/bin/CC # man -M /usr/dist/share/devpro/5.x-sparc/man CC -CPP = g++ +CPP = g++31 CPPFLAGS = -DASSERT -g -o $@ # -o object file-name # +w Additional warnings: Nonportable, Likely mistakes or inefficient --- ./hotspot1.3.1/src/share/vm/adlc/filebuff.cpp Fri Jul 26 22:07:34 2002 +++ ./hotspot1.3.1/src/share/vm/adlc/filebuff.cpp Fri Jul 26 19:54:54 2002 @@ -19,8 +19,8 @@ //#include <iostream> //--billh -#include <ostream.h> //--billh -//#include "ostream.h" //--billh +//#include <ostream.h> //--billh +#include "ostream.h" //--billh //------------------------------FileBuff--------------------------------------- // Create a new parsing buffer --- ./hotspot1.3.1/src/os_cpu/linux_i486/vm/os_linux_i486.cpp Fri Jul 26 22:07:55 2002 +++ ./hotspot1.3.1/src/os_cpu/linux_i486/vm/os_linux_i486.cpp Fri Jul 26 20:03:02 2002 @@ -798,7 +798,7 @@ unsigned int sum = 0; int flag; - + /* switch ((int)tid->ctxtype) { case CTX_JB_NOSIG: // 0) jmp_buf context without signal mask for blocking IO, etc... @@ -817,6 +817,10 @@ default: break; } + */ + sum += so->numbers[0]; + sum += so->numbers[1]; + sum += so->numbers[2]; if (tp->last_sum() == sum) { return false; --- ./j2sdk1.3.1/src/solaris/hpi/native_threads/src/threads_bsd.c Fri Jul 26 22:08:41 2002 +++ ./j2sdk1.3.1/src/solaris/hpi/native_threads/src/threads_bsd.c Fri Jul 26 20:41:37 2002 @@ -283,7 +283,7 @@ "SUSP_COND_WAIT", /* Suspended, still in a condition queue. */ "susp boundless" }; - +/* char *getSuspendStateString(enum pthread_susp suspendState) { if (suspendState < ANALRETENTIVE) @@ -291,7 +291,7 @@ else return &SuspendList[ANALRETENTIVE-1][0]; } - +*/ #define SATAN (21 + 1) /* for the error string at the end of the list */ char SignalList [SATAN][16] @@ -526,32 +526,33 @@ */ if (thread->state != PS_SUSPENDED) dumpThreadLogStates(thread); - - switch ((int)thread->ctxtype) - { - case CTX_JB_NOSIG: /* 0) jmp_buf context without signal mask for blocking IO, etc... */ - case CTX_JB: /* 1) should never be CTX_JB */ - case CTX_SJB: /* 2) should never be CTX_SJB */ - clear_gc_registers(javaThread); -#ifdef DEBUG_BSD_NATIVE_THREADS - goto Terminate; -#endif - break; - case CTX_UC: /* 3) */ + clear_gc_registers(javaThread); + //record_uc(javaThread, &thread->ctx.uc); + // switch ((int)thread->ctxtype) + //{ + // case CTX_JB_NOSIG: /* 0) jmp_buf context without signal mask for blocking IO, etc... */ + // case CTX_JB: /* 1) should never be CTX_JB */ + // case CTX_SJB: /* 2) should never be CTX_SJB */ + // clear_gc_registers(javaThread); + //#ifdef DEBUG_BSD_NATIVE_THREADS + // goto Terminate; + //#endif + // break; + // case CTX_UC: /* 3) */ /* context is a ucontext_t */ - record_uc(javaThread, &thread->ctx.uc); -#ifdef DEBUG_BSD_NATIVE_THREADS - goto Terminate; -#endif - break; - default: -#ifdef DEBUG_BSD_NATIVE_THREADS - fprintf(stderr, "ctxtype failed %d.\n", thread->ctxtype); - goto TermFailed; -#endif - break; - } - + // record_uc(javaThread, &thread->ctx.uc); + //#ifdef DEBUG_BSD_NATIVE_THREADS + // goto Terminate; + //#endif + // break; + // default: + //#ifdef DEBUG_BSD_NATIVE_THREADS + // fprintf(stderr, "ctxtype failed %d.\n", thread->ctxtype); + // goto TermFailed; + //#endif + // break; + // } + /* #ifdef DEBUG_BSD_NATIVE_THREADS TermFailed: fprintf(stderr, "Failed to find pthread struct.\n"); fflush(stderr); @@ -560,6 +561,7 @@ Terminate: dumpThreadStates(); #endif + */ } void record_uc(sys_thread_t *t, ucontext_t *uc) --- hotspot1.3.1/src/os/linux/vm/os_linux.cpp Sun Jul 28 07:12:38 2002 +++ hotspot1.3.1/src/os/linux/vm/os_linux.cpp Sat Jul 27 08:17:33 2002 @@ -195,7 +195,7 @@ #else if (self > 0) { sizep = (uintptr_t) self->attr.stacksize_attr; - fprintf(stderr, "sizep == 0x%08x\n", sizep); + //fprintf(stderr, "sizep == 0x%08x\n", sizep); } else { fprintf(stderr, "pthread_self failed == 0x%08x\n", self); @@ -944,7 +944,7 @@ fatal1("os::allocate_thread_local_storage: thr_keycreate failed (%s) -- EAGAIN max keys reached", strerror(errno)); } - warning("os::allocate_thread_local_storage: pthread_key = 0x%08x", tk); + // warning("os::allocate_thread_local_storage: pthread_key = 0x%08x", tk); return uintptr_t(tk); } @@ -968,7 +968,7 @@ fatal1("os::thread_local_storage_at_put: thr_setspecific failed (%s) -- EINVAL invalid key", strerror(errno)); } - warning("os::thread_local_storage_at_put: index = 0x%08x, value = 0x%08x", index, (uintptr_t)value); + //warning("os::thread_local_storage_at_put: index = 0x%08x, value = 0x%08x", index, (uintptr_t)value); } void gnuppyBreakPoint() {} @@ -983,7 +983,7 @@ // warning("os::thread_local_storage_at: can't find the key"); if ( (r = pthread_getspecific((pthread_key_t)index)) == NULL) { - warning("os::thread_local_storage_at: can't find the key for \"index = 0x%08x\"", index); + //warning("os::thread_local_storage_at: can't find the key for \"index = 0x%08x\"", index); gnuppyBreakPoint(); } --- ./hotspot1.3.1/src/share/vm/runtime/threadLocalStorage.cpp Sun Jul 28 07:10:58 2002 +++ ./hotspot1.3.1/src/share/vm/runtime/threadLocalStorage.cpp Sat Jul 27 08:01:49 2002 @@ -63,7 +63,7 @@ os::thread_local_storage_at_put(ThreadLocalStorage::thread_index(), thread); // The following ensure that any optimization tricks we have tried // did not backfire on us: - warning("must be the same thread, slowly 0x%08x, 0x%08x", get_thread(), thread); + //warning("must be the same thread, slowly 0x%08x, 0x%08x", get_thread(), thread); // guarantee(get_thread() == thread, "must be the same thread, slowly"); guarantee(get_thread() == thread, "must be the same thread, slowly"); guarantee(get_thread_slow() == thread, "must be the same thread, quickly"); --- ./hotspot1.3.1/src/share/vm/runtime/thread.cpp Sun Jul 28 07:01:36 2002 +++ ./hotspot1.3.1/src/share/vm/runtime/thread.cpp Sat Jul 27 08:04:39 2002 @@ -1584,7 +1584,7 @@ guarantee(base < (unsigned int)os::current_stack_pointer(),"Error calculating stack yellow zone"); if(!os::guard_memory((char *)base,stack_yellow_zone_size())) { - warning("Attempt to guard stack yellow zone failed."); + ;//warning("Attempt to guard stack yellow zone failed."); } } @@ -1596,7 +1596,7 @@ int base = (int)stack_yellow_zone_base() - stack_yellow_zone_size(); if(!os::unguard_memory((char *)base,stack_yellow_zone_size())) { - warning("Attempt to unguard stack yellow zone failed."); + ;//warning("Attempt to unguard stack yellow zone failed."); } } @@ -1611,7 +1611,7 @@ guarantee(base < (unsigned int)os::current_stack_pointer(),"Error calculating stack red zone"); if(!os::guard_memory((char *)base,stack_red_zone_size())) { - warning("Attempt to guard stack red zone failed."); + ;//warning("Attempt to guard stack red zone failed."); } } @@ -1623,7 +1623,7 @@ int base = (int)stack_red_zone_base() - stack_red_zone_size(); if(!os::unguard_memory((char *)base,stack_red_zone_size())) { - warning("Attempt to unguard stack red zone failed."); + ;//warning("Attempt to unguard stack red zone failed."); } } -- 消除肝臟保護疲勞 來﹗康貝持,喝了再上﹗ -- ※ Origin: 水族風情畫 ◆ From: 61.59.152.177