1. 26 4月, 2019 1 次提交
  2. 16 4月, 2019 4 次提交
  3. 20 3月, 2019 1 次提交
    • T
      trace2: NULL is not allowed for va_list · ad006fe4
      Torsten Bögershausen 提交于
      Some compilers don't allow NULL to be passed for a va_list,
      and e.g. "gcc (Raspbian 6.3.0-18+rpi1+deb9u1) 6.3.0 20170516"
      errors out like this:
       trace2/tr2_tgt_event.c:193:18:
         error: invalid operands to binary &&
         (have ‘int’ and ‘va_list {aka __va_list}’)
          if (fmt && *fmt && ap) {
                             ^^
      I couldn't find any hints that va_list and pointers can be mixed,
      and no hints that they can't either. Morten Welinder comments:
      
      "C99, Section 7.15, simply says that va_list "is an object type suitable for
      holding information needed by the macros va_start, va_end, and
      va_copy". So clearly not guaranteed to be mixable with pointers...
      
      The portable solution is to use "va_list" everywhere in the callchain.
      As a consequence, both trace2_region_enter_fl() and trace2_region_leave_fl()
      now take a variable argument list.
      Signed-off-by: NTorsten Bögershausen <tboegi@web.de>
      Acked-by: NJeff Hostetler <jeffhost@microsoft.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ad006fe4
  4. 23 2月, 2019 1 次提交
    • J
      trace2: create new combined trace facility · ee4512ed
      Jeff Hostetler 提交于
      Create a new unified tracing facility for git.  The eventual intent is to
      replace the current trace_printf* and trace_performance* routines with a
      unified set of git_trace2* routines.
      
      In addition to the usual printf-style API, trace2 provides higer-level
      event verbs with fixed-fields allowing structured data to be written.
      This makes post-processing and analysis easier for external tools.
      
      Trace2 defines 3 output targets.  These are set using the environment
      variables "GIT_TR2", "GIT_TR2_PERF", and "GIT_TR2_EVENT".  These may be
      set to "1" or to an absolute pathname (just like the current GIT_TRACE).
      
      * GIT_TR2 is intended to be a replacement for GIT_TRACE and logs command
        summary data.
      
      * GIT_TR2_PERF is intended as a replacement for GIT_TRACE_PERFORMANCE.
        It extends the output with columns for the command process, thread,
        repo, absolute and relative elapsed times.  It reports events for
        child process start/stop, thread start/stop, and per-thread function
        nesting.
      
      * GIT_TR2_EVENT is a new structured format. It writes event data as a
        series of JSON records.
      
      Calls to trace2 functions log to any of the 3 output targets enabled
      without the need to call different trace_printf* or trace_performance*
      routines.
      Signed-off-by: NJeff Hostetler <jeffhost@microsoft.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ee4512ed