[PATCH 2/2] trace: improve performance while category is disabled

2017-11-26 Thread gennady . kupava
From: Gennady Kupava <gkup...@bloomberg.net> - Do the check if the trace key is enabled sooner in call chain. - Move just enough code from trace.c into trace.h header so all code necessary to determine that trace is disabled could be inlined to calling functions. Signed-off-by: G

[PATCH 1/2] trace: remove trace key normalization

2017-11-26 Thread gennady . kupava
From: Gennady Kupava <gkup...@bloomberg.net> 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

Re: [PATCH 2/2] trace: improve performance while category is disabled

2017-11-27 Thread Gennady Kupava
> Spotted yet another. This function in a header file, that is included by many source files, must be made "static inline" (which I already did as without the fix I couldn't get 'pu' to compile). Thanks, missed that, seems my compiler inlined all calls and I didn't notice the problem. On 27

[PATCH] Reduce performance penalty for turned off traces

2017-11-11 Thread gennady . kupava
From: Gennady Kupava <gkup...@bloomberg.net> Signed-off-by: Gennady Kupava <gkup...@bloomberg.net> --- One of the tasks siggested in scope of 'Git sprint weekend'. Couple of chioces made here: 1. Use constant instead of NULL to indicate default trace level, this just makes everything

Re: [PATCH 2/2] Reduce performance cost of the trace if trace category is disabled

2017-11-19 Thread Gennady Kupava
Right, this trace is actually not used anywhere, so only check was compilation. Will fix that. On 19 November 2017 at 08:27, Johannes Sixt wrote: > Am 19.11.2017 um 01:42 schrieb gennady.kup...@gmail.com: >> >> +#define trace_printf_key(key, ...) >> \ >> + do { >> \ >> +

Re: [PATCH 1/2] Simplify tracing code by removing trace key normalization concept

2017-11-19 Thread Gennady Kupava
re sense now? Gennady On 19 November 2017 at 02:19, Junio C Hamano <gits...@pobox.com> wrote: > gennady.kup...@gmail.com writes: > >> Subject: Re: [PATCH 1/2] Simplify tracing code by removing trace key >> normalization concept > > The usual style comment on the s

[PATCH 2/2] Reduce performance cost of the trace if trace category is disabled

2017-11-18 Thread gennady . kupava
From: Gennady Kupava <gkup...@bloomberg.net> - Do the check if the trace key is enabled sooner in call chain. - Move just enough code from trace.c into trace.h header so all code necessary to determine that trace is disabled could be inlined to calling functions. Signed-off-by: G

[PATCH 1/2] Simplify tracing code by removing trace key normalization concept

2017-11-18 Thread gennady . kupava
From: Gennady Kupava <gkup...@bloomberg.net> - to implement efficient traces with normalization, normalization implementation should be moved to header. as it seems better to not overload header file with this normalization logic, suggestion is just to remove it - different macro

Re: [PATCH] Reduce performance penalty for turned off traces

2017-11-12 Thread Gennady Kupava
8:58PM +, gennady.kup...@gmail.com wrote: > > > From: Gennady Kupava <gkup...@bloomberg.net> > > > > Signed-off-by: Gennady Kupava <gkup...@bloomberg.net> > > Thanks, and welcome to the list. > > > > --- > > One of the tasks sigges