aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-probe.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-probe.c')
-rw-r--r--tools/perf/builtin-probe.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index 520b064b46d8..7e741f54d798 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -57,7 +57,6 @@ static struct {
57 int nr_probe; 57 int nr_probe;
58 struct probe_point probes[MAX_PROBES]; 58 struct probe_point probes[MAX_PROBES];
59 struct strlist *dellist; 59 struct strlist *dellist;
60 struct symbol_conf conf;
61 struct perf_session *psession; 60 struct perf_session *psession;
62 struct map *kmap; 61 struct map *kmap;
63} session; 62} session;
@@ -151,7 +150,7 @@ static const struct option options[] = {
151 OPT_BOOLEAN('v', "verbose", &verbose, 150 OPT_BOOLEAN('v', "verbose", &verbose,
152 "be more verbose (show parsed arguments, etc)"), 151 "be more verbose (show parsed arguments, etc)"),
153#ifndef NO_LIBDWARF 152#ifndef NO_LIBDWARF
154 OPT_STRING('k', "vmlinux", &session.conf.vmlinux_name, 153 OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name,
155 "file", "vmlinux pathname"), 154 "file", "vmlinux pathname"),
156#endif 155#endif
157 OPT_BOOLEAN('l', "list", &session.list_events, 156 OPT_BOOLEAN('l', "list", &session.list_events,
@@ -224,13 +223,12 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used)
224 } 223 }
225 224
226 /* Initialize symbol maps for vmlinux */ 225 /* Initialize symbol maps for vmlinux */
227 session.conf.sort_by_name = true; 226 symbol_conf.sort_by_name = true;
228 if (session.conf.vmlinux_name == NULL) 227 if (symbol_conf.vmlinux_name == NULL)
229 session.conf.try_vmlinux_path = true; 228 symbol_conf.try_vmlinux_path = true;
230 if (symbol__init(&session.conf) < 0) 229 if (symbol__init() < 0)
231 die("Failed to init symbol map."); 230 die("Failed to init symbol map.");
232 session.psession = perf_session__new(NULL, O_WRONLY, false, 231 session.psession = perf_session__new(NULL, O_WRONLY, false);
233 &session.conf);
234 if (session.psession == NULL) 232 if (session.psession == NULL)
235 die("Failed to init perf_session."); 233 die("Failed to init perf_session.");
236 session.kmap = map_groups__find_by_name(&session.psession->kmaps, 234 session.kmap = map_groups__find_by_name(&session.psession->kmaps,