Skip to content

Commit 7af9c14

Browse files
jeffhostetlerdscho
authored andcommitted
trace2:gvfs:experiment: add region to cache_tree_fully_valid()
Signed-off-by: Jeff Hostetler <[email protected]>
1 parent 05c7287 commit 7af9c14

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

cache-tree.c

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

237-
int cache_tree_fully_valid(struct cache_tree *it)
237+
static int cache_tree_fully_valid_1(struct cache_tree *it)
238238
{
239239
int i;
240240
if (!it)
@@ -244,7 +244,7 @@ int cache_tree_fully_valid(struct cache_tree *it)
244244
HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
245245
return 0;
246246
for (i = 0; i < it->subtree_nr; i++) {
247-
if (!cache_tree_fully_valid(it->down[i]->cache_tree))
247+
if (!cache_tree_fully_valid_1(it->down[i]->cache_tree))
248248
return 0;
249249
}
250250
return 1;
@@ -255,6 +255,17 @@ static int must_check_existence(const struct cache_entry *ce)
255255
return !(repo_has_promisor_remote(the_repository) && ce_skip_worktree(ce));
256256
}
257257

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

0 commit comments

Comments
 (0)