This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH tracing/kprobes v2 4/5] perf: Add perf probe subcommand for kprobe-event setup helper
- From: Peter Zijlstra <a dot p dot zijlstra at chello dot nl>
- To: Masami Hiramatsu <mhiramat at redhat dot com>
- Cc: rostedt at goodmis dot org, Frederic Weisbecker <fweisbec at gmail dot com>, 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>, 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: Tue, 06 Oct 2009 11:03:42 +0200
- Subject: Re: [PATCH tracing/kprobes v2 4/5] perf: Add perf probe subcommand for kprobe-event setup helper
- References: <20091002214834.30906.86502.stgit@dhcp-100-2-132.bos.redhat.com> <20091002214904.30906.11622.stgit@dhcp-100-2-132.bos.redhat.com> <1254788953.13160.209.camel@gandalf.stny.rr.com> <4ACA95F8.7020407@redhat.com>
On Mon, 2009-10-05 at 20:57 -0400, Masami Hiramatsu wrote:
> >> +ifneq ($(shell sh -c "(echo '\#include <libdwarf/dwarf.h>'; echo '\#include <libdwarf/libdwarf.h>'; echo 'int main(void) { Dwarf_Debug dbg; Dwarf_Error err; dwarf_init(0, DW_DLC_READ, 0, 0, &dbg, &err); return (long)dbg; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -ldwarf -lelf -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y)
> >> + msg := $(warning No libdwarf.h found, disables probe subcommand. Please install libdwarf-dev/libdwarf-devel);
> >
> > Wow! And I thought my macros were ugly ;-)
>
> :-)
> Maybe, would I better make a separate c file to check this?
> Like "autoconf-checkdwarf.c".
I'm the one who started this trend.. Maybe putting all those tests in a
static .c file makes sense now, put them in a tests/ or checks/
directory though, so it doesn't litter the regular files.
Then again,.. the actual .c file is only half that line, so it doesn't
really clean up that much.