apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1675967 - in /apr/apr/trunk: CHANGES memory/unix/apr_pools.c
Date Fri, 24 Apr 2015 22:31:24 GMT
Author: brane
Date: Fri Apr 24 22:31:23 2015
New Revision: 1675967

URL: http://svn.apache.org/r1675967
Log:
Fix pool debugging output so that creation events are
always emitted before allocation events and subpool destruction
events are emitted on pool clear/destroy for proper accounting.

Modified:
    apr/apr/trunk/CHANGES
    apr/apr/trunk/memory/unix/apr_pools.c

Modified: apr/apr/trunk/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/trunk/CHANGES?rev=1675967&r1=1675966&r2=1675967&view=diff
==============================================================================
--- apr/apr/trunk/CHANGES [utf-8] (original)
+++ apr/apr/trunk/CHANGES [utf-8] Fri Apr 24 22:31:23 2015
@@ -1,6 +1,11 @@
                                                      -*- coding: utf-8 -*-
 Changes for APR 2.0.0
 
+  *) apr_pools: Fix pool debugging output so that creation events are
+     always emitted before allocation events and subpool destruction
+     events are emitted on pool clear/destroy for proper accounting.
+     [Brane ─îibej]
+
   *) apr_atomic: Fix errors when building on Visual Studio 2013 while
      maintaining the ability to build on Visual Studio 6 with Windows
      Server 2003 R2 SDK. PR 57191. [Gregg Smith]

Modified: apr/apr/trunk/memory/unix/apr_pools.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/memory/unix/apr_pools.c?rev=1675967&r1=1675966&r2=1675967&view=diff
==============================================================================
--- apr/apr/trunk/memory/unix/apr_pools.c (original)
+++ apr/apr/trunk/memory/unix/apr_pools.c Fri Apr 24 22:31:23 2015
@@ -1857,10 +1857,6 @@ APR_DECLARE(void) apr_pool_clear_debug(a
 
     apr_pool_check_lifetime(pool);
 
-#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE)
-    apr_pool_log_event(pool, "CLEAR", file_line, 1);
-#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE) */
-
 #if APR_HAS_THREADS
     if (pool->parent != NULL)
         mutex = pool->parent->mutex;
@@ -1876,6 +1872,10 @@ APR_DECLARE(void) apr_pool_clear_debug(a
 
     pool_clear_debug(pool, file_line);
 
+#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE)
+    apr_pool_log_event(pool, "CLEAR", file_line, 1);
+#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE) */
+
 #if APR_HAS_THREADS
     /* If we had our own mutex, it will have been destroyed by
      * the registered cleanups.  Recreate the mutex.  Unlock
@@ -1900,12 +1900,12 @@ static void pool_destroy_debug(apr_pool_
 {
     apr_pool_check_lifetime(pool);
 
+    pool_clear_debug(pool, file_line);
+
 #if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE)
     apr_pool_log_event(pool, "DESTROY", file_line, 1);
 #endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE) */
 
-    pool_clear_debug(pool, file_line);
-
     /* Remove the pool from the parents child list */
     if (pool->parent) {
 #if APR_HAS_THREADS
@@ -2014,6 +2014,9 @@ APR_DECLARE(apr_status_t) apr_pool_creat
     pool->owner_proc = (apr_os_proc_t)getnlmhandle();
 #endif /* defined(NETWARE) */
 
+#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE)
+    apr_pool_log_event(pool, "CREATE", file_line, 1);
+#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE) */
 
     if (parent == NULL || parent->allocator != allocator) {
 #if APR_HAS_THREADS
@@ -2043,10 +2046,6 @@ APR_DECLARE(apr_status_t) apr_pool_creat
 
     *newpool = pool;
 
-#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE)
-    apr_pool_log_event(pool, "CREATE", file_line, 1);
-#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE) */
-
     return APR_SUCCESS;
 }
 
@@ -2091,6 +2090,10 @@ APR_DECLARE(apr_status_t) apr_pool_creat
     }
     pool->allocator = pool_allocator;
 
+#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE)
+    apr_pool_log_event(pool, "CREATEU", file_line, 1);
+#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE) */
+
     if (pool->allocator != allocator) {
 #if APR_HAS_THREADS
         apr_status_t rv;
@@ -2113,10 +2116,6 @@ APR_DECLARE(apr_status_t) apr_pool_creat
 
     *newpool = pool;
 
-#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE)
-    apr_pool_log_event(pool, "CREATEU", file_line, 1);
-#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE) */
-
     return APR_SUCCESS;
 }
 



Mime
View raw message