Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932968AbZJLSIe (ORCPT ); Mon, 12 Oct 2009 14:08:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757453AbZJLSId (ORCPT ); Mon, 12 Oct 2009 14:08:33 -0400 Received: from mail-ew0-f208.google.com ([209.85.219.208]:61545 "EHLO mail-ew0-f208.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757449AbZJLSIc (ORCPT ); Mon, 12 Oct 2009 14:08:32 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=IglbSRyExU4FCrsEgmELpXK1K9DbEJ+L2h9dsJIdtuYcreRYWQA741SJYklS8q8M0y e5+s7goI1iLT45A0ekVNA7zBBQteIfY955sZdnrGgPnMtrjZfI+AaPabWYferrU1TvRB GVmREX1M+tAigzXZPCf/MITOK9BpLfPouxA2Q= Date: Mon, 12 Oct 2009 20:07:52 +0200 From: Frederic Weisbecker To: Masami Hiramatsu Cc: Steven Rostedt , Ingo Molnar , lkml , systemtap , DLE , Thomas Gleixner , Arnaldo Carvalho de Melo , Mike Galbraith , Paul Mackerras , Peter Zijlstra , Christoph Hellwig , Ananth N Mavinakayanahalli , Jim Keniston , "Frank Ch. Eigler" Subject: Re: [PATCH tracing/kprobes v4] perf: Add perf probe subcommand for kprobe-event setup helper Message-ID: <20091012180751.GD5059@nowhere> References: <4ACE56EE.8060000@redhat.com> <20091008211737.29299.14784.stgit@dhcp-100-2-132.bos.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091008211737.29299.14784.stgit@dhcp-100-2-132.bos.redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 938 Lines: 33 On Thu, Oct 08, 2009 at 05:17:38PM -0400, Masami Hiramatsu wrote: > +#ifdef DEBUG > +#define debug(fmt ...) \ > + fprintf(stderr, "DBG(" __FILE__ ":" stringify(__LINE__) "): " fmt) > +#else > +#define debug(fmt ...) do {} while (0) > +#endif We have that too: int eprintf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); > +#define ERR_IF(cnd) \ > + do { if (cnd) { \ > + fprintf(stderr, "Error (" __FILE__ ":" stringify(__LINE__) \ > + "): " stringify(cnd) "\n"); \ > + exit(1); \ > + } } while (0) And that would be nice to have in util/debug.h but more perhaps more as a DIE_IF() -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/