Skip to content

Commit 1c2e3dc

Browse files
committed
trace2:gvfs:experiment: add region to cache_tree_fully_valid()
Signed-off-by: Jeff Hostetler <[email protected]>
1 parent 39bcfc4 commit 1c2e3dc

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
@@ -221,20 +221,31 @@ static void discard_unused_subtrees(struct cache_tree *it)
221221
}
222222
}
223223

224-
int cache_tree_fully_valid(struct cache_tree *it)
224+
static int cache_tree_fully_valid_1(struct cache_tree *it)
225225
{
226226
int i;
227227
if (!it)
228228
return 0;
229229
if (it->entry_count < 0 || !has_object_file(&it->oid))
230230
return 0;
231231
for (i = 0; i < it->subtree_nr; i++) {
232-
if (!cache_tree_fully_valid(it->down[i]->cache_tree))
232+
if (!cache_tree_fully_valid_1(it->down[i]->cache_tree))
233233
return 0;
234234
}
235235
return 1;
236236
}
237237

238+
int cache_tree_fully_valid(struct cache_tree *it)
239+
{
240+
int result;
241+
242+
trace2_region_enter("cache_tree", "fully_valid", NULL);
243+
result = cache_tree_fully_valid_1(it);
244+
trace2_region_leave("cache_tree", "fully_valid", NULL);
245+
246+
return result;
247+
}
248+
238249
static int update_one(struct cache_tree *it,
239250
struct cache_entry **cache,
240251
int entries,

0 commit comments

Comments
 (0)