Skip to content

Commit 5f7eb82

Browse files
jeffhostetlerdscho
authored andcommitted
trace2:gvfs:experiment: add region to cache_tree_fully_valid()
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
1 parent 1eafd8c commit 5f7eb82

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

‎cache-tree.c‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ static void discard_unused_subtrees(struct cache_tree *it)
233233
}
234234
}
235235

236-
int cache_tree_fully_valid(struct cache_tree *it)
236+
static int cache_tree_fully_valid_1(struct cache_tree *it)
237237
{
238238
int i;
239239
if (!it)
@@ -243,7 +243,7 @@ int cache_tree_fully_valid(struct cache_tree *it)
243243
HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
244244
return 0;
245245
for (i = 0; i < it->subtree_nr; i++) {
246-
if (!cache_tree_fully_valid(it->down[i]->cache_tree))
246+
if (!cache_tree_fully_valid_1(it->down[i]->cache_tree))
247247
return 0;
248248
}
249249
return 1;
@@ -254,6 +254,17 @@ static int must_check_existence(const struct cache_entry *ce)
254254
return !(repo_has_promisor_remote(the_repository) && ce_skip_worktree(ce));
255255
}
256256

257+
int cache_tree_fully_valid(struct cache_tree *it)
258+
{
259+
int result;
260+
261+
trace2_region_enter("cache_tree", "fully_valid", NULL);
262+
result = cache_tree_fully_valid_1(it);
263+
trace2_region_leave("cache_tree", "fully_valid", NULL);
264+
265+
return result;
266+
}
267+
257268
static int update_one(struct cache_tree *it,
258269
struct cache_entry **cache,
259270
int entries,

0 commit comments

Comments
 (0)