This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: GCJ + Roguewave Threads?


I don't know of any attempts to use the garbage collector with
Roguewave threads.

I assume that Roguewave threads are a thin layer on pthreads?

I think we still have a problem with notifying the GC of a new
thread, if threads are created without going through GC_pthread_create.
I need to find time to work on that.

If the Roguewave implementation is in header files, and you can
recompile the files that include it, you might be
able to work around the problem by defining GC_THREADS and including
gc.h before you include those header files.  That will redefine
pthread_create to the wrapper that notifies the GC.

To discuss this further, you may want to copy the GC-specific
mailing list at gc@linux.hpl.hp.com.

Hans

> -----Original Message-----
> From: java-owner@gcc.gnu.org [mailto:java-owner@gcc.gnu.org] 
> On Behalf Of Prabhakar, Vijay (IT)
> Sent: Thursday, February 10, 2005 1:51 PM
> To: java@gcc.gnu.org
> Subject: GCJ + Roguewave Threads?
> 
> 
> Has anyone had experience or gotten GCJ to work with 
> Roguewave threads?  I'm trying to get a set of Roguewave 
> threads to attach to the VM via the JvAttachCurrentThread() 
> method and the program seems to crash in the boehm-gc.  
> Alternatively, I've tried to create the VM while in the 
> thread and then attach it, and it crashes in 
> gc_push_all_eager in mark.c, near line 1349.  I'm using gcc 
> 3.2.3-42.  
> 
> On a side note, would it be possible to upgrade some/all of 
> the gcj related files without changing the actual gcc 
> compiler?  I can't really change the firm to gcc 3.4.3, but 
> if I could upgrade to a more recent GCJ and maintain 
> interoperability, that would be great.  Thanks!
> 
> -Vijay
> 
> 
> Here's a clip of the portion of the code:
>  
>  
> if (top == 0) return;
> /* check all pointers in range and put in push if they appear */
> /* to be valid. */
> lim = t - 1 /* longword */;
> for (p = b; p <= lim; p = (word *)(((char *)p) + ALIGNMENT)) 
> { q = *p;  // <---crashes here GC_PUSH_ONE_STACK(q, p); }
> 
> 
> here's a stack trace:
> 
> 0  GC_push_all_eager (bottom=0xde6fc5e4 
> "\024ºFñ\030ÆoÞQU(ñäÅoÞ\234\230ÿþ", 
>     top=0x0) at /ms/dev/fsf/gcc/3.2.3-42/src/boehm-gc/mark.c:1349
> 1349            q = *p;
> (gdb) bt
> #0  GC_push_all_eager (bottom=0xde6fc5e4 
> "\024ºFñ\030ÆoÞQU(ñäÅoÞ\234\230ÿþ", 
>     top=0x0) at /ms/dev/fsf/gcc/3.2.3-42/src/boehm-gc/mark.c:1349
> #1  0xf1288e0c in GC_push_all_stack (bottom=0x17 <Address 
> 0x17 out of bounds>, 
>     top=0x856a0a8 "") at 
> /ms/dev/fsf/gcc/3.2.3-42/src/boehm-gc/mark.c:1401
> #2  0xf1285551 in GC_push_all_stacks ()
>     at /ms/dev/fsf/gcc/3.2.3-42/src/boehm-gc/linux_threads.c:954
> #3  0xf128b8c9 in GC_default_push_other_roots ()
>     at /ms/dev/fsf/gcc/3.2.3-42/src/boehm-gc/os_dep.c:1668
> #4  0xf1289e9c in GC_push_roots (all=1, cold_gc_frame=0x0)
>     at /ms/dev/fsf/gcc/3.2.3-42/src/boehm-gc/mark_rts.c:582
> #5  0xf1287b56 in GC_mark_some (
>     cold_gc_frame=0xde6fc6b4 "@q_ö\213û'ñ\024ºFñðó'ñ")
>     at /ms/dev/fsf/gcc/3.2.3-42/src/boehm-gc/mark.c:300
> #6  0xf127fc05 in GC_stopped_mark (stop_func=0xf1481738 
> <GC_mark_stack>)
>     at /ms/dev/fsf/gcc/3.2.3-42/src/boehm-gc/alloc.c:489
> #7  0xf127f903 in GC_try_to_collect_inner (
>     stop_func=0xf127f3f0 <GC_never_stop_func>)
>     at /ms/dev/fsf/gcc/3.2.3-42/src/boehm-gc/alloc.c:350
> #8  0xf128a6f5 in GC_init_inner ()
>     at /ms/dev/fsf/gcc/3.2.3-42/src/boehm-gc/misc.c:673
> #9  0xf128a3be in GC_init ()
>     at /ms/dev/fsf/gcc/3.2.3-42/src/boehm-gc/misc.c:455
> #10 0xf1283a49 in GC_init_gcj_malloc (mp_index=0, mp=0x0)
>     at /ms/dev/fsf/gcc/3.2.3-42/src/boehm-gc/gcj_mlc.c:60
> #11 0xf127d3b6 in _Jv_InitGC() ()
>     at /ms/dev/fsf/gcc/3.2.3-42/src/libjava/boehm.cc:465
> #12 0xf10f2612 in _Jv_CreateJavaVM(void*) ()
>     at /ms/dev/fsf/gcc/3.2.3-42/src/libjava/prims.cc:892
> #13 0xf2a45a4b in JvCreateJavaVM (vm_args=0x0) at cni.h:125
> #14 0xf2a44218 in doTest1 () at PPJ.C:68 
> --------------------------------------------------------
>  
> NOTICE: If received in error, please destroy and notify 
> sender.  Sender does not waive confidentiality or privilege, 
> and use is prohibited. 
>  
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]