probe-finder.h (239060b93bb30a4ad55f1ecaa512464a035cc5ba) probe-finder.h (cf6eb489e5c04c8f8d5fd7bf90b8346c987688bc)
1#ifndef _PROBE_FINDER_H
2#define _PROBE_FINDER_H
3
4#include <stdbool.h>
5#include "util.h"
6#include "probe-event.h"
7
8#define MAX_PATH_LEN 256

--- 11 unchanged lines hidden (view full) ---

20extern int find_probe_trace_events(int fd, struct perf_probe_event *pev,
21 struct probe_trace_event **tevs,
22 int max_tevs);
23
24/* Find a perf_probe_point from debuginfo */
25extern int find_perf_probe_point(int fd, unsigned long addr,
26 struct perf_probe_point *ppt);
27
1#ifndef _PROBE_FINDER_H
2#define _PROBE_FINDER_H
3
4#include <stdbool.h>
5#include "util.h"
6#include "probe-event.h"
7
8#define MAX_PATH_LEN 256

--- 11 unchanged lines hidden (view full) ---

20extern int find_probe_trace_events(int fd, struct perf_probe_event *pev,
21 struct probe_trace_event **tevs,
22 int max_tevs);
23
24/* Find a perf_probe_point from debuginfo */
25extern int find_perf_probe_point(int fd, unsigned long addr,
26 struct perf_probe_point *ppt);
27
28/* Find a line range */
28extern int find_line_range(int fd, struct line_range *lr);
29
29extern int find_line_range(int fd, struct line_range *lr);
30
31/* Find available variables */
32extern int find_available_vars_at(int fd, struct perf_probe_event *pev,
33 struct variable_list **vls, int max_points);
34
30#include <dwarf.h>
31#include <libdw.h>
32#include <version.h>
33
34struct probe_finder {
35 struct perf_probe_event *pev; /* Target probe event */
35#include <dwarf.h>
36#include <libdw.h>
37#include <version.h>
38
39struct probe_finder {
40 struct perf_probe_event *pev; /* Target probe event */
36 struct probe_trace_event *tevs; /* Result trace events */
37 int ntevs; /* Number of trace events */
38 int max_tevs; /* Max number of trace events */
39
41
42 /* Callback when a probe point is found */
43 int (*callback)(Dwarf_Die *sp_die, struct probe_finder *pf);
44
40 /* For function searching */
41 int lno; /* Line number */
42 Dwarf_Addr addr; /* Address */
43 const char *fname; /* Real file name */
44 Dwarf_Die cu_die; /* Current CU */
45 struct list_head lcache; /* Line cache for lazy match */
46
47 /* For variable searching */
48#if _ELFUTILS_PREREQ(0, 142)
49 Dwarf_CFI *cfi; /* Call Frame Information */
50#endif
51 Dwarf_Op *fb_ops; /* Frame base attribute */
52 struct perf_probe_arg *pvar; /* Current target variable */
53 struct probe_trace_arg *tvar; /* Current result variable */
54};
55
45 /* For function searching */
46 int lno; /* Line number */
47 Dwarf_Addr addr; /* Address */
48 const char *fname; /* Real file name */
49 Dwarf_Die cu_die; /* Current CU */
50 struct list_head lcache; /* Line cache for lazy match */
51
52 /* For variable searching */
53#if _ELFUTILS_PREREQ(0, 142)
54 Dwarf_CFI *cfi; /* Call Frame Information */
55#endif
56 Dwarf_Op *fb_ops; /* Frame base attribute */
57 struct perf_probe_arg *pvar; /* Current target variable */
58 struct probe_trace_arg *tvar; /* Current result variable */
59};
60
61struct trace_event_finder {
62 struct probe_finder pf;
63 struct probe_trace_event *tevs; /* Found trace events */
64 int ntevs; /* Number of trace events */
65 int max_tevs; /* Max number of trace events */
66};
67
68struct available_var_finder {
69 struct probe_finder pf;
70 struct variable_list *vls; /* Found variable lists */
71 int nvls; /* Number of variable lists */
72 int max_vls; /* Max no. of variable lists */
73};
74
56struct line_finder {
57 struct line_range *lr; /* Target line range */
58
59 const char *fname; /* File name */
60 int lno_s; /* Start line number */
61 int lno_e; /* End line number */
62 Dwarf_Die cu_die; /* Current CU */
63 int found;
64};
65
66#endif /* DWARF_SUPPORT */
67
68#endif /*_PROBE_FINDER_H */
75struct line_finder {
76 struct line_range *lr; /* Target line range */
77
78 const char *fname; /* File name */
79 int lno_s; /* Start line number */
80 int lno_e; /* End line number */
81 Dwarf_Die cu_die; /* Current CU */
82 int found;
83};
84
85#endif /* DWARF_SUPPORT */
86
87#endif /*_PROBE_FINDER_H */