[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4AD37CB0.8060302@redhat.com>
Date: Mon, 12 Oct 2009 15:00:00 -0400
From: Masami Hiramatsu <mhiramat@...hat.com>
To: Frederic Weisbecker <fweisbec@...il.com>
CC: Steven Rostedt <rostedt@...dmis.org>, Ingo Molnar <mingo@...e.hu>,
lkml <linux-kernel@...r.kernel.org>,
systemtap <systemtap@...rces.redhat.com>,
DLE <dle-develop@...ts.sourceforge.net>,
Thomas Gleixner <tglx@...utronix.de>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Mike Galbraith <efault@....de>,
Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Christoph Hellwig <hch@...radead.org>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Jim Keniston <jkenisto@...ibm.com>,
"Frank Ch. Eigler" <fche@...hat.com>
Subject: Re: [PATCH tracing/kprobes v4] perf: Add perf probe subcommand for
kprobe-event setup helper
Frederic Weisbecker wrote:
> 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)));
Thanks, I'll use that.
>> +#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()
>
Sure :-)
Thank you,
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division
e-mail: mhiramat@...hat.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists