Date: | Thu, 19 Jun 2008 16:44:22 +1200 |
---|---|
From: | "Fuad Tabba" <fuad@xxxxxxxxxxxxxxxxx> |
Subject: | Re: [Gems-users] LogTM Transactions Hanging (Gems 2.1) |
Thanks Dann. I think I'm making progress. I modified the file transaction.h that comes with GEMS 2.1 as follows (everything else is the same):- ------------------------- // #define NEW_RUBY_MAGIC_CALL( service ) \ // __asm__ __volatile__ \ // ( "sethi %1, %%g0 !magic service %2\n\t" \ // : /* no outputs */ \ // : "r" (0), "i" (service), "i" (service) \ // : "l0", "memory" /* clobber register */ \ // ); #define __MAGIC_CASSERT(p) do { \ typedef int __check_magic_argument[(p) ? 1 : -1]; \ } while (0) #define MAGIC(n) do { \ __MAGIC_CASSERT((n) > 0 && (n) < (1U << 22)); \ asm ("sethi " #n ", %g0"); \ } while (0) #define NEW_RUBY_MAGIC_CALL( service ) MAGIC((service)); ------------------------- I compiled deque with sun c and here's the weird thing; it seems to be working fine if I use the flags:- -xO3 -m32 -xarch=sparcvis -DSIMICS -xregs=no%appl However, just by adding -DNDEBUG it acts up. This is the output of compiling/building it:- ------------------------- ~/transactional/deque$ ~/SUNWspro/bin/cc -V cc: Sun C 5.9 SunOS_sparc Patch 124867-01 2007/07/12 usage: cc [ options] files. Use 'cc -flags' for details ~/transactional/deque$ make clean && make rm -f deque_TM deque_Lock *.o ~/SUNWspro/bin/cc -xO3 -m32 -xarch=sparcvis -DSIMICS -xregs=no%appl -DNDEBUG -I../common -c -o deque_TM.o deque.c "deque.c", line 134: warning: implicit function declaration: tm_bind_to_cabinet "deque.c", line 135: warning: implicit function declaration: Barrier_breaking "deque.c", line 136: warning: implicit function declaration: set_transaction_registers ~/SUNWspro/bin/cc -xO3 -m32 -xarch=sparcvis -DSIMICS -xregs=no%appl -DNDEBUG -I../common -c -o transaction.o ../common/transaction.c "../common/transaction.c", line 103: warning: implicit function declaration: printf "../common/transaction.c", line 105: warning: implicit function declaration: perror "../common/transaction.c", line 128: warning: assignment type mismatch: pointer to void "=" pointer to function() returning void "../common/transaction.c", line 138: warning: assignment type mismatch: pointer to void "=" pointer to function() returning void "../common/transaction.c", line 305: warning: no explicit type given for parameter: threadID "../common/transaction.c", line 405: warning: parameter in inline asm statement unused: %0 "../common/transaction.c", line 413: warning: parameter in inline asm statement unused: %0 "../common/transaction.c", line 421: warning: parameter in inline asm statement unused: %0 "../common/transaction.c", line 429: warning: parameter in inline asm statement unused: %0 "../common/transaction.c", line 436: warning: parameter in inline asm statement unused: %0 "../common/transaction.c", line 511: warning: argument #2 is incompatible with prototype: prototype: pointer to function(int) returning void : "/usr/include/iso/signal_iso.h", line 48 argument : pointer to function() returning void "../common/transaction.c", line 536: warning: pointer to void or function used in arithmetic "../common/transaction.c", line 543: warning: pointer to void or function used in arithmetic "../common/transaction.c", line 543: warning: assignment type mismatch: pointer to void "=" pointer to function(int) returning void "../common/transaction.c", line 556: warning: pointer to void or function used in arithmetic "../common/transaction.c", line 556: warning: assignment type mismatch: pointer to void "=" pointer to function(int) returning void ~/SUNWspro/bin/cc -xO3 -m32 -xarch=sparcvis -DSIMICS -xregs=no%appl -DNDEBUG -I../common -lpthread -o deque_TM deque_TM.o transaction.o ~/SUNWspro/bin/cc -xO3 -m32 -xarch=sparcvis -DSIMICS -xregs=no%appl -DNDEBUG -I../common -DGLOBAL_LOCK -c -o deque_Lock.o deque.c "deque.c", line 134: warning: implicit function declaration: tm_bind_to_cabinet "deque.c", line 135: warning: implicit function declaration: Barrier_breaking "deque.c", line 136: warning: implicit function declaration: set_transaction_registers ~/SUNWspro/bin/cc -xO3 -m32 -xarch=sparcvis -DSIMICS -xregs=no%appl -DNDEBUG -I../common -lpthread -o deque_Lock deque_Lock.o transaction.o ------------------------- With -NDEBUG, running two threads on four processors, if I use TIMESTAMP, then thread #0 just dissappear somewhere which thread #1 finishes. If I use BASE then I get stuck with thread #0 getting nacks all the time and thread #1 dissappearing. http://www.cs.auckland.ac.nz/~fuad/dq.TIMESTAMP http://www.cs.auckland.ac.nz/~fuad/dq.BASE The funny thing is, it works just fine _without_ -DNDEBUG. Any ideas? Thanks, /Fuad On Thu, Jun 19, 2008 at 2:01 PM, Daniel Nussbaum - Sun Microsystems - Burlington United States <dan.nussbaum@xxxxxxx> wrote: > |
Previous by Date: | Re: [Gems-users] LogTM Transactions Hanging (Gems 2.1), Daniel Nussbaum - Sun Microsystems - Burlington United States |
---|---|
Next by Date: | Re: [Gems-users] LogTM Transactions Hanging (Gems 2.1), Fuad Tabba |
Previous by Thread: | Re: [Gems-users] LogTM Transactions Hanging (Gems 2.1), Daniel Nussbaum - Sun Microsystems - Burlington United States |
Next by Thread: | Re: [Gems-users] LogTM Transactions Hanging (Gems 2.1), Fuad Tabba |
Indexes: | [Date] [Thread] |