Windows: Trace DirectoryCB allocations
[openafs.git] / src / WINNT / afsrdr / kernel / lib / AFSGeneric.cpp
index dd342cb..faca71c 100644 (file)
@@ -693,13 +693,18 @@ AFSInitializeGlobalDirectoryEntries()
 
             AFSDeleteObjectInfo( pObjectInfoCB);
 
-            AFSDbgLogMsg( AFS_SUBSYSTEM_LOAD_LIBRARY | AFS_SUBSYSTEM_INIT_PROCESSING,
+            AFSDbgLogMsg( AFS_SUBSYSTEM_LOAD_LIBRARY | AFS_SUBSYSTEM_INIT_PROCESSING | AFS_SUBSYSTEM_DIRENTRY_ALLOCATION,
                           AFS_TRACE_LEVEL_ERROR,
                           "AFSInitializeGlobalDirectory AFS_DIR_ENTRY_TAG allocation failure\n");
 
             try_return( ntStatus = STATUS_INSUFFICIENT_RESOURCES);
         }
 
+        AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_ALLOCATION,
+                      AFS_TRACE_LEVEL_VERBOSE,
+                      "AFSInitializeGlobalDirectory AFS_DIR_ENTRY_TAG allocated %p\n",
+                      pDirNode);
+
         pNonPagedDirEntry = (AFSNonPagedDirectoryCB *)AFSLibExAllocatePoolWithTag( NonPagedPool,
                                                                                    sizeof( AFSNonPagedDirectoryCB),
                                                                                    AFS_DIR_ENTRY_NP_TAG);
@@ -799,11 +804,20 @@ AFSInitializeGlobalDirectoryEntries()
         if( pDirNode == NULL)
         {
 
+            AFSDbgLogMsg( AFS_SUBSYSTEM_LOAD_LIBRARY | AFS_SUBSYSTEM_INIT_PROCESSING | AFS_SUBSYSTEM_DIRENTRY_ALLOCATION,
+                          AFS_TRACE_LEVEL_ERROR,
+                          "AFSInitializeGlobalDirectoryEntries AFS_DIR_ENTRY_TAG allocation failure\n");
+
             AFSDeleteObjectInfo( pObjectInfoCB);
 
             try_return( ntStatus = STATUS_INSUFFICIENT_RESOURCES);
         }
 
+        AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_ALLOCATION,
+                      AFS_TRACE_LEVEL_VERBOSE,
+                      "AFSInitializeGlobalDirectoryEntries AFS_DIR_ENTRY_TAG allocated %p\n",
+                      pDirNode);
+
         pNonPagedDirEntry = (AFSNonPagedDirectoryCB *)AFSLibExAllocatePoolWithTag( NonPagedPool,
                                                                                    sizeof( AFSNonPagedDirectoryCB),
                                                                                    AFS_DIR_ENTRY_NP_TAG);
@@ -1004,6 +1018,11 @@ AFSInitDirEntry( IN AFSObjectInfoCB *ParentObjectInfo,
             try_return( ntStatus = STATUS_INSUFFICIENT_RESOURCES);
         }
 
+        AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_ALLOCATION,
+                      AFS_TRACE_LEVEL_VERBOSE,
+                      "AFSInitDirEntry AFS_DIR_ENTRY_TAG allocated %p\n",
+                      pDirNode);
+
         pNonPagedDirEntry = (AFSNonPagedDirectoryCB *)AFSExAllocatePoolWithTag( NonPagedPool,
                                                                                 sizeof( AFSNonPagedDirectoryCB),
                                                                                 AFS_DIR_ENTRY_NP_TAG);
@@ -1187,6 +1206,11 @@ try_exit:
             if( pDirNode != NULL)
             {
 
+                AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_ALLOCATION,
+                              AFS_TRACE_LEVEL_VERBOSE,
+                              "AFSInitDirEntry AFS_DIR_ENTRY_TAG deallocating %p\n",
+                              pDirNode);
+
                 AFSExFreePoolWithTag( pDirNode, AFS_DIR_ENTRY_TAG);
 
                 pDirNode = NULL;
@@ -4343,6 +4367,11 @@ AFSInitializeSpecialShareNameList()
             try_return( ntStatus = STATUS_INSUFFICIENT_RESOURCES);
         }
 
+        AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_ALLOCATION,
+                      AFS_TRACE_LEVEL_VERBOSE,
+                      "AFSInitializeSpecialShareNameList (srvsvc) AFS_DIR_ENTRY_TAG allocated %p\n",
+                      pDirNode);
+
         pNonPagedDirEntry = (AFSNonPagedDirectoryCB *)AFSLibExAllocatePoolWithTag( NonPagedPool,
                                                                                    sizeof( AFSNonPagedDirectoryCB),
                                                                                    AFS_DIR_ENTRY_NP_TAG);
@@ -4431,6 +4460,11 @@ AFSInitializeSpecialShareNameList()
             try_return( ntStatus = STATUS_INSUFFICIENT_RESOURCES);
         }
 
+        AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_ALLOCATION,
+                      AFS_TRACE_LEVEL_VERBOSE,
+                      "AFSInitializeSpecialShareNameList (ipc$) AFS_DIR_ENTRY_TAG allocated %p\n",
+                      pDirNode);
+
         pNonPagedDirEntry = (AFSNonPagedDirectoryCB *)AFSLibExAllocatePoolWithTag( NonPagedPool,
                                                                                    sizeof( AFSNonPagedDirectoryCB),
                                                                                    AFS_DIR_ENTRY_NP_TAG);
@@ -5859,6 +5893,11 @@ AFSInitPIOCtlDirectoryCB( IN AFSObjectInfoCB *ObjectInfo)
             try_return( ntStatus = STATUS_INSUFFICIENT_RESOURCES);
         }
 
+        AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_ALLOCATION,
+                      AFS_TRACE_LEVEL_VERBOSE,
+                      "AFSInitPIOCtlDirectoryCB AFS_DIR_ENTRY_TAG allocated %p\n",
+                      pDirNode);
+
         pNonPagedDirEntry = (AFSNonPagedDirectoryCB *)AFSExAllocatePoolWithTag( NonPagedPool,
                                                                                 sizeof( AFSNonPagedDirectoryCB),
                                                                                 AFS_DIR_ENTRY_NP_TAG);
@@ -5935,6 +5974,11 @@ try_exit:
             if ( pDirNode != NULL)
             {
 
+                AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_ALLOCATION,
+                              AFS_TRACE_LEVEL_VERBOSE,
+                              "AFSInitPIOCtlDirectoryCB AFS_DIR_ENTRY_TAG deallocating %p\n",
+                              pDirNode);
+
                 AFSExFreePoolWithTag( pDirNode, AFS_DIR_ENTRY_TAG);
             }