[patch] libitm: Fix handling of reentrancy in the HTM fastpath

Peter Bergner bergner@vnet.ibm.com
Wed Jun 19 19:43:00 GMT 2013


On Wed, 2013-06-19 at 10:57 -0500, Peter Bergner wrote:
> On Wed, 2013-06-19 at 10:49 -0500, Peter Bergner wrote:
> > This is due to the following in _ITM_inTransaction():
> > 
> > 47	  if (tx && (tx->nesting > 0))
> > (gdb) p tx
> > $2 = (GTM::gtm_thread *) 0x10901bf0
> > (gdb) p tx->nesting
> > $3 = 1
> > (gdb) step
> > 49	      if (tx->state & gtm_thread::STATE_IRREVOCABLE)
> > (gdb) p tx->state
> > $4 = 3
> > (gdb) p gtm_thread::STATE_IRREVOCABLE
> > $5 = 2
> > (gdb) step
> > 50		return inIrrevocableTransaction;
> 
> Bah, ignore this.  It's a different call that is returning something other
> than inIrrevocableTransaction.  Unfortunately, gdb is having problems inside
> hw txns and I'm having trouble seeing why/when _ITM_inTransaction() is
> returning something other than inIrrevocableTransaction.  I'll see if I can
> determine why and will report back.

Ok, we return outsideTransaction because the nesting level (tx->nesting)
is zero.

Peter




More information about the Gcc-patches mailing list