All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RFC 0/8] refactor trace code
@ 2011-02-24 14:23 Jeff King
  2011-02-24 14:26 ` [RFC/PATCH 1/8] compat: provide a fallback va_copy definition Jeff King
                   ` (7 more replies)
  0 siblings, 8 replies; 32+ messages in thread
From: Jeff King @ 2011-02-24 14:23 UTC (permalink / raw)
  To: Jonathan Nieder, Nguyen Thai Ngoc Duy; +Cc: git

A few weeks ago in:

  http://article.gmane.org/gmane.comp.version-control.git/165496

we discussed the possibility of removing the repo setup trace lines. I
mentioned that I had also recently done some debug code that would not
be appropriate to show all the time with GIT_TRACE. So here is a series
that jumbles it all together: refactors the trace code to handle
multiple environment variables, adds packet-tracing code on its own
variable, and puts the repo setup traces on their own variable.

With this, you can do:

  GIT_TRACE=1 \
  GIT_TRACE_PACKET=/tmp/packet.dump \
  GIT_TRACE_SETUP=0 \
  git whatever

There may be a few other places where it is worth either pushing some
traces to their variable (I think the notes merge code has some
debugging traces in it), or places where existing debugging code could
be enabled (e.g., there is some diffcore debugging code that I sometimes
turn on; it is not even compiled by default, but this would give a nice
way of pushing that decision to runtime).

I have mixed feelings on adding a bunch of debugging code. On the one
hand, it's mostly dead code that nobody runs. On the other hand, it is
sometimes really helpful to be able to tell a user "run with this
environment variable and tell us what it says" without having to get
them to apply a custom patch.

  [1/8]: compat: provide a fallback va_copy definition
  [2/8]: strbuf: add strbuf_addv
  [3/8]: trace: add trace_vprintf
  [4/8]: trace: refactor to support multiple env variables
  [5/8]: trace: factor out "do we want to trace" logic
  [6/8]: trace: add trace_strbuf
  [7/8]: add packet tracing debug code
  [8/8]: trace: give repo_setup trace its own key

-Peff

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2011-03-08 20:59 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-24 14:23 [PATCH/RFC 0/8] refactor trace code Jeff King
2011-02-24 14:26 ` [RFC/PATCH 1/8] compat: provide a fallback va_copy definition Jeff King
2011-02-24 15:57   ` Erik Faye-Lund
2011-03-08  8:33     ` [PATCH jk/strbuf-vaddf] compat: fall back on __va_copy if available Jonathan Nieder
2011-03-08 20:09       ` Junio C Hamano
2011-03-08 20:59         ` Jonathan Nieder
2011-02-24 20:33   ` [RFC/PATCH 1/8] compat: provide a fallback va_copy definition Jonathan Nieder
2011-02-24 14:27 ` [PATCH 2/8] strbuf: add strbuf_addv Jeff King
2011-02-24 15:05   ` Christian Couder
2011-02-24 15:07     ` Jeff King
2011-02-24 20:51   ` Jonathan Nieder
2011-02-24 14:28 ` [PATCH 3/8] trace: add trace_vprintf Jeff King
2011-02-24 21:08   ` Jonathan Nieder
2011-02-24 14:28 ` [PATCH 4/8] trace: refactor to support multiple env variables Jeff King
2011-02-24 18:25   ` Junio C Hamano
2011-02-24 19:02     ` Jeff King
2011-02-24 19:44       ` Junio C Hamano
2011-02-24 19:48         ` Jeff King
2011-02-24 20:50           ` Junio C Hamano
2011-02-24 21:23   ` Jonathan Nieder
2011-02-24 14:28 ` [PATCH 5/8] trace: factor out "do we want to trace" logic Jeff King
2011-02-24 15:07   ` Christian Couder
2011-02-24 14:29 ` [PATCH 6/8] trace: add trace_strbuf Jeff King
2011-02-24 14:30 ` [PATCH 7/8] add packet tracing debug code Jeff King
2011-02-24 21:44   ` Jonathan Nieder
2011-02-24 14:30 ` [PATCH 8/8] trace: give repo_setup trace its own key Jeff King
2011-02-24 15:59   ` Andreas Ericsson
2011-02-24 16:05     ` Jeff King
2011-02-24 20:01       ` Christian Couder
2011-02-24 21:49   ` Jonathan Nieder
2011-02-25  6:38     ` Nguyen Thai Ngoc Duy
2011-02-26  8:34   ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.