perf probe: Introduce debuginfo to encapsulate dwarf information
Introduce debuginfo to encapsulate dwarf information. This new object allows us to reuse and expand debuginfo easily. Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Link: http://lkml.kernel.org/r/20110627072739.6528.12438.stgit@fedora15 Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
@@ -16,23 +16,42 @@ static inline int is_c_varname(const char *name)
|
||||
}
|
||||
|
||||
#ifdef DWARF_SUPPORT
|
||||
|
||||
#include "dwarf-aux.h"
|
||||
|
||||
/* TODO: export debuginfo data structure even if no dwarf support */
|
||||
|
||||
/* debug information structure */
|
||||
struct debuginfo {
|
||||
Dwarf *dbg;
|
||||
Dwfl *dwfl;
|
||||
Dwarf_Addr bias;
|
||||
};
|
||||
|
||||
extern struct debuginfo *debuginfo__new(const char *path);
|
||||
extern struct debuginfo *debuginfo__new_online_kernel(unsigned long addr);
|
||||
extern void debuginfo__delete(struct debuginfo *self);
|
||||
|
||||
/* Find probe_trace_events specified by perf_probe_event from debuginfo */
|
||||
extern int find_probe_trace_events(int fd, struct perf_probe_event *pev,
|
||||
struct probe_trace_event **tevs,
|
||||
int max_tevs);
|
||||
extern int debuginfo__find_trace_events(struct debuginfo *self,
|
||||
struct perf_probe_event *pev,
|
||||
struct probe_trace_event **tevs,
|
||||
int max_tevs);
|
||||
|
||||
/* Find a perf_probe_point from debuginfo */
|
||||
extern int find_perf_probe_point(unsigned long addr,
|
||||
struct perf_probe_point *ppt);
|
||||
extern int debuginfo__find_probe_point(struct debuginfo *self,
|
||||
unsigned long addr,
|
||||
struct perf_probe_point *ppt);
|
||||
|
||||
/* Find a line range */
|
||||
extern int find_line_range(int fd, struct line_range *lr);
|
||||
extern int debuginfo__find_line_range(struct debuginfo *self,
|
||||
struct line_range *lr);
|
||||
|
||||
/* Find available variables */
|
||||
extern int find_available_vars_at(int fd, struct perf_probe_event *pev,
|
||||
struct variable_list **vls, int max_points,
|
||||
bool externs);
|
||||
#include "dwarf-aux.h"
|
||||
extern int debuginfo__find_available_vars_at(struct debuginfo *self,
|
||||
struct perf_probe_event *pev,
|
||||
struct variable_list **vls,
|
||||
int max_points, bool externs);
|
||||
|
||||
struct probe_finder {
|
||||
struct perf_probe_event *pev; /* Target probe event */
|
||||
|
Reference in New Issue
Block a user