summaryrefslogtreecommitdiff
path: root/trace.h
diff options
context:
space:
mode:
authorGennady Kupava <gkupava@bloomberg.net>2017-11-26 20:11:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-11-27 01:19:08 (GMT)
commit406102a731145d39c497e384857ac9f9d2bdccb2 (patch)
treeaa278df9b1d8512356bed74e4b41359f251afb35 /trace.h
parent14c63a9dc093d6738454f6369a4f5663ca732cf7 (diff)
downloadgit-406102a731145d39c497e384857ac9f9d2bdccb2.zip
git-406102a731145d39c497e384857ac9f9d2bdccb2.tar.gz
git-406102a731145d39c497e384857ac9f9d2bdccb2.tar.bz2
trace: remove trace key normalization
Trace key normalization is not used, not strictly necessary, complicates the code and would negatively affect compilation speed if moved to header. New trace_default_key key or existing separate marco could be used instead of passing NULL as a key. Signed-off-by: Gennady Kupava <gkupava@bloomberg.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'trace.h')
-rw-r--r--trace.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/trace.h b/trace.h
index 179b249..24b32f8 100644
--- a/trace.h
+++ b/trace.h
@@ -11,6 +11,8 @@ struct trace_key {
unsigned int need_close : 1;
};
+extern struct trace_key trace_default_key;
+
#define TRACE_KEY_INIT(name) { "GIT_TRACE_" #name, 0, 0, 0 }
extern void trace_repo_setup(const char *prefix);
@@ -78,7 +80,7 @@ extern void trace_performance_since(uint64_t start, const char *format, ...);
*/
#define trace_printf(...) \
- trace_printf_key_fl(TRACE_CONTEXT, __LINE__, NULL, __VA_ARGS__)
+ trace_printf_key_fl(TRACE_CONTEXT, __LINE__, &trace_default_key, __VA_ARGS__)
#define trace_printf_key(key, ...) \
trace_printf_key_fl(TRACE_CONTEXT, __LINE__, key, __VA_ARGS__)