subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1661394 - in /subversion/branches/fsx-1.10/subversion/libsvn_fs_x: dag.c dag.h dag_cache.c
Date Sat, 21 Feb 2015 16:49:24 GMT
Author: stefan2
Date: Sat Feb 21 16:49:24 2015
New Revision: 1661394

URL: http://svn.apache.org/r1661394
Log:
On the fsx-1.10 branch: 
Let's get rid of the "smart" FSX DAG node copying function.  By now, all
callers know that they very, very likely actually need to copy the node.
The "smart" function can't eliminate those copies anymore.

* subversion/libsvn_fs_x/dag.h
  (svn_fs_x__dag_copy_into_pool): Remove.

* subversion/libsvn_fs_x/dag.c
  (svn_fs_x__dag_copy_into_pool): Remove.

* subversion/libsvn_fs_x/dag_cache.c
  (svn_fs_x__update_dag_cache,
   make_parent_path,
   svn_fs_x__get_dag_node): Directly call the unconditional copy function.

Modified:
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.c
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.h
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag_cache.c

Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.c?rev=1661394&r1=1661393&r2=1661394&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.c Sat Feb 21 16:49:24 2015
@@ -925,14 +925,6 @@ svn_fs_x__dag_dup(const dag_node_t *node
   return new_node;
 }
 
-dag_node_t *
-svn_fs_x__dag_copy_into_pool(dag_node_t *node,
-                             apr_pool_t *result_pool)
-{
-  return (node->node_pool == result_pool
-            ? node
-            : svn_fs_x__dag_dup(node, result_pool));
-}
 
 svn_error_t *
 svn_fs_x__dag_open(dag_node_t **child_p,

Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.h?rev=1661394&r1=1661393&r2=1661394&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.h (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.h Sat Feb 21 16:49:24 2015
@@ -82,12 +82,6 @@ dag_node_t *
 svn_fs_x__dag_dup(const dag_node_t *node,
                   apr_pool_t *result_pool);
 
-/* If NODE has been allocated in POOL, return NODE.  Otherwise, return
-   a copy created in RESULT_POOL with svn_fs_fs__dag_dup. */
-dag_node_t *
-svn_fs_x__dag_copy_into_pool(dag_node_t *node,
-                             apr_pool_t *result_pool);
-
 /* Return the filesystem containing NODE.  */
 svn_fs_t *
 svn_fs_x__dag_get_fs(dag_node_t *node);

Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag_cache.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag_cache.c?rev=1661394&r1=1661393&r2=1661394&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag_cache.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag_cache.c Sat Feb 21 16:49:24 2015
@@ -437,7 +437,7 @@ svn_fs_x__update_dag_cache(dag_node_t *n
   auto_clear_dag_cache(cache);
   bucket = cache_lookup(cache, svn_fs_x__dag_get_id(node)->change_set,
                         normalize_path(&normalized, path));
-  bucket->node = svn_fs_x__dag_copy_into_pool(node, cache->pool);
+  bucket->node = svn_fs_x__dag_dup(node, cache->pool);
 }
 
 void
@@ -841,7 +841,7 @@ make_parent_path(dag_node_t *node,
   svn_fs_x__dag_path_t *dag_path
     = apr_pcalloc(result_pool, sizeof(*dag_path));
   if (node)
-    dag_path->node = svn_fs_x__dag_copy_into_pool(node, result_pool);
+    dag_path->node = svn_fs_x__dag_dup(node, result_pool);
   dag_path->entry = apr_pstrmemdup(result_pool, entry->data, entry->len);
   dag_path->parent = parent;
   dag_path->copy_inherit = svn_fs_x__copy_id_inherit_unknown;
@@ -1073,7 +1073,7 @@ svn_fs_x__get_dag_node(dag_node_t **dag_
     SVN_ERR(walk_dag_path(&node, root, &normalized, pool));
 
   /* We want the returned node to live in POOL. */
-  *dag_node_p = svn_fs_x__dag_copy_into_pool(node, pool);
+  *dag_node_p = svn_fs_x__dag_dup(node, pool);
 
   return SVN_NO_ERROR;
 }



Mime
View raw message