Message ID | 86f12dc77dd94c1b2c6294842d29d8712f79e3d7.1566313865.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | New sparse-checkout builtin and "cone" mode | expand |
On Tue, Aug 20, 2019 at 8:12 AM Jeff Hostetler via GitGitGadget <gitgitgadget@gmail.com> wrote: > > From: Jeff Hostetler <jeffhost@microsoft.com> Can the commit summary be turned into English? > The clear_ce_flags_1 method is used by many types of calls to > unpack_trees(). Add trace2 regions around the method, including > some flag information, so we can get granular performance data > during experiments. It might be nice to have some words in the cover letter about why this patch is included in this series instead of being a separate submission. I'm not familiar with the trace2 stuff yet; this looks probably useful, but the commit message makes it sound like something general rather than specific to this series. > Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> > Signed-off-by: Derrick Stolee <dstolee@microsoft.com> > --- <snip>
diff --git a/unpack-trees.c b/unpack-trees.c index 62276d4fef..8c3b5e8849 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -1397,15 +1397,23 @@ static int clear_ce_flags(struct index_state *istate, struct exclude_list *el) { static struct strbuf prefix = STRBUF_INIT; + char label[100]; + int rval; strbuf_reset(&prefix); - return clear_ce_flags_1(istate, + xsnprintf(label, sizeof(label), "clear_ce_flags(0x%08lx,0x%08lx)", + (unsigned long)select_mask, (unsigned long)clear_mask); + trace2_region_enter("exp", label, the_repository); + rval = clear_ce_flags_1(istate, istate->cache, istate->cache_nr, &prefix, select_mask, clear_mask, el, 0); + trace2_region_leave("exp", label, the_repository); + + return rval; } /*