diff options
Diffstat (limited to 'tools/perf/util/probe-finder.h')
-rw-r--r-- | tools/perf/util/probe-finder.h | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/tools/perf/util/probe-finder.h b/tools/perf/util/probe-finder.h index 4507d519f183..bba69d455699 100644 --- a/tools/perf/util/probe-finder.h +++ b/tools/perf/util/probe-finder.h | |||
@@ -22,20 +22,27 @@ extern int find_probe_trace_events(int fd, struct perf_probe_event *pev, | |||
22 | int max_tevs); | 22 | int max_tevs); |
23 | 23 | ||
24 | /* Find a perf_probe_point from debuginfo */ | 24 | /* Find a perf_probe_point from debuginfo */ |
25 | extern int find_perf_probe_point(int fd, unsigned long addr, | 25 | extern int find_perf_probe_point(unsigned long addr, |
26 | struct perf_probe_point *ppt); | 26 | struct perf_probe_point *ppt); |
27 | 27 | ||
28 | /* Find a line range */ | ||
28 | extern int find_line_range(int fd, struct line_range *lr); | 29 | extern int find_line_range(int fd, struct line_range *lr); |
29 | 30 | ||
31 | /* Find available variables */ | ||
32 | extern int find_available_vars_at(int fd, struct perf_probe_event *pev, | ||
33 | struct variable_list **vls, int max_points, | ||
34 | bool externs); | ||
35 | |||
30 | #include <dwarf.h> | 36 | #include <dwarf.h> |
31 | #include <libdw.h> | 37 | #include <libdw.h> |
38 | #include <libdwfl.h> | ||
32 | #include <version.h> | 39 | #include <version.h> |
33 | 40 | ||
34 | struct probe_finder { | 41 | struct probe_finder { |
35 | struct perf_probe_event *pev; /* Target probe event */ | 42 | struct perf_probe_event *pev; /* Target probe event */ |
36 | struct probe_trace_event *tevs; /* Result trace events */ | 43 | |
37 | int ntevs; /* Number of trace events */ | 44 | /* Callback when a probe point is found */ |
38 | int max_tevs; /* Max number of trace events */ | 45 | int (*callback)(Dwarf_Die *sp_die, struct probe_finder *pf); |
39 | 46 | ||
40 | /* For function searching */ | 47 | /* For function searching */ |
41 | int lno; /* Line number */ | 48 | int lno; /* Line number */ |
@@ -53,6 +60,22 @@ struct probe_finder { | |||
53 | struct probe_trace_arg *tvar; /* Current result variable */ | 60 | struct probe_trace_arg *tvar; /* Current result variable */ |
54 | }; | 61 | }; |
55 | 62 | ||
63 | struct trace_event_finder { | ||
64 | struct probe_finder pf; | ||
65 | struct probe_trace_event *tevs; /* Found trace events */ | ||
66 | int ntevs; /* Number of trace events */ | ||
67 | int max_tevs; /* Max number of trace events */ | ||
68 | }; | ||
69 | |||
70 | struct available_var_finder { | ||
71 | struct probe_finder pf; | ||
72 | struct variable_list *vls; /* Found variable lists */ | ||
73 | int nvls; /* Number of variable lists */ | ||
74 | int max_vls; /* Max no. of variable lists */ | ||
75 | bool externs; /* Find external vars too */ | ||
76 | bool child; /* Search child scopes */ | ||
77 | }; | ||
78 | |||
56 | struct line_finder { | 79 | struct line_finder { |
57 | struct line_range *lr; /* Target line range */ | 80 | struct line_range *lr; /* Target line range */ |
58 | 81 | ||