From b23b112dfe8eceb39eaaea2d5e60d971c4371aa0 Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Tue, 29 Apr 2014 11:29:49 -0700 Subject: Add payloads, bitmaps to trace API This is a proposed adjustment to the trace APIs. This makes the trace levels into a bitmask so that they can be selectively enabled and adds a callback-level payload, plus a message-level payload. This makes it easier for me to a GIT_TRACE_PERF callbacks that are simply bypassed if the PERF level is not set. --- src/iterator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/iterator.c') diff --git a/src/iterator.c b/src/iterator.c index bebdeba84..0d7e5918d 100644 --- a/src/iterator.c +++ b/src/iterator.c @@ -1018,7 +1018,7 @@ static int fs_iterator__expand_dir(fs_iterator *fi) return GIT_ENOTFOUND; } - git_trace(GIT_TRACE_TRACE, "stat=%ld", (long)ff->entries.length); + git_trace(GIT_TRACE_PERF, &ff->entries.length, "stat"); fs_iterator__seek_frame_start(fi, ff); @@ -1310,7 +1310,7 @@ static int workdir_iterator__enter_dir(fs_iterator *fi) if (!S_ISDIR(entry->st.st_mode) || !strcmp(GIT_DIR, entry->path)) continue; - git_trace(GIT_TRACE_TRACE, "submodule_lookup=1"); + git_trace(GIT_TRACE_PERF, entry->path, "submodule_lookup"); if (git_submodule__is_submodule(fi->base.repo, entry->path)) { entry->st.st_mode = GIT_FILEMODE_COMMIT; entry->path_len--; -- cgit v1.2.3