]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[IPoIB NDIS 6.0 CM] Tracing facilities (mlnx 5208)
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 1 Dec 2009 16:32:43 +0000 (16:32 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 1 Dec 2009 16:32:43 +0000 (16:32 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@2607 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp
trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp
trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_endpoint.h
trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp

index c87ef53b7c851fe8e8c6cb075e72606e8352cdf3..7c9eebd5a9466c0cbbecfd9d5ff8d02f63af11b4 100644 (file)
@@ -423,6 +423,9 @@ __ipoib_pnp_reg(
         * completes.\r
         */\r
        cl_obj_ref( &p_adapter->obj );\r
+       IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_OBJ,\r
+                               ("[%p] Adapter refcount raised to %d\n", p_adapter, p_adapter->obj.ref_cnt));\r
+\r
 \r
        IPOIB_EXIT( IPOIB_DBG_INIT );\r
        return status;\r
@@ -447,7 +450,11 @@ __adapter_destroying(
         */\r
        if( p_adapter->h_pnp )\r
        {\r
+               IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_OBJ,\r
+                               ("Adapter[%p] has refcnt= %d\n", p_adapter, p_adapter->obj.ref_cnt));\r
                p_adapter->p_ifc->dereg_pnp( p_adapter->h_pnp, (ib_pfn_destroy_cb_t) cl_obj_deref );\r
+               IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_OBJ,\r
+                               ("Adapter[%p] refcnt decremented to %d\n", p_adapter, p_adapter->obj.ref_cnt));\r
                p_adapter->h_pnp = NULL;\r
        }\r
 \r
@@ -1055,6 +1062,8 @@ __ipoib_adapter_reset(
 \r
        /* Dereference the adapter since the previous registration is now gone. */\r
        cl_obj_deref( &p_adapter->obj );\r
+       IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_OBJ,\r
+                       ("Adapter[%p] refcnt decremented to %d\n", p_adapter, p_adapter->obj.ref_cnt));\r
 \r
        KeReleaseMutex( &p_adapter->mutex, FALSE );\r
 \r
index 2bb4ae2acb28859cbc9ed2ff31068bbedddf9a3a..35d2b8015ea6979c275044d443dfb590d373cd6b 100644 (file)
@@ -3928,6 +3928,8 @@ ipoib_reg_addrs(
 \r
                /* Take a reference for each service request. */\r
                cl_obj_ref(&p_adapter->obj);\r
+                       IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_OBJ,\r
+                               ("[%p] Adapter refcount raised to %d\n", p_adapter, p_adapter->obj.ref_cnt));\r
                ib_status = p_adapter->p_ifc->reg_svc(\r
                        p_adapter->h_al, &ib_service, &p_addr_item->p_reg->h_reg_svc );\r
                if( ib_status != IB_SUCCESS )\r
@@ -3960,6 +3962,8 @@ ipoib_reg_addrs(
                                p_adapter->hung = TRUE;\r
                        }\r
                        cl_obj_deref(&p_adapter->obj);\r
+                       IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_OBJ,\r
+                               ("Adapter[%p] refcnt decremented to %d\n", p_adapter, p_adapter->obj.ref_cnt));\r
                        cl_free( p_addr_item->p_reg );\r
                        p_addr_item->p_reg = NULL;\r
                }\r
@@ -4069,6 +4073,8 @@ __ipoib_ats_reg_cb(
 \r
        cl_obj_unlock( &p_reg->p_adapter->obj );\r
        cl_obj_deref(&p_reg->p_adapter->obj);\r
+       IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_OBJ,\r
+                       ("Adapter[%p] refcnt decremented to %d\n", p_reg->p_adapter, p_reg->p_adapter->obj.ref_cnt));\r
 \r
        IPOIB_EXIT( IPOIB_DBG_OID );\r
 }\r
index d6aea73c16a014a328b879d6277d69cafb7db362..844a81fe7dce5135546a93914a828d4643601a06 100644 (file)
@@ -195,6 +195,10 @@ ipoib_endpt_ref(
        CL_ASSERT( p_endpt );\r
 \r
        cl_obj_ref( &p_endpt->obj );\r
+#if DBG\r
+       IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_OBJ,\r
+                               ("[%p] Endpt refcount raised to %d\n", p_endpt, p_endpt->obj.ref_cnt));\r
+#endif\r
        /*\r
         * Anytime we reference the endpoint, we're either receiving data\r
         * or trying to send data to that endpoint.  Clear the expired flag\r
@@ -208,6 +212,10 @@ ipoib_endpt_deref(
        IN                              ipoib_endpt_t* const            p_endpt )\r
 {\r
        cl_obj_deref( &p_endpt->obj );\r
+#if DBG\r
+       IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_OBJ,\r
+                               ("[%p] Endpt refcount decremented to %d\n", p_endpt, p_endpt->obj.ref_cnt));\r
+#endif\r
 }\r
 \r
 \r
index 670eafe6ec7019771b8a774d0f756f461a1ce22a..e2c1d3a2220fc94e2b68fe9cfb61ae64ba2dbdba 100644 (file)
@@ -579,6 +579,9 @@ inline void ipoib_port_ref( ipoib_port_t * p_port, int type )
        cl_obj_ref( &p_port->obj );\r
 #if DBG\r
        cl_atomic_inc( &p_port->ref[type % ref_mask] );\r
+       IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_OBJ,\r
+                               ("Port[%d] refcount raised to %d\n", p_port->port_num, p_port->obj.ref_cnt));\r
+\r
        if ((p_port->obj.ref_cnt % 20)==0)\r
        IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_OBJ,\r
                ("ref type %d ref_cnt %d\n", type, p_port->obj.ref_cnt) );\r
@@ -590,16 +593,17 @@ inline void ipoib_port_ref( ipoib_port_t * p_port, int type )
 \r
 inline void ipoib_port_deref(ipoib_port_t * p_port, int type)\r
 {\r
+       cl_obj_deref( &p_port->obj );\r
 #if DBG\r
        cl_atomic_dec( &p_port->ref[type % ref_mask] );\r
+       IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_OBJ,\r
+                               ("Port[%d] refcount decremented to %d\n", p_port->port_num, p_port->obj.ref_cnt));\r
        if ((p_port->obj.ref_cnt % 20) == 0)\r
        IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_OBJ,\r
                ("deref type %d ref_cnt %d\n", type, p_port->obj.ref_cnt) );\r
 #else\r
        UNREFERENCED_PARAMETER(type);\r
 #endif\r
-       cl_obj_deref( &p_port->obj );\r
-\r
 }\r
 \r
 /* function returns pointer to payload that is going after IP header.\r