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>
This commit is contained in:

committed by
Ingo Molnar

parent
f3a1f0ea94
commit
4b4da7f766
@@ -15,7 +15,7 @@ static inline int is_c_varname(const char *name)
|
||||
return isalpha(name[0]) || name[0] == '_';
|
||||
}
|
||||
|
||||
#ifndef NO_DWARF_SUPPORT
|
||||
#ifdef DWARF_SUPPORT
|
||||
/* Find kprobe_trace_events specified by perf_probe_event from debuginfo */
|
||||
extern int find_kprobe_trace_events(int fd, struct perf_probe_event *pev,
|
||||
struct kprobe_trace_event **tevs);
|
||||
@@ -57,6 +57,6 @@ struct line_finder {
|
||||
int found;
|
||||
};
|
||||
|
||||
#endif /* NO_DWARF_SUPPORT */
|
||||
#endif /* DWARF_SUPPORT */
|
||||
|
||||
#endif /*_PROBE_FINDER_H */
|
||||
|
Reference in New Issue
Block a user