You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2012/03/24 20:19:47 UTC
svn commit: r1304888 - in
/subversion/branches/node_pool/subversion/libsvn_fs_fs: dag.c dag.h tree.c
Author: danielsh
Date: Sat Mar 24 19:19:47 2012
New Revision: 1304888
URL: http://svn.apache.org/viewvc?rev=1304888&view=rev
Log:
On the node_pool branch, improve pool usage.
* subversion/libsvn_fs_fs/dag.h
(svn_fs_fs__dag_open): Switch to the dual-pool paradigm.
* subversion/libsvn_fs_fs/dag.c
(svn_fs_fs__dag_open): Switch to the dual-pool paradigm.
(svn_fs_fs__dag_clone_child): Update caller.
* subversion/libsvn_fs_fs/tree.c
(open_path): Update caller.
Modified:
subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.c
subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.h
subversion/branches/node_pool/subversion/libsvn_fs_fs/tree.c
Modified: subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.c?rev=1304888&r1=1304887&r2=1304888&view=diff
==============================================================================
--- subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.c (original)
+++ subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.c Sat Mar 24 19:19:47 2012
@@ -666,7 +666,7 @@ svn_fs_fs__dag_clone_child(dag_node_t **
"Attempted to make a child clone with an illegal name '%s'", name);
/* Find the node named NAME in PARENT's entries list if it exists. */
- SVN_ERR(svn_fs_fs__dag_open(&cur_entry, parent, name, pool));
+ SVN_ERR(svn_fs_fs__dag_open(&cur_entry, parent, name, pool, pool));
/* Check for mutability in the node we found. If it's mutable, we
don't need to clone it. */
@@ -1138,12 +1138,14 @@ svn_error_t *
svn_fs_fs__dag_open(dag_node_t **child_p,
dag_node_t *parent,
const char *name,
- apr_pool_t *pool)
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
const svn_fs_id_t *node_id;
/* Ensure that NAME exists in PARENT's entry list. */
- SVN_ERR(dir_entry_id_from_node(&node_id, parent, name, pool, pool));
+ SVN_ERR(dir_entry_id_from_node(&node_id, parent, name,
+ scratch_pool, scratch_pool));
if (! node_id)
return svn_error_createf
(SVN_ERR_FS_NOT_FOUND, NULL,
@@ -1157,7 +1159,7 @@ svn_fs_fs__dag_open(dag_node_t **child_p
/* Now get the node that was requested. */
return svn_fs_fs__dag_get_node(child_p, svn_fs_fs__dag_get_fs(parent),
- node_id, pool);
+ node_id, result_pool);
}
Modified: subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.h
URL: http://svn.apache.org/viewvc/subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.h?rev=1304888&r1=1304887&r2=1304888&view=diff
==============================================================================
--- subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.h (original)
+++ subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.h Sat Mar 24 19:19:47 2012
@@ -251,16 +251,15 @@ svn_error_t *svn_fs_fs__dag_clone_root(d
/* Open the node named NAME in the directory PARENT. Set *CHILD_P to
- the new node, allocated in POOL. NAME must be a single path
+ the new node, allocated in RESULT_POOL. NAME must be a single path
component; it cannot be a slash-separated directory path.
-
- Use POOL for all allocations, including to cache the node_revision in
- PARENT.
*/
-svn_error_t *svn_fs_fs__dag_open(dag_node_t **child_p,
- dag_node_t *parent,
- const char *name,
- apr_pool_t *pool);
+svn_error_t *
+svn_fs_fs__dag_open(dag_node_t **child_p,
+ dag_node_t *parent,
+ const char *name,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
/* Set *ENTRIES_P to a hash table of NODE's entries. The keys of the
Modified: subversion/branches/node_pool/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/node_pool/subversion/libsvn_fs_fs/tree.c?rev=1304888&r1=1304887&r2=1304888&view=diff
==============================================================================
--- subversion/branches/node_pool/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/node_pool/subversion/libsvn_fs_fs/tree.c Sat Mar 24 19:19:47 2012
@@ -642,7 +642,7 @@ open_path(parent_path_t **parent_path_p,
if (cached_node)
child = cached_node;
else
- err = svn_fs_fs__dag_open(&child, here, entry, pool);
+ err = svn_fs_fs__dag_open(&child, here, entry, pool, pool);
/* "file not found" requires special handling. */
if (err && err->apr_err == SVN_ERR_FS_NOT_FOUND)