aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-probe.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-02-03 13:52:00 -0500
committerIngo Molnar <mingo@elte.hu>2010-02-04 03:33:24 -0500
commit9de89fe7c577847877ae00ea1aa6315559b10243 (patch)
tree523bcd2c2b1e2a839100b472ff864860cdc8caeb /tools/perf/builtin-probe.c
parentb8f46c5a34fa64fd456295388d18f50ae69d9f37 (diff)
perf symbols: Remove perf_session usage in symbols layer
I noticed while writing the first test in 'perf regtest' that to just test the symbol handling routines one needs to create a perf session, that is a layer centered on a perf.data file, events, etc, so I untied these layers. This reduces the complexity for the users as the number of parameters to most of the symbols and session APIs now was reduced while not adding more state to all the map instances by only having data that is needed to split the kernel (kallsyms and ELF symtab sections) maps and do vmlinux relocation on the main kernel map. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <1265223128-11786-1-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-probe.c')
-rw-r--r--tools/perf/builtin-probe.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index 34f2acb1cc88..4fa73eca1d82 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -122,8 +122,7 @@ static int opt_del_probe_event(const struct option *opt __used,
122static void evaluate_probe_point(struct probe_point *pp) 122static void evaluate_probe_point(struct probe_point *pp)
123{ 123{
124 struct symbol *sym; 124 struct symbol *sym;
125 sym = map__find_symbol_by_name(session.kmap, pp->function, 125 sym = map__find_symbol_by_name(session.kmap, pp->function, NULL);
126 session.psession, NULL);
127 if (!sym) 126 if (!sym)
128 die("Kernel symbol \'%s\' not found - probe not added.", 127 die("Kernel symbol \'%s\' not found - probe not added.",
129 pp->function); 128 pp->function);
@@ -132,7 +131,7 @@ static void evaluate_probe_point(struct probe_point *pp)
132#ifndef NO_LIBDWARF 131#ifndef NO_LIBDWARF
133static int open_vmlinux(void) 132static int open_vmlinux(void)
134{ 133{
135 if (map__load(session.kmap, session.psession, NULL) < 0) { 134 if (map__load(session.kmap, NULL) < 0) {
136 pr_debug("Failed to load kernel map.\n"); 135 pr_debug("Failed to load kernel map.\n");
137 return -EINVAL; 136 return -EINVAL;
138 } 137 }