]> git.sur5r.net Git - openldap/commitdiff
ITS#8752 additional debug info, thread ID of rmutex lockers
authorHoward Chu <hyc@openldap.org>
Fri, 13 Oct 2017 16:24:19 +0000 (17:24 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 17 Oct 2017 17:04:06 +0000 (10:04 -0700)
servers/slapd/overlays/accesslog.c

index e79ef364bc7d3702c67f9285c730f7de60430224..a2675aefca690930bdd19793d6213048f9c90cdd 100644 (file)
@@ -1515,6 +1515,11 @@ static int accesslog_response(Operation *op, SlapReply *rs) {
                                break;
                        }
                }
+#ifdef RMUTEX_DEBUG
+               Debug( LDAP_DEBUG_SYNC,
+                       "accesslog_response: unlocking rmutex for tid %x\n",
+                       op->o_tid, 0, 0 );
+#endif
                ldap_pvt_thread_rmutex_unlock( &li->li_op_rmutex, op->o_tid );
        }
 
@@ -1991,7 +1996,17 @@ accesslog_op_mod( Operation *op, SlapReply *rs )
                for ( cb2 = op->o_callback; cb2->sc_next; cb2 = cb2->sc_next );
                cb2->sc_next = cb;
 
+#ifdef RMUTEX_DEBUG
+               Debug( LDAP_DEBUG_SYNC,
+                       "accesslog_op_mod: locking rmutex for tid %x\n",
+                       op->o_tid, 0, 0 );
+#endif
                ldap_pvt_thread_rmutex_lock( &li->li_op_rmutex, op->o_tid );
+#ifdef RMUTEX_DEBUG
+               Debug( LDAP_DEBUG_STATS,
+                       "accesslog_op_mod: locked rmutex for tid %x\n",
+                       op->o_tid, 0, 0 );
+#endif
                if ( li->li_oldf && ( op->o_tag == LDAP_REQ_DELETE ||
                        op->o_tag == LDAP_REQ_MODIFY ||
                        ( op->o_tag == LDAP_REQ_MODRDN && li->li_oldattrs )))