git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karsten Blees <karsten.blees@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Git List <git@vger.kernel.org>,
	msysGit <msysgit@googlegroups.com>,
	 Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [RFC/PATCH v4 2/3] add trace_performance facility to debug performance issues
Date: Wed, 21 May 2014 20:34:47 +0200	[thread overview]
Message-ID: <537CF1C7.6030408@gmail.com> (raw)
In-Reply-To: <20140521165806.GD2040@sigill.intra.peff.net>

Am 21.05.2014 18:58, schrieb Jeff King:
> On Tue, May 20, 2014 at 09:11:19PM +0200, Karsten Blees wrote:
> 
>> Add trace_performance and trace_performance_since macros that print file
>> name, line number, time and an optional printf-formatted text to the file
>> specified in environment variable GIT_TRACE_PERFORMANCE.
>>
>> Unless enabled via GIT_TRACE_PERFORMANCE, these macros have no noticeable
>> impact on performance, so that test code may be shipped in release builds.
>>
>> MSVC: variadic macros (__VA_ARGS__) require VC++ 2005 or newer.
> 
> I think we still have some Unix compilers that do not do variadic
> macros, either. For a while, people were compiling with antique stuff
> like SUNWspro and MIPSpro. I don't know if they still do, if they use
> gcc on such systems now, or if those systems have finally been
> decomissioned.
> 
> But either we need to change our stance on variadic macros, or this
> feature needs to be able to be compiled conditionally.
> 
> -Peff
> 

Macros are mainly used to supply __FILE__ and __LINE__, so that lazy people don't need to think of a unique message for each use of trace_performance_*. Without __FILE__, __LINE__ and message, the output would be pretty useless (i.e. just the time without any additional info).

If there's platforms that don't support variadic macros, I'd suggest to drop the __FILE__ __LINE__ feature completely and make message mandatory (with the added benefit that manually provided messages don't change if the code is moved, i.e. trace logs would become somewhat comparable across versions).

(adding cc: Dscho as IIRC the __FILE__ __LINE__ idea was originally his).

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  reply	other threads:[~2014-05-21 18:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <537BA806.50600@gmail.com>
2014-05-20 19:11 ` [RFC/PATCH v4 1/3] add high resolution timer function to debug performance issues Karsten Blees
2014-05-21  7:31   ` Noel Grandin
2014-05-21  9:14     ` Karsten Blees
2014-05-21 22:14   ` Richard Hansen
2014-05-21 22:17     ` Richard Hansen
2014-05-22  1:33     ` Karsten Blees
2014-05-20 19:11 ` [RFC/PATCH v4 2/3] add trace_performance facility " Karsten Blees
2014-05-21 16:58   ` Jeff King
2014-05-21 18:34     ` Karsten Blees [this message]
2014-05-21 20:55       ` Jeff King
2014-05-20 19:11 ` [RFC/PATCH v4 3/3] add command performance tracing to debug scripted commands Karsten Blees
2014-05-21 16:55   ` Jeff King
2014-05-21 17:38     ` Junio C Hamano
2014-05-22  0:40     ` Karsten Blees
2014-05-22  9:59       ` Jeff King
2014-05-23 14:43         ` Karsten Blees
2014-05-23 20:21           ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=537CF1C7.6030408@gmail.com \
    --to=karsten.blees@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=msysgit@googlegroups.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).