trace2:gvfs:experiment: add region to cache_tree_fully_valid()

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
This commit is contained in:
Jeff Hostetler 2019-07-16 10:16:37 -04:00 коммит произвёл Johannes Schindelin
Родитель 960cd8aa89
Коммит 5b2520ffb4
1 изменённых файлов: 13 добавлений и 2 удалений

Просмотреть файл

@ -230,7 +230,7 @@ static void discard_unused_subtrees(struct cache_tree *it)
}
}
int cache_tree_fully_valid(struct cache_tree *it)
static int cache_tree_fully_valid_1(struct cache_tree *it)
{
int i;
if (!it)
@ -238,7 +238,7 @@ int cache_tree_fully_valid(struct cache_tree *it)
if (it->entry_count < 0 || !repo_has_object_file(the_repository, &it->oid))
return 0;
for (i = 0; i < it->subtree_nr; i++) {
if (!cache_tree_fully_valid(it->down[i]->cache_tree))
if (!cache_tree_fully_valid_1(it->down[i]->cache_tree))
return 0;
}
return 1;
@ -249,6 +249,17 @@ static int must_check_existence(const struct cache_entry *ce)
return !(repo_has_promisor_remote(the_repository) && ce_skip_worktree(ce));
}
int cache_tree_fully_valid(struct cache_tree *it)
{
int result;
trace2_region_enter("cache_tree", "fully_valid", NULL);
result = cache_tree_fully_valid_1(it);
trace2_region_leave("cache_tree", "fully_valid", NULL);
return result;
}
static int update_one(struct cache_tree *it,
struct cache_entry **cache,
int entries,