summaryrefslogtreecommitdiffstats
path: root/lib/reciprocal_div.c
diff options
context:
space:
mode:
authorIngo Molnar2010-03-17 12:13:28 +0100
committerIngo Molnar2010-03-17 12:13:28 +0100
commit3b0d516463f8deb897a55cb81e9dbbe58a2490ed (patch)
treebc62418aa7da53595d76413466aab3bc1fcb2d32 /lib/reciprocal_div.c
parentperf probe: Add data structure member access support (diff)
downloadkernel-qcow2-linux-3b0d516463f8deb897a55cb81e9dbbe58a2490ed.tar.gz
kernel-qcow2-linux-3b0d516463f8deb897a55cb81e9dbbe58a2490ed.tar.xz
kernel-qcow2-linux-3b0d516463f8deb897a55cb81e9dbbe58a2490ed.zip
perf probe: Fix !dwarf build
Fix the !drawf build. This uses the existing NO_DWARF_SUPPORT mechanism we use for that, but it's really fragile and needs a cleanup. (in a separate patch) 1) Such uses: #ifndef NO_DWARF_SUPPORT are double inverted logic a'la 'not not'. Instead the flag should be called DWARF_SUPPORT. 2) Furthermore, assymetric #ifdef polluted code flow like: if (need_dwarf) #ifdef NO_DWARF_SUPPORT die("Debuginfo-analysis is not supported"); #else /* !NO_DWARF_SUPPORT */ pr_debug("Some probes require debuginfo.\n"); fd = open_vmlinux(); is very fragile and not acceptable. Instead of that helper functions should be created and the dwarf/no-dwarf logic should be separated more cleanly. 3) Local variable #ifdefs like this: #ifndef NO_DWARF_SUPPORT int fd; #endif Are fragile as well and should be eliminated. Helper functions achieve that too. Cc: Masami Hiramatsu <mhiramat@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20100316220612.32050.33806.stgit@localhost6.localdomain6> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'lib/reciprocal_div.c')
0 files changed, 0 insertions, 0 deletions