aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/probe-finder.h
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@redhat.com>2010-03-22 12:10:26 -0400
committerIngo Molnar <mingo@elte.hu>2010-03-22 13:47:35 -0400
commit4b4da7f76660ea8b5aa45615165c48f62167ffa8 (patch)
tree927274cf9fe9fca657983f4a5d3d3a91a40a051b /tools/perf/util/probe-finder.h
parentf3a1f0ea9432ec395cd112f42201e8e523c07bc5 (diff)
perf probe: Cleanup debuginfo related code
Cleanup debuginfo related code to eliminate fragile code which pointed by Ingo (Thanks!). 1) Invert logic of NO_DWARF_SUPPORT to DWARF_SUPPORT. 2) For removing assymetric/local variable ifdefs, introduce more helper functions. 3) Change options order to reduce the number of ifdefs. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1269274229-20442-2-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/probe-finder.h')
-rw-r--r--tools/perf/util/probe-finder.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/probe-finder.h b/tools/perf/util/probe-finder.h
index 2f2307d4139f..3564f22954f1 100644
--- a/tools/perf/util/probe-finder.h
+++ b/tools/perf/util/probe-finder.h
@@ -15,7 +15,7 @@ static inline int is_c_varname(const char *name)
15 return isalpha(name[0]) || name[0] == '_'; 15 return isalpha(name[0]) || name[0] == '_';
16} 16}
17 17
18#ifndef NO_DWARF_SUPPORT 18#ifdef DWARF_SUPPORT
19/* Find kprobe_trace_events specified by perf_probe_event from debuginfo */ 19/* Find kprobe_trace_events specified by perf_probe_event from debuginfo */
20extern int find_kprobe_trace_events(int fd, struct perf_probe_event *pev, 20extern int find_kprobe_trace_events(int fd, struct perf_probe_event *pev,
21 struct kprobe_trace_event **tevs); 21 struct kprobe_trace_event **tevs);
@@ -57,6 +57,6 @@ struct line_finder {
57 int found; 57 int found;
58}; 58};
59 59
60#endif /* NO_DWARF_SUPPORT */ 60#endif /* DWARF_SUPPORT */
61 61
62#endif /*_PROBE_FINDER_H */ 62#endif /*_PROBE_FINDER_H */