Skip to content

trace2:gvfs:experiment: add region for prime_cache_tree() #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions builtin/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ static int reset_index(const struct object_id *oid, int reset_type, int quiet)

if (reset_type == MIXED || reset_type == HARD) {
tree = parse_tree_indirect(oid);
trace2_region_enter("exp", "prime_cache_tree", the_repository);
prime_cache_tree(the_repository, the_repository->index, tree);
trace2_region_leave("exp", "prime_cache_tree", the_repository);
}

ret = 0;
Expand Down
4 changes: 4 additions & 0 deletions cache-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,10 +715,14 @@ void prime_cache_tree(struct repository *r,
struct index_state *istate,
struct tree *tree)
{
trace2_region_enter("cache_tree", "prime_cache_tree", r);

cache_tree_free(&istate->cache_tree);
istate->cache_tree = cache_tree();
prime_cache_tree_rec(r, istate->cache_tree, tree);
istate->cache_changed |= CACHE_TREE_CHANGED;

trace2_region_leave("cache_tree", "prime_cache_tree", r);
}

/*
Expand Down