summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/machine.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2017-05-31 21:01:04 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-06-05 14:17:58 -0300
commit6b335e8f545591c07df0f34231bd7ff7506c98c1 (patch)
tree07d0ed62b940d1da53b409f0da6a33653d7daa5b /tools/perf/util/machine.c
parent1deec1bd96ccd8beb04d2112a6d12fe20505c3a6 (diff)
downloadblackbird-op-linux-6b335e8f545591c07df0f34231bd7ff7506c98c1.tar.gz
blackbird-op-linux-6b335e8f545591c07df0f34231bd7ff7506c98c1.zip
perf symbols: Set module info when build-id event found
Like machine__findnew_module_dso(), it should set necessary info for kernel modules to find symbol info from the file. Factor out dso__set_module_info() to do it. This is needed for dso__needs_decompress() to detect such DSOs. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Andi Kleen <andi@firstfloor.org> Cc: David Ahern <dsahern@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170531120105.21731-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/machine.c')
-rw-r--r--tools/perf/util/machine.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index d97e014c3df3..d7f31cb0a4cb 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -572,16 +572,7 @@ static struct dso *machine__findnew_module_dso(struct machine *machine,
if (dso == NULL)
goto out_unlock;
- if (machine__is_host(machine))
- dso->symtab_type = DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE;
- else
- dso->symtab_type = DSO_BINARY_TYPE__GUEST_KMODULE;
-
- /* _KMODULE_COMP should be next to _KMODULE */
- if (m->kmod && m->comp)
- dso->symtab_type++;
-
- dso__set_short_name(dso, strdup(m->name), true);
+ dso__set_module_info(dso, m, machine);
dso__set_long_name(dso, strdup(filename), true);
}
OpenPOWER on IntegriCloud