X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=tools%2Fperf%2Futil%2Fheader.c;h=5cac8d5e009a88ff096d9e2f8026e39e8567c595;hb=adc311034c356e884d180df25deb046cef3e8c75;hp=314a07151fb772377752dae62658b79ffdc87cd6;hpb=bb47e964175e5fb4c163066e4373fac055fe5da0;p=karo-tx-linux.git diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 314a07151fb7..5cac8d5e009a 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -1469,8 +1469,16 @@ static int __event_process_build_id(struct build_id_event *bev, dso__set_build_id(dso, &bev->build_id); - if (!is_kernel_module(filename, cpumode)) - dso->kernel = dso_type; + if (dso_type != DSO_TYPE_USER) { + struct kmod_path m = { .name = NULL, }; + + if (!kmod_path__parse_name(&m, filename) && m.kmod) + dso__set_module_info(dso, &m, machine); + else + dso->kernel = dso_type; + + free(m.name); + } build_id__sprintf(dso->build_id, sizeof(dso->build_id), sbuild_id);