This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH tracing/kprobes v4] perf: Add perf probe subcommand for kprobe-event setup helper
- From: Frederic Weisbecker <fweisbec at gmail dot com>
- To: Masami Hiramatsu <mhiramat at redhat dot com>
- Cc: Steven Rostedt <rostedt at goodmis dot org>, Ingo Molnar <mingo at elte dot hu>, lkml <linux-kernel at vger dot kernel dot org>, systemtap <systemtap at sources dot redhat dot com>, DLE <dle-develop at lists dot sourceforge dot net>, Thomas Gleixner <tglx at linutronix dot de>, Arnaldo Carvalho de Melo <acme at redhat dot com>, Mike Galbraith <efault at gmx dot de>, Paul Mackerras <paulus at samba dot org>, Peter Zijlstra <a dot p dot zijlstra at chello dot nl>, Christoph Hellwig <hch at infradead dot org>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Jim Keniston <jkenisto at us dot ibm dot com>, "Frank Ch. Eigler" <fche at redhat dot com>
- Date: Mon, 12 Oct 2009 20:03:01 +0200
- Subject: Re: [PATCH tracing/kprobes v4] perf: Add perf probe subcommand for kprobe-event setup helper
- References: <4ACE56EE.8060000@redhat.com> <20091008211737.29299.14784.stgit@dhcp-100-2-132.bos.redhat.com>
On Thu, Oct 08, 2009 at 05:17:38PM -0400, Masami Hiramatsu wrote:
> +static void semantic_error(const char *msg)
> +{
> + fprintf(stderr, "Semantic error: %s\n", msg);
> + exit(1);
> +}
> +
> +static void perror_exit(const char *msg)
> +{
> + perror(msg);
> + exit(1);
> +}
We have that already btw:
tools/perf/util/util.h:
extern void die(const char *err, ...) NORETURN __attribute__((format (printf, 1, 2)));
> +static void msg_exit(int ret, const char *fmt, ...)
> +{
> + va_list ap;
> +
> + va_start(ap, fmt);
> + fprintf(stderr, "Error: ");
> + vfprintf(stderr, fmt, ap);
> + va_end(ap);
> +
> + fprintf(stderr, "\n");
> + exit(ret);
> +}
And somehow ditto :)