diff options
author | Gennady Kupava <gkupava@bloomberg.net> | 2017-11-26 20:11:18 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-27 10:19:08 +0900 |
commit | 406102a731145d39c497e384857ac9f9d2bdccb2 (patch) | |
tree | aa278df9b1d8512356bed74e4b41359f251afb35 /trace.h | |
parent | 14c63a9dc093d6738454f6369a4f5663ca732cf7 (diff) | |
download | git-406102a731145d39c497e384857ac9f9d2bdccb2.tar.gz git-406102a731145d39c497e384857ac9f9d2bdccb2.tar.xz |
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.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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__) |